/sved/trunk/mdr/inc/mdr/dos.h |
---|
47,6 → 47,10 |
* always terminated with a backslash separator, unless it is an empty string */ |
unsigned char mdr_dos_exepath(char *path); |
/* returns a far pointer to the full path and filename of the running program. |
* returns NULL on error. */ |
const char far *mdr_dos_selfexe(void); |
/* converts a "DOS format" 16-bit packed date into a standard (time_t) |
* unix timestamp. A DOS date is a 16-bit value: |
* YYYYYYYM MMMDDDDD |
/sved/trunk/mdr/mdrs2023.lib |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/sved/trunk/sved.c |
---|
836,8 → 836,16 |
struct file *db = dbarr; /* visible file is the first slot by default */ |
{ |
char nlspath[128], lang[8]; |
svarlang_autoload_pathlist("sved", mdr_dos_getenv(nlspath, "NLSPATH", sizeof(nlspath)), mdr_dos_getenv(lang, "LANG", sizeof(lang))); |
unsigned short i = 0; |
const char far *selfptr; |
char self[128], lang[8]; |
selfptr = mdr_dos_selfexe(); |
if (selfptr != NULL) { |
do { |
self[i] = selfptr[i]; |
} while (self[i++] != 0); |
svarlang_autoload_exepath(self, mdr_dos_getenv(lang, "LANG", sizeof(lang))); |
} |
} |
/* preload all slots with empty files */ |