home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / graphics / randjpeg_1 / source / h / strings < prev   
Text File  |  1995-12-27  |  1KB  |  64 lines

  1. #ifndef strings_h
  2. #define strings_h
  3.  
  4.  
  5. #include <limits.h>
  6.  
  7.  
  8. /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9.  */
  10.  
  11. typedef struct node     node;
  12.  
  13. struct node {
  14.   node  *next;
  15.   char  text[65536];
  16. };
  17.  
  18.  
  19. typedef struct strings  strings;
  20. struct strings {
  21.   node          *head;
  22.   node          *tail;
  23.   unsigned int  count;
  24. };
  25.  
  26.  
  27. /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  28.  */
  29.  
  30. extern void strings_add(
  31.                 strings         *s,
  32.                 const char      *text);
  33.  
  34. extern void strings_clear(
  35.                 strings         *s);
  36.  
  37. extern node *strings_find(
  38.                 const strings   *s,
  39.                 const char      *text);
  40.  
  41. extern node *strings_get(
  42.                 const strings   *s,
  43.                 unsigned int    index);
  44.  
  45. extern void strings_insert(
  46.                 strings         *s,
  47.                 node            *node);
  48.  
  49. extern void strings_read(
  50.                 strings         *s,
  51.                 const char      *filename);
  52.  
  53. extern void strings_remove(
  54.                 strings         *s,
  55.                 node            *node);
  56.  
  57. extern void strings_write(
  58.                 const strings   *s,
  59.                 const char      *filename);
  60.  
  61.  
  62.  
  63. #endif /* strings_h */
  64.