home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / fm2000 / fmdos.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-02-04  |  2.6 KB  |  77 lines

  1. /*
  2.      Filemaster - Multitasking directory utility.
  3.      Copyright (C) 2000  Toni Wilen
  4.      
  5.      This program is free software; you can redistribute it and/or
  6.      modify it under the terms of the GNU General Public License
  7.      as published by the Free Software Foundation; either version 2
  8.      of the License, or (at your option) any later version.
  9.      
  10.      This program is distributed in the hope that it will be useful,
  11.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.      GNU General Public License for more details.
  14.      
  15.      You should have received a copy of the GNU General Public License
  16.      along with this program; if not, write to the Free Software
  17.      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19.  
  20. #include <exec/types.h>
  21.  
  22. WORD currentdir(struct FMList*);
  23. void closefile(struct FMHandle*);
  24. LONG seek(struct FMHandle*,LONG,LONG);
  25. LONG readfile(struct FMHandle*);
  26. LONG readbufferfile(struct FMHandle*,void*,LONG);
  27. LONG writefile(struct FMHandle*,void*,LONG);
  28. struct FMHandle* openfile(struct FMList*,UBYTE*,ULONG);
  29. BPTR fmlock(struct FMList*,UBYTE*);
  30. WORD fmexamine(struct FMList*,BPTR,struct FileInfoBlock*,UBYTE*);
  31. WORD fmexaminefile(struct FMList*,struct FileInfoBlock*,UBYTE*);
  32. WORD fmexnext(struct FMList*,BPTR,struct FileInfoBlock*);
  33. WORD fmsetfiledate(struct FMList*,UBYTE*,struct DateStamp*);
  34. WORD fmfiledate(struct FMList*,struct FMNode*,ULONG);
  35. WORD fmsetcomment(struct FMList*,UBYTE*,UBYTE*);
  36. WORD fmcomment(struct FMList*,struct FMNode*,UBYTE*);
  37. WORD fmsetrename(struct FMList*,UBYTE*,UBYTE*);
  38. WORD fmrename(struct FMList*,struct FMNode*,UBYTE*);
  39. WORD fmsetprotection(struct FMList*,UBYTE*,ULONG);
  40. WORD fmprotect(struct FMList*,struct FMNode*,ULONG);
  41. struct FMNode* fmcreatedir(struct FMList*,UBYTE*);
  42. WORD examinefile(struct FMList*,struct FMNode*); //update node's attributes
  43. BPTR fminitdirread(struct FMList*,struct FileInfoBlock*,UBYTE*);
  44. void *allocmem(LONG);
  45. void freemem(void*);
  46. void *allocvec(struct FMList*,LONG,LONG);
  47. void *allocvecpooled(LONG);
  48. void freevecpooled(void*);
  49. struct IORequest* opendevice(struct FMList*,UBYTE*,WORD,ULONG,WORD);
  50. void closedevice(struct IORequest*);
  51. WORD checkdoserr(void);
  52. void dirmeters(void);
  53. void updadirmeter(struct FMList*);
  54.  
  55. #define OFNORMAL 0x01
  56. #define OFBUFFER 0x80000000
  57. #define OFDECRUNCH 0x04
  58. #define OFWRITE 0x10
  59. #define OFFAKE 0x20
  60. #define OFRELAXED 0x40
  61.  
  62. struct FMHandle {
  63.     BPTR    handle;
  64.     UBYTE    *filename;
  65.     UBYTE    *path;    
  66.     LONG    bufsize;
  67.     LONG    decbufsize;
  68.     UBYTE    *buffer;
  69.     UBYTE    *decbuffer;
  70.     LONG    position;
  71.     LONG    size;
  72.     WORD    flags;
  73.     struct    FMList *owner;
  74.     LONG    date;
  75. };
  76.  
  77.