Subversion Repositories SvarDOS

Rev

Rev 369 | Rev 389 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 388
Line 11... Line 11...
11
void output_internal(const char *s, unsigned short nl);
11
void output_internal(const char *s, unsigned short nl);
12
 
12
 
13
#define output(x) output_internal(x, 0)
13
#define output(x) output_internal(x, 0)
14
#define outputnl(x) output_internal(x, 1)
14
#define outputnl(x) output_internal(x, 1)
15
 
15
 
-
 
16
/*
-
 
17
 * FileInfoRec (DTA) format:
-
 
18
 * offset size desc
-
 
19
 *    +0   21  reserved
-
 
20
 *  +15h    1  file attr (1=RO 2=Hidden 4=System 8=VOL 16=DIR 32=Archive
-
 
21
 *  +16h    2  time: bits 0-4=bi-seconds (0-30), bits 5-10=minutes (0-59), bits 11-15=hour (0-23)
-
 
22
 *  +18h    2  date: bits 0-4=day(0-31), bits 5-8=month (1-12), bits 9-15=years since 1980
-
 
23
 *  +1ah    4  DWORD file size, in bytes
-
 
24
 *  +1eh   13  13-bytes max ASCIIZ filename
-
 
25
 */
-
 
26
_Packed struct DTA {
-
 
27
  char reserved[21];
-
 
28
  unsigned char attr;
-
 
29
  unsigned short time;
-
 
30
  unsigned short date;
-
 
31
  unsigned long size;
-
 
32
  char fname[13];
-
 
33
};
-
 
34
 
-
 
35
/* find first matching files using a FindFirst DOS call
-
 
36
 * returns 0 on success or a DOS err code on failure */
-
 
37
unsigned short findfirst(struct DTA *dta, const char *pattern, unsigned short attr);
-
 
38
 
-
 
39
/* find next matching, ie. continues an action intiated by findfirst() */
-
 
40
unsigned short findnext(struct DTA *dta);
-
 
41
 
16
#endif
42
#endif