home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0995.lha / WhatIs / include / libraries / WhatIsBase.h
C/C++ Source or Header  |  1994-04-05  |  2KB  |  77 lines

  1. #ifndef    LIBRARIES_WHATIS_H
  2. #define    LIBRARIES_WHATIS_H    1
  3.  
  4. /*
  5. **    $Filename: libraries/whatisbase.h $
  6. **    $Release: 3
  7. **    $Revision: 2 $
  8. **    $Date: 92/12/13 $
  9. **
  10. **    (C) Copyright 1990,1992 S.R. & P.C.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #include <utility/TagItem.h>
  15.  
  16. /*  For  some  technical reason, user of version 1 ( for Pro-2.x KickStart)
  17. MUST open Arp.library ( if needed ) AFTER whatis.library */
  18.  
  19. /*
  20.  *    After thinking a lot I decided to define a new type, this allow maximum
  21.  *    control by compiler. If you have reason against that, please let me know.
  22.  */
  23.  
  24. typedef ULONG FileType; /* the magic number you get after a WhatIs() */
  25.  
  26. #define TYPE_UNSCANNED 0L    /* we haven't look what is this file */
  27. #define TYPE_UNKNOWNFILETYPE 0x0000FFFE
  28. #define TYPE_UNKNOWNIDSTRING 0xFFFFFFFF
  29. /*
  30.  *    The FileType you get have an internal private format.
  31.  *    Assume anything about it, it can change !
  32.  *    The only thing you can be sure: if == 0L: you didn't call WhatIs (type is Unscanned)
  33.  */
  34.  
  35. /* the 2 scan type actualy possible */
  36. #define LIGHTTYPE    0
  37. #define DEEPTYPE    1
  38.  
  39. /*
  40.  *    Tags for WhatIs():
  41.  *    More information you pass, less whatis.library make mistake.
  42.  *    In DEEP mode whatis.library look for this information if you don't pass to it.
  43.  */
  44. #define WI_FIB        (TAG_USER + 202)    /* TagItem.ti_data = struct FileInfoBlock *FIB, default = NULL */
  45. #define WI_Deep     (TAG_USER + 203)    /* TagItem.ti_data = UBYTE Deep, default = 0 */
  46. #define WI_Buffer    (TAG_USER + 204)    /* TagItem.ti_data = Buffer ptr WARNING: your buffer MUST be NULL terminated */
  47. #define WI_BufLen    (TAG_USER + 205)    /* TagItem.ti_data = Buffer Len */
  48. #define WI_DLX        (TAG_USER + 206)    /* TagItem.ti_data = DLX_numble, found in ArpBase.h */
  49. /* Version 2.1 or higher */
  50. #define WI_DLT         (TAG_USER + 207)    /* TagItem.ti_data = DLT_numble, found in DOS 2.0 */
  51.  
  52. #define WBF_UPDATEFILETYPE 0x01
  53.  
  54.  
  55. /* Note:  About private field, there are here only for debuging, if you use
  56. it,  I  remove it (like Commodore do for IntuitionBase) so be a Good Boy...
  57. Also, I promise you that for each revision, I MOVE ALL private field, you'll be warned...
  58. */
  59. struct WhatIsBase
  60. {
  61.     /* Public field */
  62.     struct Library Lib;
  63.  
  64.     /* Next Field are private for Author */
  65.     ULONG  SegList;                    /* seg list of lib itself */
  66.  
  67.     /* Specific field to WhatIs */
  68.     UWORD NumType;
  69.     struct Remember *TypeListMem;    /* You MUST allocate string, and ID tagArray whith that */
  70.     struct MinList TypeList;
  71.     struct WhatIs **TypeArray;
  72.     ULONG Flags;
  73. };
  74.  
  75. #endif
  76.  
  77.