Help for this page

Select Code to Download


  1. or download this
    struct NestedLoopList {
       int   elem_size;
    ...
          struct NestedLoopFuncArg  func;
       } ptr;
    };
    
  2. or download this
    struct NestedLoopArg* args = (NestedLoopArg*)calloc(2, sizeof(NestedLo
    +opArg));
    
    ...
    NestedLoops(args);
    
    ... free memory allocated for args ...
    
  3. or download this
    struct NestedLoopList list;
    if ((*arg_ptr).ptr_type == 0)
    ...
       struct NestedLoopFuncArg* func_ptr = (*arg_ptr).ptr;
       (*(*func_ptr).ptr)(&list, (*func_ptr).pad);
    }
    
  4. or download this
    struct MyFuncPad {
       int count;
    ...
       (*list_ptr).ptr       = array;
       (*list_ptr).free_ptr  = 1;
    }
    
  5. or download this
    /* Convert the pointer to an int since ++ and other  */
    /* arithmentic operators are overloaded for pointers */
    ...
    
       ...work with elem_ptr...
    }
    
  6. or download this
    struct ElementType {
       int  size;
    ...
          struct NestedLoopFuncArg  func;
       } ptr;
    };
    
  7. or download this
    struct NestedLoopArg* arg = (NestedLoopArg*)calloc(2, sizeof(NestedLoo
    +pArg));
    
    ...
    NestedLoops(args);
    
    ... free memory allocated for args ...
    
  8. or download this
    struct NestedLoopList list;
    
    ...
          break;
       }
    }
    
  9. or download this
    struct MyFuncPad {
       int count;
    ...
       (*list_ptr).free_ptr   = 1;
       (*list_ptr).free_elems = 1;
    }
    
  10. or download this
    Element* elem_ptr = list.ptr;
    
    ...
       free(list.ptr);
       list.ptr = NULL;
    }
    
  11. or download this
    if (list.free_elems) {
       int i;
    ...
    if (list.free_ptr) {
       free(list.ptr);
    }