home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / CMDS / mtools_3.6.src.lzh / MTOOLS_3.6 / mainloop.h < prev    next >
Text File  |  1997-11-12  |  1KB  |  51 lines

  1. #ifndef MTOOLS_MAINLOOP_H
  2. #define MTOOLS_MAINLOOP_H
  3.  
  4. #ifdef HAVE_SYS_PARAM_H
  5. # include <sys/param.h>
  6. #endif
  7. #include "vfat.h"
  8.  
  9. typedef struct MainParam_t {
  10.     /* stuff needing to be initialised by the caller */
  11.     int (*callback)(Stream_t *Dir, struct MainParam_t *mp, int entry);
  12.     int (*unixcallback)(char *name, struct MainParam_t *mp);
  13.     int (*newdoscallback)(char *name, struct MainParam_t *mp);
  14.     int (*newdrive_cb)(Stream_t *Dir, struct MainParam_t *mp);
  15.     int (*olddrive_cb)(Stream_t *Dir, struct MainParam_t *mp);
  16.     void *arg; /* to be passed to callback */
  17.  
  18.            int openflags; /* flags used to open disk */
  19.     int lookupflags; /* flags used to lookup up using vfat_lookup */
  20.     int fast_quit; /* for commands manipulating multiple files, quit
  21.             * as soon as even _one_ file has a problem */
  22.  
  23.     char *outname; /* where to put the matched file name */
  24.     char *shortname; /* where to put the short name of the matched file */
  25.     char *longname; /* where to put the long name of the matched file */
  26.     char *pathname; /* path name of file */
  27.     char filename[VBUFSIZE];
  28.     char drivename;
  29.  
  30.     /* out parameter */
  31.     Stream_t *File;
  32.     struct directory dir;
  33.  
  34.     /* internal data */
  35.     char mcwd[MAXPATHLEN];    
  36. } MainParam_t;
  37.  
  38. void init_mp(MainParam_t *MainParam);
  39. int main_loop(MainParam_t *MainParam, char **argv, int argc);
  40.  
  41. Stream_t *open_subdir(MainParam_t *MainParam, const char *arg, 
  42.               int flags, int mode, int lock);
  43.  
  44.  
  45. #define NEXT_DISK 1
  46. #define MISSED_ONE 2
  47. #define GOT_ONE 4
  48. #define IS_MATCH 8
  49.  
  50. #endif
  51.