home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / packery / xpk_source / xfh / cfs.h < prev    next >
C/C++ Source or Header  |  1996-10-19  |  19KB  |  455 lines

  1. /* CFS.h - common definitions for XFH.
  2.    Copyright (C) 1991, 1992, 1993 Kristian Nielsen.
  3.  
  4.    This file is part of XFH, the compressing file system handler.
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License, or
  9.    (at your option) any later version.
  10.  
  11.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            */
  19.  
  20.  
  21. #include "version.h"
  22.  
  23. #include <dos/dosextens.h>
  24. #include <dos/exall.h>
  25. #include <dos/notify.h>
  26. #include <dos/filehandler.h>
  27.  
  28. #include <pragma/exec_lib.h>
  29. #include <pragma/dos_lib.h>
  30. #include <pragma/xpkmaster_lib.h>
  31.  
  32. extern struct DosLibrary *DOSBase;
  33.  
  34. #include <clib/alib_protos.h>
  35.  
  36. #define MAXFILENAME 30        /* Maximum length of file names. */
  37. #define XROOTNAME "XFH"       /* Unit number and ':' will be appended. */
  38. #define XROOTNAMESIZE 15      /* Max. size of root assign (unit 2^32-1) */
  39.  
  40. #define ALTOPTIONPATH ".xfhrc"
  41.  
  42. #define TMPNAMETEMPLATE "%lx.%lx_XFH"   /* Used in SPrintF(..,task,num) */
  43. #define TMPNAMEMAXSIZE  (8+ 1+8+4+  1)
  44.  
  45. #define AREXXPORTTEMPLATE "%s"         /* %s will be device name (XHx:) */
  46. #define AREXXPORTMAXLEN 1              /* Plus device name size. */
  47. #define AREXXPORTPRI 1
  48.  
  49. #define OUTOFMEM glob -> ioerr = ERROR_NO_FREE_STORE
  50. #define DECLIOERR LONG saveioerr;
  51. #define PUTIOERR saveioerr = glob->ioerr
  52. #define SAVEIOERR LONG saveioerr = glob->ioerr
  53. #define RESTIOERR glob->ioerr = saveioerr
  54.  
  55. #define XFH_ID "XFH A"
  56.  
  57. #define MAXSTRING 256   /* Maximum length of some strings (like a path). */
  58. #ifdef DEBUG
  59. extern void KPrintF(char *,...);
  60. #define debug(a) KPrintF a
  61. #else
  62. #define debug(a)
  63. #endif
  64.  
  65.  
  66. /* This is the structure used internally to represent a file/directory
  67.  * lock. All locks we return contain the address of this structure in their
  68.  * lock->fl_Key field.
  69.  *
  70.  * The CFSLock.refcount field is a sad hack nessesary to overcome a
  71.  * problem with exclusive directory locks when compressing files. The
  72.  * problem is that we need a copy of the parent lock used in RawCFSOpen()
  73.  * when the file is Close()'d. However, if the parent lock is exclusive,
  74.  * it cannot be DupLock()'ed, and so we must store a reference to it.
  75.  * The refcount counts the number of such references, and prevents the
  76.  * lock from going away until after the Close().
  77.  */
  78.  
  79. struct CFSLock
  80.  {
  81.   LONG objtype;
  82.   struct cfsfunctions *f;
  83.   LONG mode;
  84.   struct FileLock *xlock;
  85.   LONG refcount;            /* Currently valid only for XOBJECT's. */
  86.  };
  87.  
  88.  
  89. /* Structure for file handles. */
  90. struct CFSFH
  91.  {
  92.   LONG objtype;
  93.   struct cfsfunctions *f;
  94.   LONG mode;
  95.   struct FileHandle *xfh;
  96.   char *filename;            /* Used when compressing file at Close(). */
  97.   struct CFSLock *parent;   /* Used when compressing file at Close(). */
  98.   /* A non-null 'filename' field means (for xobj's) that Close() will
  99.    * attempt to compress the file. */
  100.  };
  101.  
  102. /* CFSLock filetypes. */
  103. #define XOBJECTB  1      /* A simple handle on an object in ufs. */
  104. /* #define NUKEOBJECTB 2 */   /* The NUKE format (U. Mueller). */
  105. /* #define PPACKOBJB 3   */   /* Files packed with powerpacker. */
  106. #define XPKOBJECTB 4     /* Xpk.library files. */
  107.  
  108. #define XOBJECT     (1 << XOBJECTB)
  109. /* #define NUKEOBJECT  (1 << NUKEOBJECTB) */
  110. /* #define PPACKOBJ    (1 << PPACKOBJB)   */
  111. #define XPKOBJECT   (1 << XPKOBJECTB)
  112.  
  113.  
  114. /* Blocksize to fake in Examine()/ExNext(). */
  115. #define BLOCKSIZE glob->bytesperblock    
  116.  
  117. /* Global datastructure. This allow us to use global variables and still
  118.  * be reentrant without using any kind of short addressing (no need for
  119.  * any __saveds keywords or startup code).
  120.  */
  121. struct glob
  122.  {
  123.   /* Shared data buffers to save on dalloc()'s.*/
  124.   /* Note that care should be taken when using these, since they are*/
  125.   /* shared between a number of functions. A rule of thumb is that a*/
  126.   /* lower level (dosfunc.c) shouldn't use something owned by a*/
  127.   /* higher level (lock.c). This way, a call in lock.c to a function*/
  128.   /* in dosfunc.c won't change your buffer, while a call to another*/
  129.   /* lock.c-function potentially may.*/
  130.     
  131.   char stringbuf[MAXSTRING];        /* Buffer for dosfunctions (bstr conv.) */
  132.   char stringbuf2[MAXSTRING];       /* Buffer for dosfunctions (bstr conv.) */
  133.   char pktstringbuf[MAXSTRING];     /* Buffer for packet bstr->cstr. */
  134.   char pktstringbuf2[MAXSTRING];    /* Buffer for packet bstr->cstr. */
  135.   struct FileInfoBlock fib1;        /* Used during Lock(). */
  136.   struct FileInfoBlock fib2;        /* General high-level in dosfunc.c */
  137.   struct StandardPacket iopkt;      /* This will be long alligned. */
  138.   struct InfoData infodata;
  139.   
  140.   struct MsgPort *dosport,          /* Dos Port (ProcId) of this handler. */
  141.                  *ioport,           /* Port to use for DOS IO. */
  142.                  *xpkport;          /* Port for calling Xpk in KS1.3. */
  143.   struct Task *mytask;              /* Copy of FindTask(0L) */
  144.   struct Process *myproc;
  145.   void *DOSBase;
  146.   struct Library *XpkBase;
  147.   struct Library *IconBase;
  148.   struct DeviceNode *devnode;
  149.   char *devname;
  150.   struct DeviceList *volnode;       /* Pointer to our volumenode. */
  151.   BSTR bcplstartup;                 /* Copy of BPTR to startup string. */
  152.   struct CFSLock *rootlock;         /* Our rootlock. */
  153.   struct FileLock *xrootlock;       /* Rootlock for underlying fs. */
  154.   struct MsgPort *xprocid;          /* ProcID of the underlying fs. */
  155.   LONG ioerr;
  156.   short opencnt;
  157.   BOOL done;                        /* Flag for main packet loop. */
  158.   LONG tmpfilecount;                /* used for tmpfile generation. */
  159.   LONG bytesperblock;               /* Blocksize in the UFS. */
  160.   struct MsgPort *arexxport;
  161.   char *arexxportname;
  162.  
  163.   /* These are options handled by 'options.c'. */
  164.   /* Also read by SetConfigSem() in gui.c. */
  165.   char *badoption;                  /* Name of errorneous option. */
  166.   BOOL optionsset;                  /* True when options has been set. */
  167.   
  168.   BOOL stepdown;                    /* Flag for XpkPack(). */
  169.   BOOL autocompress;                /* Whether to compress on Write(). */
  170.   BOOL xscan;                       /* Whether to create xScan comments. */
  171.   BOOL truncateonpack;              /* Use SetFileSize() when packing? */
  172.   char *packmode;                   /* Packmode for XpkPack(). */
  173.   char *xRootName;                  /* 'True' name of our root dir. */
  174.   char *uservolname;                /* User requested volume name. ONLY
  175.                                      * accessed by createvolnode(). */
  176.   char *xpkpassword;                /* Password used in Xpk(Un)Pack(). */
  177.   BOOL xpksetpri;                   /* Change taskpri when (un)packing? */
  178.   LONG xpkpri;                      /* priority to use if xpksetpri. */
  179.   BOOL createvolnode;               /* Whether se have a volume. *NOTE*: */
  180.                                     /* DON'T CHANGE AFTER createvolnode().*/
  181.   BOOL FailOnExNext;                /* Silently gobble ModifyFIB() errors.*/
  182.   BOOL compressreadwrite;           /* Whether to compress MODE_READWRITE.*/
  183.   BOOL allowappend;                 /* Whether to support MODE_READWRITE.*/
  184.   char *userarexxportname;          /* User requested name of AREXX port. */
  185.   BOOL EnvoyKludge;                 /* Use Kludge for Envoy FS            */
  186.  
  187. #ifdef DEBUG
  188.   /* Extra fields for debug code. */
  189.   char debugbuf1[MAXSTRING];
  190.   char debugbuf2[MAXSTRING];        /* Used to print bcpl strings. */
  191. #endif
  192.  };
  193.  
  194. typedef struct glob *glb;
  195.  
  196.  
  197. /* For each of the supported file formats, there is an instance of this
  198.  * structure. It holds pointers to fuctions that performs tasks such as
  199.  * Read(), Lock(), etc.
  200.  */
  201. struct cfsfunctions
  202.  {
  203. /*********************** Input/Output functions. ************************/
  204.       /* Open file from parent lock of this type and a simple filename
  205.        * (no path specification). This will determine file type and
  206.        * fetch the correct function to actually do the open.
  207.        */
  208.   struct CFSFH * (*Open)(glb, struct CFSLock *, char *, LONG);
  209.      /* Read(), Write(), Seek(), Close() functions. */
  210.   LONG (*Read)(glb, struct CFSFH *, UBYTE *, LONG );
  211.   LONG (*Write)(glb, struct CFSFH *, UBYTE *, LONG );
  212.   LONG (*Seek)(glb, struct CFSFH *, LONG, LONG );
  213.   LONG (*Close)(glb, struct CFSFH *);
  214.   BOOL (*SetFileSize)(glb, struct CFSFH *, LONG, LONG);
  215.   BOOL (*LockRecord)(glb, struct CFSFH *, LONG, LONG, LONG, LONG);
  216.   BOOL (*UnLockRecord)(glb, struct CFSFH *, LONG, LONG);
  217. /*********************** Input/Output functions. ************************/
  218.      /* Lock function. As with Open, the type refers to the parent lock. */
  219.   struct CFSLock * (*Lock)(glb, struct CFSLock *, char *, LONG);
  220.      /* Other functions related to locks. */
  221.   struct CFSLock * (*DupLock)(glb, struct CFSLock *);
  222.   BOOL (*UnLock)(glb, struct CFSLock *);   /* Always succesful. */
  223.   BOOL (*Examine)(glb, struct CFSLock *, struct FileInfoBlock *);
  224.   BOOL (*ExNext)(glb, struct CFSLock *, struct FileInfoBlock *);
  225.   struct CFSLock * (*CreateDir)(glb, struct CFSLock *, char *);
  226.   BOOL (*DeleteFile)(glb, struct CFSLock *, char *);
  227.      /* Rename() is a bit tricky. As an example, how is a Rename()
  228.       * from a powerpacked file to an archive to be handled?
  229.          * The correct Rename() function to call is determined from
  230.          * the type of the FROM directory. Each function must then
  231.          * check the type of the destination directory themselves.
  232.       */
  233.   BOOL (*Rename)(glb, struct CFSLock *, char *, struct CFSLock *, char *);
  234.   struct CFSLock * (*Parent)(glb, struct CFSLock *);
  235.   BOOL (*SetProtection)(glb, struct CFSLock *, char *, LONG);
  236.   BOOL (*SetComment)(glb, struct CFSLock *, char *, char *);
  237.   BOOL (*SetFileDate)(glb, struct CFSLock *, char *, struct DateStamp *);
  238.   struct CFSFH *(*OpenFromLock)(glb, struct CFSLock *);
  239.      /* ToDo: What is SameLock() really supposed to do, packet level?
  240.       * In the CFS, internally, each filetype has a SameLock() that
  241.       * expects two locks of the same type, and returns a bool.
  242.       */
  243.   BOOL (*SameLock)(glb, struct CFSLock *, struct CFSLock *);
  244.      /* ToDo: Support for links also really needs some work... */
  245.   BOOL (*MakeLink)(glb, struct CFSLock *, char *, LONG, LONG);
  246.   LONG (*ReadLink)(glb, struct CFSLock *, char *, char *, ULONG);
  247.   BOOL (*ChangeMode)(glb, LONG, void *, LONG);
  248.   struct CFSLock * (*DupLockFromFH)(glb, struct CFSFH *);
  249.   struct CFSLock * (*ParentOfFH)(glb, struct CFSFH *);
  250.      /* The new 2.0 Examine..() type functions. ExAll() will be
  251.       * simulated if NULL.
  252.       */
  253.   LONG (*ExAll)(glb, struct CFSLock *, char *, LONG, LONG, struct ExAllControl *);
  254.   BOOL (*ExamineFH)(glb, struct CFSFH *, struct FileInfoBlock *);
  255.      /* ToDo: The notify functions still need some thought. Remember,
  256.       * a notify is on an absolute path, not relative to a Lock.
  257.       */
  258.   BOOL (*StartNotify)(glb, struct NotifyRequest *);
  259.   BOOL (*EndNotify)(glb, struct NotifyRequest *);
  260.  };
  261.  
  262. extern struct cfsfunctions Xfunc,Xpkfunc;
  263.  
  264. /* Prototypes. */
  265. /* CFS.c */
  266. struct DosPacket *getpkt(glb);
  267. ULONG getpktsigmask(glb);
  268. struct DosPacket *checkpkt(glb);
  269. void returnpkt(struct DosPacket *,LONG,LONG,glb);
  270. struct MsgPort *DoDeviceProc(LONG *,char *,glb);
  271. BPTR getfile(char *,glb);
  272. void closefile(BPTR,glb);
  273. void addvolnode(glb,struct DeviceList *);
  274. BOOL removevolnode(glb,struct DeviceList *);
  275. void DevNode_Stuff_Startup_String(glb,BSTR);
  276. BOOL createvolnode(glb,BOOL,struct FileInfoBlock *);
  277. BOOL SetVolumeNameVolNode(glb,char *);
  278. BOOL freevolnode(glb);
  279. BOOL diskinfo(glb,struct InfoData *);
  280. void SPrintF(char *,char *,...);
  281.  
  282. /* Packet.c */
  283. void putpkt(struct StandardPacket *,struct MsgPort *,struct MsgPort *,LONG,int,...);
  284. LONG dopkt(struct StandardPacket *,struct MsgPort *,struct MsgPort *,LONG *,LONG,int,...);
  285.  
  286.  
  287. /* dosfunc.c */
  288. struct FileLock *xLock(glb,struct FileLock *, char *name, LONG);
  289. BOOL xExists1(glb,struct FileLock *, char *);
  290. BOOL xExamine(glb, struct FileLock *,struct FileInfoBlock *);
  291. BOOL xExamineNext(glb,struct FileLock *,struct FileInfoBlock *);
  292. BOOL xExamineFH(glb,struct FileHandle *,struct FileInfoBlock *);
  293. struct FileLock *xCreateDir(glb,struct FileLock *, char *);
  294. BOOL xDeleteFile(glb,struct FileLock *, char *);
  295. BOOL xRename(glb,struct FileLock *,char *,struct FileLock *, char *);
  296. struct FileLock *xParentDir(glb,struct FileLock *);
  297. struct FileLock *xParentFH(glb,struct FileHandle *);
  298. BOOL xSetProtection(glb,struct FileLock *,char *,LONG);
  299. BOOL xSetComment(glb,struct FileLock *,char *,char *);
  300. BOOL xSetFileDate(glb,struct FileLock *,char *,struct DateStamp *);
  301. struct FileLock *xDupLock(glb,struct FileLock *);
  302. BOOL xUnLock(glb,struct FileLock *lock);
  303. struct FileHandle *xOpen(glb,struct FileLock *,char *,LONG);
  304. struct FileHandle *xOpenFromLock(glb,struct FileLock *);
  305. struct FileHandle *xOpenFromCopyOfLock(glb,struct FileLock *);
  306. BOOL xClose(glb,struct FileHandle *);
  307. LONG xRead(glb,struct FileHandle *,void *,LONG);
  308. LONG xWrite(glb,struct FileHandle *,void *,LONG);
  309. LONG xSeek(glb,struct FileHandle *,LONG,LONG);
  310. BOOL xChangeMode(glb,ULONG,void *obj,ULONG);
  311. BOOL xInfo(glb,struct FileLock *,struct InfoData *);
  312. BOOL xMakeLink(glb,struct FileLock *,char *,LONG,LONG);
  313. BOOL xReadLink(glb,struct FileLock *,char *,char *,ULONG);
  314. LONG xSameLock(glb,struct FileLock *, struct FileLock *);
  315. BOOL xgetpath(glb,struct FileLock *,char *,int);
  316. BOOL TransformXFH(glb,struct FileHandle *,struct FileLock *,char *,BOOL (*f)(glb,struct FileHandle *,struct FileHandle *,void *),void *userdata);
  317. BOOL TransformFile(glb,struct FileLock *,char *,BOOL (*f)(glb,struct FileHandle *,struct FileHandle *,void *), void *userdata);
  318. LONG xGetFileSize(glb,struct FileHandle *);
  319. BOOL xWriteStr(glb,struct FileHandle *,char *);
  320.  
  321.  
  322. /* misc.c */
  323. char *copybstr(BSTR bstr);
  324. char *copystr(char *str);
  325. void freestr(char *str);
  326. char *safebstr2cinplace(UBYTE *,int);
  327. BSTR safecstr2binplace(char *,int);
  328. LONG ank(glb,...);
  329. LONG ank_fail(glb,...);
  330. LONG owt(glb,...);
  331. LONG abs_seek_pos(LONG,LONG,LONG,LONG);
  332. LONG xFileSizeXfh(glb,struct FileHandle *);
  333.  
  334.  
  335. /* lock.c */
  336. struct CFSLock *RawCFSLock(glb,struct CFSLock *,char *,LONG);
  337. struct FileLock * CreateFileLock(glb,struct CFSLock *);
  338. struct CFSLock *CFSLockParent(glb,struct CFSLock *,char **);
  339. struct CFSLock * CFSLock(glb,struct CFSLock *,char *,LONG);
  340. struct CFSLock *makerootlockdayone(glb);
  341. struct CFSLock *CFSDupLock(glb,struct CFSLock *);
  342. struct CFSLock *CFSParentDir(glb,struct CFSLock *);
  343. struct CFSLock *CFSParentFH(glb,struct CFSFH *);
  344. BOOL CFSUnLock(glb,struct CFSLock *);
  345. BOOL CFSExamine(glb,struct CFSLock *,struct FileInfoBlock *);
  346. BOOL CFSExamineNext(glb,struct CFSLock *,struct FileInfoBlock *);
  347. BOOL CFSExamineFH(glb,struct CFSFH *,struct FileInfoBlock *);
  348. struct CFSLock *CFSCreateDir(glb,struct CFSLock *,char *);
  349. BOOL CFSDeleteFile(glb,struct CFSLock *, char *);
  350. BOOL CFSRename(glb,struct CFSLock *,char *,struct CFSLock *,char *);
  351. BOOL CFSSetProtection(glb,struct CFSLock *,char *,LONG);
  352. BOOL CFSSetComment(glb,struct CFSLock *,char *name,char *comment);
  353. BOOL CFSSetDate(glb,struct CFSLock *,char *,struct DateStamp *);
  354. BOOL CFSMakeLink(glb,struct CFSLock *,char *,LONG,LONG);
  355. BOOL CFSReadLink(glb,struct CFSLock *,char *,char *,ULONG);
  356. BOOL CFSSameLock(glb,struct CFSLock *,struct CFSLock *);
  357.  
  358.  
  359. /* file.c */
  360. struct CFSFH *RawCFSOpen(glb,struct CFSLock *,char *,LONG mode);
  361. struct CFSFH *CFSOpen(glb,struct CFSLock *,char *,LONG);
  362. BOOL CFSClose(glb,struct CFSFH *);
  363. LONG CFSRead(glb,struct CFSFH *,void *,LONG);
  364. LONG CFSWrite(glb,struct CFSFH *,void *,LONG);
  365. LONG CFSSeek(glb,struct CFSFH *,LONG,LONG);
  366.  
  367. /* pack.c */
  368. LONG xFileType(glb,struct FileHandle *);
  369.  
  370. /* xobj.c */
  371. struct XpkFH *XpkOpenOldFile(glb,struct FileHandle *);
  372. LONG XObjClose(glb,struct CFSFH *);
  373. LONG XObjRead(glb,struct CFSFH *,UBYTE *,LONG);
  374. LONG XObjWrite(glb,struct CFSFH *,UBYTE *,LONG);
  375. LONG XObjSeek(glb,struct CFSFH *,LONG,LONG);
  376. void XObjStealXpkFH(glb,struct CFSFH *);
  377. BOOL XObjStuffFH(glb,struct CFSFH *,char *,struct CFSLock *);
  378. void XObjUnStuffFH(glb,struct CFSFH *);
  379. void XObjFreeFH(glb,struct CFSFH *);
  380. struct CFSFH *XObjCreateFH(glb,struct FileHandle *,LONG,char *,struct CFSLock *);
  381. struct CFSLock *XObjMakeLock(glb,struct FileLock *,LONG);
  382. struct CFSLock *XObjDupLock(glb,struct CFSLock *);
  383. void XObjAddReferenceToLock(glb,struct CFSLock *);
  384. struct CFSLock *XObjParentDir(glb,struct CFSLock *);
  385. struct CFSLock *XObjParentFH(glb,struct CFSFH *);
  386. BOOL XObjUnLock(glb,struct CFSLock *);
  387. BOOL XObjSameLock(glb,struct CFSLock *,struct CFSLock *);
  388. BOOL XObjMakeLink(glb,struct CFSLock *,char *,LONG,LONG);
  389. BOOL XObjReadLink(glb,struct CFSLock *,char *,char *,ULONG);
  390. BOOL XObjExamine(glb,struct CFSLock *,struct FileInfoBlock *);
  391. BOOL XObjExNext(glb,struct CFSLock *,struct FileInfoBlock *);
  392. BOOL XObjExamineFH(glb,struct CFSFH *,struct FileInfoBlock *);
  393. BOOL ModifyFIB(glb,struct CFSLock *,struct FileInfoBlock *);
  394. BOOL XObjModifyFIB(glb,struct CFSLock *,struct FileInfoBlock *,struct FileHandle *);
  395. struct CFSLock *XObjCreateDir(glb,struct CFSLock *,char *);
  396. BOOL XObjSetProtection(glb,struct CFSLock *,char *,LONG);
  397. BOOL XObjSetComment(glb,struct CFSLock *,char *,char *);
  398. BOOL XObjSetFileDate(glb,struct CFSLock *,char *,struct DateStamp *);
  399. BOOL XObjDeleteFile(glb,struct CFSLock *,char *);
  400. BOOL XObjRename(glb,struct CFSLock *,char *,struct CFSLock *,char *);
  401.  
  402.  
  403. /* xpk.c */
  404. struct XpkLock;
  405.  
  406. struct XpkFH *XpkOpenOldFile(glb,struct FileHandle *);
  407. struct XpkFH *XpkOpenOldFileFromCopyOfLock(glb,struct XpkLock *);
  408. BOOL IsXpkFile(glb,struct FileHandle *);
  409. BOOL PackFile2File(glb,struct FileHandle *,struct FileHandle *,void *);
  410. BOOL UnPackFile2File(glb,struct FileHandle *,struct FileHandle *,void *);
  411. BOOL XpkExamine_FH(glb,struct FileHandle *,struct XpkFib *);
  412. LONG Xpk_Read(glb,struct XpkFH *,UBYTE *buf,LONG);
  413. LONG Xpk_Write(glb,struct XpkFH *,UBYTE *buf,LONG);
  414. LONG Xpk_Seek(glb,struct XpkFH *,LONG pos,LONG offset );
  415. BOOL Xpk_Close(glb,struct XpkFH *);
  416. struct XpkLock *XpkMakeLock(glb,struct FileLock *,LONG);
  417. struct XpkLock *XpkDupLock(glb,struct XpkLock *);
  418. struct CFSLock *XpkParentDir(glb,struct XpkLock *);
  419. struct CFSLock *XpkParentFH(glb,struct XpkFH *);
  420. BOOL XpkUnLock(glb,struct XpkLock *);
  421. BOOL XpkSameLock(glb,struct XpkLock *,struct XpkLock *);
  422. BOOL XpkObjExamine(glb,struct XpkLock *,struct FileInfoBlock *);
  423. BOOL XpkObjExamineFH(glb,struct XpkFH *,struct FileInfoBlock *);
  424. BOOL XpkModifyFIB(glb,struct XpkLock *,struct FileInfoBlock *,struct FileHandle *);
  425. BOOL XpkFastModifyFIB(struct FileInfoBlock *);
  426. BOOL InitXpk(glb);
  427. void CleanupXpk(glb);
  428. void xScan(glb,struct FileLock *,char *);
  429.  
  430. /* packfunc.c */
  431. BOOL ModifyFIB_type(glb,LONG,struct CFSLock *,struct FileInfoBlock *,struct FileHandle *);
  432.  
  433.  
  434. /* options.c */
  435. BOOL set_option(glb,char *);
  436. BOOL InitOptions(glb);
  437. void CleanupOptions(glb);
  438. BOOL SetOptionPermanent(glb,char *,char *);
  439. BOOL SetOptionsFromFile(glb,struct FileLock *,char *);
  440.  
  441.  
  442. /* arexx.c */
  443. void checkarexxmsg(glb);
  444. ULONG arexxsigmask(glb);
  445. BOOL InitArexx(glb);
  446. void CleanupArexx(glb);
  447.  
  448.  
  449. /* gui.c */
  450. BOOL UpdateXFHNode(glb);
  451. ULONG guisigmask(glb);
  452.  
  453.  
  454. /* End of CFS.h */
  455.