//localcfg/trunk/TODO |
---|
File deleted |
//localcfg/trunk/country.c |
---|
66,10 → 66,10 |
fclose(fd); |
/* check that it's a country file - should start with 0xFF COUNTRY 0x00 */ |
if (memcmp(filebuff, "\377COUNTRY\0", 9) != 0) return(-2); |
if (memcmp(filebuff, "\377COUNTRY\0", 9) != 0) return(COUNTRY_ERR_INV_FORMAT); |
/* check that it's one of my country.sys files - should contain a trailer */ |
if (memcmp(filebuff + filesize - 8, "LOCALCFG", 8) != 0) return(-3); |
if (memcmp(filebuff + filesize - 8, "LOCALCFG", 8) != 0) return(COUNTRY_ERR_NOT_LOCALCFG); |
/* read the offset of the entries index - must be at least 23 */ |
functiondata = filebuff + 19; |
//localcfg/trunk/country.h |
---|
17,8 → 17,9 |
COUNTRY_TIME24 = 1 /* 24h format (like 18:32) */ |
}; |
#define COUNTRY_ERR_INV_FORMAT -86 |
#define COUNTRY_ERR_NOT_LOCALCFG -87 |
struct country { |
struct { |
//localcfg/trunk/history.txt |
---|
3,6 → 3,7 |
* localcfg ver 20220203 |
- NLS (translations) support through the SvarLANG library |
- memory usage optimizations |
- extra error messages |
* localcfg ver 20220202 (merged into the SvarDOS project) |
- country.sys path is optional, defaults to %DOSDIR%\CFG\COUNTRY.SYS |
//localcfg/trunk/localcfg.c |
---|
72,7 → 72,9 |
NLS_ERR_FILEPATHTWICE = 0x0900, |
NLS_ERR_BADPATH = 0x0901, |
NLS_ERR_READFAIL = 0x0902, |
NLS_ERR_INVPARAM = 0x0903 |
NLS_ERR_INVPARAM = 0x0903, |
NLS_ERR_INVFORMAT = 0x0904, |
NLS_ERR_NOTLOCALCFG = 0x0905 |
}; |
412,7 → 414,13 |
x = country_read(&cntdata, fname); |
if (x != 0) { |
nls_puts(NLS_ERR_READFAIL); |
if (x == COUNTRY_ERR_INV_FORMAT) { |
nls_puts(NLS_ERR_INVFORMAT); |
} else if (x == COUNTRY_ERR_NOT_LOCALCFG) { |
nls_puts(NLS_ERR_NOTLOCALCFG); |
} else { |
nls_puts(NLS_ERR_READFAIL); |
} |
return(2); |
} |
//localcfg/trunk/nls_lang/en.txt |
---|
47,7 → 47,9 |
### ERROR MESSAGES ######################################################## |
9.0:ERROR: file path can be provided only once. |
9.0:ERROR: file path can be provided only once |
9.1:ERROR: bad path to file |
9.2:ERROR: failed to read the file |
9.3:ERROR: invalid parameter syntax |
9.4:ERROR: the file is not a valid COUNTRY.SYS |
9.5:ERROR: the file has not been created with LOCALCFG |
//localcfg/trunk/nls_lang/pl_utf8.txt |
---|
47,7 → 47,9 |
### ERROR MESSAGES ######################################################## |
9.0:BŁĄD: ścieżka do pliku może zostać podana tylko raz. |
9.1:BŁĄD: zła ścieżka do pliku. |
9.2:BŁĄD: nie zdołano wczytać pliku. |
9.3:BŁĄD: nieprawidłowa składnia parametru. |
9.0:BŁĄD: ścieżka do pliku może zostać podana tylko raz |
9.1:BŁĄD: zła ścieżka do pliku |
9.2:BŁĄD: nie zdołano wczytać pliku |
9.3:BŁĄD: nieprawidłowa składnia parametru |
9.4:BŁĄD: plik nie jest prawidłowym plikiem COUNTRY.SYS |
9.5:BŁĄD: plik nie został stworzony za pomocą LOCALCFG |