Subversion Repositories SvarDOS

Compare Revisions

No changes between revisions

Ignore whitespace Rev 964 → Rev 965

/svarcom/trunk/tlumacz/tlumacz.txt
File deleted
/svarcom/trunk/tlumacz/makefile
File deleted
/svarcom/trunk/tlumacz/tlumacz.c
File deleted
/svarcom/trunk/tlumacz/lang/french.txt
File deleted
/svarcom/trunk/tlumacz/lang/english.txt
File deleted
/svarcom/trunk/tlumacz/lang/polish.txt
File deleted
/svarcom/trunk/tlumacz/nlsgen.bat
File deleted
/svarcom/trunk/helpers.c
30,13 → 30,16
#include <stdio.h> /* sprintf() */
#include <string.h> /* memcpy() */
 
#include "deflang.h"
 
#include "env.h"
 
#include "helpers.h"
 
 
/* supplied through DEFLANG.C */
extern char svarlang_mem[];
extern const unsigned short svarlang_memsz;
 
 
/* case-insensitive comparison of strings, compares up to maxlen characters.
* returns non-zero on equality. */
int imatchlim(const char *s1, const char *s2, unsigned short maxlen) {
108,15 → 111,14
 
 
static const char *nlsblock_findstr(unsigned short id) {
const char *ptr = langblock + 4; /* first 4 bytes are lang id and lang len */
const char *ptr = svarlang_mem;
/* find the string id in langblock memory */
for (;;) {
if (((unsigned short *)ptr)[0] == id) {
ptr += 3;
return(ptr);
return(ptr + 4);
}
if (ptr[2] == 0) return(NULL);
ptr += ptr[2] + 3;
ptr += ((unsigned short *)ptr)[1] + 4;
}
}
 
626,29 → 628,28
}
 
 
/* reload nls ressources from svarcom.lng into langblock */
/* reload nls ressources from svarcom.lng into svarlang_mem */
void nls_langreload(char *buff, unsigned short env) {
unsigned short i;
const char far *nlspath;
char *langblockptr = langblock;
char *langblockptr = svarlang_mem;
unsigned short lang;
unsigned short errcode = 0;
static unsigned short lastlang;
 
/* look up the LANG env variable, upcase it and copy to lang */
nlspath = env_lookup_val(env, "LANG");
if ((nlspath == NULL) || (nlspath[0] == 0)) return;
buff[0] = nlspath[0];
buff[1] = nlspath[1];
buff[0] = nlspath[0] & 0xDF;
buff[1] = nlspath[1] & 0xDF;
buff[2] = 0;
 
if (buff[0] >= 'a') buff[0] -= 'a' - 'A';
if (buff[1] >= 'a') buff[1] -= 'a' - 'A';
memcpy(&lang, buff, 2);
 
/* check if there is need to reload at all */
if (((unsigned short *)langblock)[0] == lang) return;
if (lastlang == lang) return;
 
/* printf("NLS RELOAD (curlang=%04X ; toload=%04X\r\n", ((unsigned short *)langblock)[0], lang); */
/* printf("NLS RELOAD (curlang=%04X ; toload=%04X\r\n", lastlang, lang); */
 
nlspath = env_lookup_val(env, "NLSPATH");
if ((nlspath == NULL) || (nlspath[0] == 0)) return;
662,7 → 663,7
/* append "svarcom.lng" */
strcpy(buff + i, "SVARCOM.LNG");
 
/* copy file content to langblock */
/* copy file content to svarlang_mem */
_asm {
push ax
push bx
737,13 → 738,8
 
LOADSTRINGS:
 
/* copy langid and langlen to langblockptr */
/* read strings (buff+2 bytes) into langblock */
mov di, langblockptr
mov ax, [si]
stosw /* mov [di], ax and di += 2 */
mov ax, [si+2]
stosw
/* read strings (buff+2 bytes) into langblock */
mov ah, 0x3f /* Read from File via Handle in BX */
mov cx, [si+2]
mov dx, di
776,7 → 772,7
pop ax
}
 
if (errcode != 0) printf("AX=%04x\r\n", errcode);
if (errcode == 0) lastlang = lang;
}
 
 
/svarcom/trunk/lang/en-utf8.txt
0,0 → 1,67
#
# SvarCOM translation file
# Lang: ENGLISH
#
# Autor: Mateusz Viste
#
 
# GENERIC MESSAGES USED BY MULTIPLE INTERNAL COMMANDS
0.1:Invalid syntax
0.2:Invalid switch
0.3:Invalid parameter format
0.4:Too many parameters
 
# PAUSE
15.0:Suspends the execution of a batch script
15.1:Press any key to continue...
 
# SHIFT
16.0:Changes the position of arguments in a batch file:
16.1:Argument %1 becomes %0, argument %2 becomes %1, etc.
 
# GOTO
17.0:Directs batch processing to a labelled line in the batch program.
17.1:GOTO LABEL
17.2:LABEL specifies a text string used in the batch program as a label.
17.3:A label is on a line by itself and must be preceded by a colon.
17.10:Label not found
 
# DOS ERRORS
255.1:Function number invalid
255.2:File not found
255.3:Path not found
255.4:Too many open files (no handles available)
255.5:Access denied
255.6:Invalid handle
255.7:Memory control block destroyed
255.8:Insufficient memory
255.9:Memory block address invalid
255.10:Environment invalid
255.11:Format invalid
255.12:Access code invalid
255.13:Data invalid
255.15:Invalid drive
255.16:Attempted to remove current directory
255.17:Not same device
255.18:No more files
255.19:Disk write-protected
255.20:Unknown unit
255.21:Drive not ready
255.22:Unknown command
255.23:Data error (CRC)
255.24:Bad request structure length
255.25:Seek error
255.26:Unknown media type (non-DOS disk)
255.27:Sector not found
255.28:Printer out of paper
255.29:Write fault
255.30:Read fault
255.31:General failure
255.32:Sharing violation
255.33:Lock violation
255.34:Disk change invalid
255.35:FCB unavailable
255.36:Sharing buffer overflow
255.37:Code page mismatch
255.38:Cannot complete file operations (EOF / out of input)
255.39:Insufficient disk space
/svarcom/trunk/lang/fr-utf8.txt
0,0 → 1,14
#
# SvarCOM translation file
# Lang: FRENCH
#
# Translator: Mateusz Viste
#
 
# PAUSE
15.0:Suspends l'exécution d'un programme batch
15.1:Appuyez sur une touche pour continuer...
 
# SHIFT
16.0:Change la position des arguments dans un fichier batch:
16.1:L'argument %1 devient %0, l'argument %2 devient %1, etc.
/svarcom/trunk/lang/pl-utf8.txt
0,0 → 1,67
#
# SvarCOM translation file
# Lang: POLISH
#
# Translator: Mateusz Viste
#
 
# GENERIC MESSAGES USED BY MULTIPLE INTERNAL COMMANDS
0.1:Nieprawidłowa składnia
0.2:Nieprawidłowy przełącznik
0.3:Nieprawidłowy format parametru
0.4:Zbyt duża ilość parametrów
 
# PAUSE
15.0:Wstrzymuje przetwarzanie pliku wsadowego
15.1:Naciśnij dowolny klawisz aby kontynuować...
 
# SHIFT
16.0:Zmienia pozycję argumentów w pliku wsadowym:
16.1:Argument %1 staje się %0, argument %2 staje się %1, itd.
 
# GOTO
17.0:Kieruje przetwarzanie do wiersza o określonej etykiecie w programie wsadowym.
17.1:GOTO ETYKIETA
17.2:ETYKIETA to ciąg znaków wykorzystany przez program wsadowy jako etykieta.
17.3:Etykieta znajduje się w osobnym wierszu i jest poprzedzona dwukropkiem.
17.10:Nie znaleziono etykiety
 
# DOS ERRORS
255.1:Błędny numer funkcji
255.2:Nie znaleziono pliku
255.3:Nie znaleziono ścieżki
255.4:Zbyt wiele otwartych plików (brak dostępnych uchwytów)
255.5:Brak dostępu
255.6:Nieprawidłowy uchwyt
255.7:Zniszczony blok kontroli pamięci
255.8:Niewystarczająca pamięć
255.9:Nieprawidłowy adres bloku pamięci
255.10:Nieprawidłowe środowisko
255.11:Nieprawidłowy format
255.12:Nieprawidłowy kod dostepu
255.13:Nieprawidłowe dane
255.15:Nieprawidłowy napęd
255.16:Dokonano próby usunięcia bieżącego katalogu
255.17:Nie to samo urządzenie
255.18:Brak dalszych plików
255.19:Dysk chroniony przed zapisem
255.20:Nieznana jednostka
255.21:Napęd nie jest gotowy
255.22:Nieznane polecenie
255.23:Błąd danych (CRC)
255.24:Nieprawidłowa długość struktury zapytania
255.25:Błąd wyszukiwania
255.26:Nieznany typ nośnika (dysk niezgodny z DOS)
255.27:Nie znaleziono sektora
255.28:Brak papieru w drukarce
255.29:Błąd zapisu
255.30:Błąd odczytu
255.31:Ogólna awaria
255.32:Naruszenie zasad współdzielenia
255.33:Naruszenie blokady
255.34:Nieprawidłowa zmiana dysku
255.35:Niedostępne FCB
255.36:Przepełnienie bufora udostępniania
255.37:Niezgodność strony kodowej
255.38:Nie można ukończyć operacji na pliku (EOF / brak danych wejściowych)
255.39:Za mało miejsca na dysku
/svarcom/trunk/makefile
27,7 → 27,18
all: command.com
 
command.com: rmodcore.h command.obj cmd.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
*wcl $(LDFLAGS) command.obj cmd.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
# GENERATE CODEPAGE-SPECIFIG VERSIONS OUT OF UTF-8 FILES
CD LANG
utf8tocp 437 EN-UTF8.TXT > EN.TXT
utf8tocp 850 FR-UTF8.TXT > FR.TXT
utf8tocp maz PL-UTF8.TXT > PL.TXT
..\svarlang.lib\tlumacz en fr pl
DEL ??.TXT
MOVE /Y OUT.LNG ..\SVARCOM.LNG
MOVE /Y DEFLANG.C ..
CD ..
# build the final executable
*wcl $(LDFLAGS) command.obj cmd.obj deflang.c env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
 
cmd.obj: cmd.c cmd\*.c
wcc $(CFLAGS) cmd.c
35,7 → 46,7
command.obj: command.c rmodcore.h
wcc $(CFLAGS) command.c
 
helpers.obj: helpers.c deflang.h
helpers.obj: helpers.c
wcc $(CFLAGS) helpers.c
 
.c.obj:
44,9 → 55,6
rmodcore.h: file2c.com rmod.bin
file2c /s /l4096 rmod.bin rmodcore.h BUFFER
 
deflang.h: file2c.com tlumacz\default.lng
file2c /l4096 tlumacz\default.lng deflang.h langblock
 
file2c.com: file2c.c
wcl $(LDFLAGS) file2c.c
 
59,23 → 67,9
del rmod.bin
del rmod.lst
del rmodcore.h
del deflang.h
del deflang.c
del command.map
 
pkg: svarcom.zip
 
svarcom.zip: command.com
zip -9kDX -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
mkdir source
copy makefile source\
copy *.c source\
copy *.h source\
copy *.txt source\
copy *.asm source\
mkdir source\cmd
copy cmd\*.* source\cmd\
mkdir source\tlumacz
copy tlumacz\*.* source\tlumacz\
mkdir source\tlumacz\lang
copy tlumacz\lang\*.* source\tlumacz\lang\
zip -9rkDX -m svarcom.zip source
release: command.com
#zip -9kDX -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
zip -9rkDX svarcom.zip makefile *.c *.h *.txt *.asm cmd lang svarlang.lib
/svarcom/trunk/svarlang.lib
0,0 → 1,0
link ../../svarlang.lib
Property changes:
Added: svn:special
+*
\ No newline at end of property