Subversion Repositories SvarDOS

Rev

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

Rev 416 Rev 420
Line 24... Line 24...
24
 *  +1eh   13  13-bytes max ASCIIZ filename
24
 *  +1eh   13  13-bytes max ASCIIZ filename
25
 */
25
 */
26
_Packed struct DTA {
26
_Packed struct DTA {
27
  char reserved[21];
27
  char reserved[21];
28
  unsigned char attr;
28
  unsigned char attr;
-
 
29
  unsigned short time_sec2:5;
29
  unsigned short time;
30
  unsigned short time_min:6;
-
 
31
  unsigned short time_hour:5;
-
 
32
  unsigned short date_dy:5;
-
 
33
  unsigned short date_mo:4;
30
  unsigned short date;
34
  unsigned short date_yr:7;
31
  unsigned long size;
35
  unsigned long size;
32
  char fname[13];
36
  char fname[13];
33
};
37
};
34
 
38
 
-
 
39
 
-
 
40
/* this is also known as the "Country Info Block" or "CountryInfoRec":
-
 
41
 * offset size desc
-
 
42
 *   +0      2   wDateFormat  0=USA (m d y), 1=Europe (d m y), 2=Japan (y m d)
-
 
43
 *   +2      5  szCrncySymb  currency symbol (ASCIIZ)
-
 
44
 *   +7      2  szThouSep    thousands separator (ASCIIZ)
-
 
45
 *   +9      2  szDecSep     decimal separator (ASCIIZ)
-
 
46
 * +0bH      2  szDateSep    date separator (ASCIIZ)
-
 
47
 * +0dH      2  szTimeSep    time separator (ASCIIZ)
-
 
48
 * +0fH      1  bCrncyFlags  currency format flags
-
 
49
 * +10H      1  bCrncyDigits decimals digits in currency
-
 
50
 * +11H      1  bTimeFormat  time format 0=12h 1=24h
-
 
51
 * +12H      4  pfCasemap    Casemap FAR call address
-
 
52
 * +16H      2  szDataSep    data list separator (ASCIIZ)
-
 
53
 * +18H     10  res          reserved zeros
-
 
54
 *          34               total length
-
 
55
 */
-
 
56
_Packed struct nls_patterns {
-
 
57
  unsigned short dateformat;
-
 
58
  char currency[5];
-
 
59
  char thousep[2];
-
 
60
  char decsep[2];
-
 
61
  char datesep[2];
-
 
62
  char timesep[2];
-
 
63
  unsigned char currflags;
-
 
64
  unsigned char currdigits;
-
 
65
  unsigned char timefmt;
-
 
66
  void far *casemapfn;
-
 
67
  char datalistsep[2];
-
 
68
  char reserved[10];
-
 
69
};
-
 
70
 
-
 
71
 
35
#define DOS_ATTR_RO   1
72
#define DOS_ATTR_RO   1
36
#define DOS_ATTR_HID  2
73
#define DOS_ATTR_HID  2
37
#define DOS_ATTR_SYS  4
74
#define DOS_ATTR_SYS  4
38
#define DOS_ATTR_VOL  8
75
#define DOS_ATTR_VOL  8
39
#define DOS_ATTR_DIR 16
76
#define DOS_ATTR_DIR 16
Line 87... Line 124...
87
 
124
 
88
/* get current path drive d (A=1, B=2, etc - 0 is "current drive")
125
/* get current path drive d (A=1, B=2, etc - 0 is "current drive")
89
 * returns 0 on success, doserr otherwise */
126
 * returns 0 on success, doserr otherwise */
90
unsigned short curpathfordrv(char *buff, unsigned char d);
127
unsigned short curpathfordrv(char *buff, unsigned char d);
91
 
128
 
-
 
129
/* fills a nls_patterns struct with current NLS patterns, returns 0 on success, DOS errcode otherwise */
-
 
130
unsigned short nls_getpatterns(struct nls_patterns *p);
-
 
131
 
-
 
132
/* computes a formatted date based on NLS patterns found in p
-
 
133
 * returns length of result */
-
 
134
unsigned short nls_format_date(char *s, unsigned short yr, unsigned char mo, unsigned char dy, const struct nls_patterns *p);
-
 
135
 
-
 
136
/* computes a formatted time based on NLS patterns found in p
-
 
137
 * returns length of result */
-
 
138
unsigned short nls_format_time(char *s, unsigned char ho, unsigned char mn, const struct nls_patterns *p);
-
 
139
 
-
 
140
/* computes a formatted integer number based on NLS patterns found in p
-
 
141
 * returns length of result */
-
 
142
unsigned short nls_format_number(char *s, long num, const struct nls_patterns *p);
-
 
143
 
92
#endif
144
#endif