home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / editor / dig12.cpt / Application / Browser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-03  |  727 b   |  36 lines

  1. /* Browser.h */
  2.  
  3. #pragma once
  4.  
  5. #include <stdlib.h>
  6. #include <stdio.h>
  7.  
  8. // Macros to make life easy
  9. #define Allocate(aType) (aType *) NewPtr(sizeof(aType))
  10. #define Deallocate(Var) if (Var) { DisposPtr(Var); Var = NULL;}
  11.  
  12. #define MAX_STRING 200
  13.  
  14. typedef struct a {
  15.     FILE    *fp;
  16.     char     date[MAX_STRING];
  17.     char     from[MAX_STRING];
  18.     char     subject[MAX_STRING];
  19.     struct a *next;
  20.     long     startAt;
  21.     long     endAt;
  22. } BrowserItem, *BrowserItemPtr;
  23.  
  24.  
  25. typedef struct b {
  26.     char    fname[64];        // file name
  27.     short    vRefNum;        // volume ref.
  28.     FILE    *fp;            // file pointer
  29.     long    numArticles;    // count of items
  30.  
  31.     BrowserItemPtr topItem;
  32. } BrowserDir;
  33.  
  34. Boolean equalstr(register char *s, register char *t, int n);
  35. Boolean BuildBrowserIndex(BrowserDir    *dir);
  36.