Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>fg_matrix_size</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
fg_matrix_size


Usage

   #include <fg.h>
   size_t far fg_matrix_size(fg_const_pbox_t box);

Description

   Determines the number of bytes that will be required to store a matrix.
   This value can then be used to allocate suficient memory.

Example 

   char *make_user_icon(fg_pbox_t icon_box)
   {
       char *icon_matrix;

       get_user_icon_box(icon_box);
       icon_matrix = calloc(fg_matrix_size(icon_box), 1);

       if (icon_matrix)

           get_user_icon(icon_matrix, icon_box);

       /* Caller must free storage used for icon_matrix. */
       return icon_matrix;
   }

Return Value

   Returns the number of bytes to allocate for the matrix.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson