home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia: Special Games (Alt) / INFESPGAMES.iso / os2 / backgam / source / history.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-18  |  1.9 KB  |  46 lines

  1. /*************************************************************
  2.  *    ______                                                 *
  3.  *   /     /\  TinyFugue was derived from a client initially *
  4.  *  /   __/  \ written by Anton Rang (Tarrant) and later     *
  5.  *  |  / /\  | modified by Leo Plotkin (Grod).  The early    *
  6.  *  |  |/    | versions of TinyFugue written by Greg Hudson  *
  7.  *  |  X__/  | (Explorer_Bob).  The current version is       *
  8.  *  \ /      / written and maintained by Ken Keys (Hawkeye), *
  9.  *   \______/  who can be reached at kkeys@ucsd.edu.         *
  10.  *                                                           *
  11.  *             No copyright 1992, no rights reserved.        *
  12.  *             Fugue is in the public domain.                *
  13.  *************************************************************/
  14.  
  15. typedef struct History {       /* circular list of Alines, and logfile */
  16.     Aline **alines;
  17.     int size, maxsize, pos, index, num;
  18.     TFILE *logfile;
  19. } History;
  20.  
  21. typedef struct Textnode {      /* node in Queue */
  22.     Aline *aline;
  23.     struct Textnode *next;
  24. } Textnode;
  25.  
  26. typedef struct Queue {         /* FIFO for buffering lines */
  27.     Textnode *head, *tail;
  28. } Queue;
  29.  
  30.  
  31. extern void   NDECL(init_histories);
  32. extern void   FDECL(free_history,(History *q));
  33. extern int    FDECL(history_full,(History *q));
  34. extern void   FDECL(record_world,(History *q, Aline *aline));
  35. extern void   FDECL(record_local,(Aline *aline));
  36. extern void   FDECL(record_input,(char *line));
  37. extern int    FDECL(recall_history,(char *args, Queue *buf));
  38. extern void   FDECL(recall_input,(Stringp str, int dir));
  39. extern int    FDECL(is_suppressed,(History *q, char *line));
  40. extern void   FDECL(history_sub,(char *pattern));
  41. extern void   FDECL(init_queue,(Queue *q));
  42. extern void   FDECL(enqueue,(Queue *q, Aline *aline));
  43. extern Aline *FDECL(dequeue,(Queue *q));
  44. extern void   FDECL(free_queue,(Queue *q));
  45. extern void   FDECL(do_log,(char *args));
  46.