home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 479a.lha / barn_v2.01 / source / ng.h < prev    next >
C/C++ Source or Header  |  1991-02-10  |  1KB  |  60 lines

  1. /*
  2.  *    File Name:        ng.h
  3.  *    Project:        BARN - Bah's Amiga ReadNews.
  4.  *    Purpose:        Define newsgroup structures.
  5.  *    Author:            Jeff Van Epps
  6.  *    Created:        02 Sep 89
  7.  *    Last Modified:    21 Oct 90
  8.  *    History:
  9.  *        02 Sep 89/JVE    Created.
  10.  *        21 Oct 90/JVE    Added declarations for UpdateReadList, Mark.
  11.  */
  12.  
  13. /*
  14.  *    MARKER is used to mark either a single number or a range. If to==0,
  15.  *    from indicates the single number to be marked. Otherwise all numbers
  16.  *    between and including from and to should be marked.
  17.  */
  18.  
  19. typedef struct marker_info {
  20.     long                from, to;    /* article numbers */
  21.     struct marker_info    *next;        /* pointer to next marker record */
  22.     } MARKER;
  23.  
  24. /*
  25.  *    NG_INFO records names of newsgroups and which articles have been read
  26.  *    in each newsgroup.
  27.  */
  28.  
  29. typedef struct ng_info {
  30.     char            *name;            /* name of newsgroup */
  31.     MARKER            *markers;        /* ptr to list of article #s read */
  32.     struct ng_info    *next;            /* ptr to next newsgroup in list */
  33.     } NG_INFO;
  34.  
  35. /*
  36.  *    Function prototypes.
  37.  */
  38.  
  39. # ifdef sun
  40.  
  41. NG_INFO        *GetNewsRC();
  42. int            ReadNextMarker();
  43. void        PutNewsRC();
  44. void        DestroyNGList();
  45. int            NumberCovered();
  46. void        UpdateReadList();
  47. MARKER *    Mark();
  48.  
  49. # else
  50.  
  51. NG_INFO        *GetNewsRC( char *filename );
  52. int            ReadNextMarker( MARKER ***marker );
  53. void        PutNewsRC( char *filename, NG_INFO *alreadyread );
  54. void        DestroyNGList( NG_INFO *alreadyread );
  55. int            NumberCovered( MARKER *marker, long number );
  56. void        UpdateReadList( NG_INFO *ng, ARTICLE_INFO *new );
  57. MARKER *    Mark( long begin, long end );
  58.  
  59. # endif
  60.