home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / EDZAPKEY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  742 b   |  37 lines

  1. /**
  2. *
  3. * Name        EDZAPKEY -- Free the entire edit key list.
  4. *
  5. * Synopsis    edzapkey();
  6. *
  7. * Description    This procedure frees all memory associated with the
  8. *        edit key list and resets the root pointer to NULL.
  9. *
  10. * Returns    Nothing.
  11. *
  12. * Version    6.00 (C)Copyright Blaise Computing Inc.  1989
  13. *
  14. **/
  15.  
  16. #include <butil.h>
  17. #include <bedit.h>
  18.  
  19.  
  20. void edzapkey()
  21. {
  22.     ED_LIST *p_current_item, *p_next_item;
  23.  
  24.     p_current_item = b_pkey_root;
  25.     while (p_current_item != NIL)
  26.     {
  27.     p_next_item = p_current_item->pnext;
  28.     p_current_item->pnext = NIL;
  29.     p_current_item->pprev = NIL;
  30.     free(p_current_item->edit_key.edit_actions.pactions);
  31.     free(p_current_item);
  32.     p_current_item = p_next_item;
  33.     }
  34.  
  35.     b_pkey_root = NIL;
  36. }
  37.