home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 53 / af053sub.adf / quicktools.lha / include / libraries / quicktools.h
C/C++ Source or Header  |  1993-05-13  |  2KB  |  108 lines

  1. /*        QuickTools.h         */
  2.  
  3. #ifndef    QUICKTOOLS_H
  4. #define    QUICKTOOLS_H
  5.  
  6. #ifndef    EXEC_TYPES_H
  7. #include <exec/types.h>
  8. #endif   /* EXEC_TYPES_H */
  9.  
  10. #ifndef    EXEC_NODES_H
  11. #include <exec/nodes.h>
  12. #endif    /* EXEC_NODES_H */
  13.  
  14. #ifndef    EXEC_LISTS_H
  15. #include <exec/lists.h>
  16. #endif    /* EXEC_LISTS_H */
  17.  
  18. #ifndef    EXEC_SEMAPHORES_H
  19. #include    <exec/semaphores.h>
  20. #endif    /* EXEC_SEMAPHORES_H */
  21.  
  22. #ifndef    EXEC_TASKS_H
  23. #include    <exec/tasks.h>
  24. #endif    /* EXEC_TASKS_H */
  25.  
  26. #ifndef UTILITY_TAGITEM_H
  27. #include <utility/tagitem.h> 
  28. #endif    /* UTILITY_TAGITEM_H */
  29.  
  30. #define    QUICKTOOLSNAME            "quicktools.library"
  31. #define    QUICKTOOLSVERSION        2L
  32.  
  33. #define    REG(x)    register __ ## x
  34.  
  35. #ifdef QUICKTOOLS_PRIVATE    /* Private structures and definitions. */
  36.  
  37. #define FILEBUFFERSIZE        5120
  38.  
  39. struct QToolsData
  40. {
  41.     struct SignalSemaphore DataSem;
  42.     struct SignalSemaphore DirLoadSem;
  43.     APTR DirDataBuffer;
  44.     ULONG DirDataLength;
  45.     struct Qdata **DirData;
  46.     UWORD NumDirs;
  47. };
  48.  
  49. struct ParsePathPart
  50. {
  51.     struct ParsePathPart *pp_Next;
  52.     ULONG pp_Size;
  53.     BOOL  pp_Root;
  54.     UBYTE pp_ParsePattern[1];
  55. };
  56.  
  57. struct MatchData
  58. {
  59.     ULONG    md_ScanType;        /*  What kind of matchdata is this  */
  60.     BOOL md_Done;
  61.  
  62.     ULONG md_CurData;            /*  Common data for file and dir matching  */
  63.     struct ParsePathPart *md_Patterns;
  64.     char md_SearchBuf[32];
  65.  
  66.     struct Qdata *md_CurQdata;    /*  Data used only for file matching  */
  67.     BPTR md_FileHandle;
  68.     APTR md_FileBuffer;
  69.     ULONG md_NumFiles;
  70. };
  71.  
  72. #endif /* QUICKTOOLS_PRIVATE */    /* Public structures and definitions */
  73.  
  74. #define QUICKTOOLSDIRS         "s:QuickTools.Dirs"
  75. #define QUICKTOOLSFILES     "s:QuickTools.Files"
  76.  
  77. struct Qdata {
  78.     UWORD    qd_ParrID;
  79.     unsigned char qd_UsePrev;    /*  Nr of chars from previous to use    */
  80.     char qd_FileName[1];            /*  Packed name of this file                */
  81. };
  82.  
  83. /*  Scantypes defined for the QT_ScanType tag  */
  84.  
  85. #define QT_SCAN_FILE            1
  86. #define QT_SCAN_DIRECTORY    2
  87.  
  88. /*  Tags  */
  89.  
  90. #define    QT_TagBase                    TAG_USER
  91.  
  92. /*  Tags understood by SetupMatchData() and FindMatchReq()  */
  93.  
  94. /*  Type of items to scan for                                */
  95. #define    QT_ScanType                    (QT_TagBase+1)
  96.  
  97.  
  98. /*  Tags understood by FindMatchReq()  */
  99.  
  100. /*  Title to use for requesterwindow                    */
  101. #define QT_ReqTitle                    (QT_TagBase+100)
  102. /*  Center the requester on the screen                    */
  103. #define QT_CenterReq                    (QT_TagBase+101)
  104. /*  Screen to open requester on                            */
  105. #define QT_PubScreen                    (QT_TagBase+102)
  106.  
  107. #endif    /* QUICKTOOLS_H */
  108.