home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / jove / part06 / table.h < prev   
Encoding:
C/C++ Source or Header  |  1987-02-02  |  870 b   |  29 lines

  1. /************************************************************************
  2.  * This program is Copyright (C) 1986 by Jonathan Payne.  JOVE is       *
  3.  * provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is *
  5.  * included in all the files.                                           *
  6.  ************************************************************************/
  7.  
  8. typedef struct word    Word;
  9. typedef struct table    Table;
  10.  
  11. struct word {
  12.     Word    *wd_next;
  13.     char    *wd_text;
  14. };
  15.  
  16. struct table {
  17.     Table    *t_next;
  18.     Word    *t_wordlist;
  19. };
  20.  
  21. extern Table    *make_table();
  22. extern Word    *word_in_table();
  23.  
  24. #define    table_top(table)    (table->t_wordlist)
  25. #define next_word(w)        (w->wd_next)
  26. #define last_word_p(w)        (w->wd_next == NIL)
  27. #define word_text(w)        (w->wd_text)
  28. #define word_length(w)        (strlen(word_text(w)))
  29.