aydarbiktimirov

Untitled

Dec 8th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. void free_var_array(char *var_array, size_t depth, int *lower_bounds, int *upper_bounds)
  2. {
  3.     size_t i;
  4.     struct variable **array = NULL;
  5.     if (depth == 0)
  6.     {
  7.         free((struct variable *)var_array);
  8.     }
  9.     else
  10.     {
  11.         array = (struct variable **)var_array;
  12.         for (i = 0; i <= (size_t)(*upper_bounds) - (*lower_bounds); ++i)
  13.         {
  14.             free_var_array((char *)array[i], depth - 1, lower_bounds + 1, upper_bounds + 1);
  15.         }
  16.     }
  17. }
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment