Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1628 → Rev 1629

/svarcom/trunk/helpers.c
1,7 → 1,7
/* This file is part of the SvarCOM project and is published under the terms
* of the MIT license.
*
* Copyright (C) 2021-2022 Mateusz Viste
* Copyright (C) 2021-2024 Mateusz Viste
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
648,9 → 648,10
 
/* reload nls ressources from svarcom.lng into svarlang_mem */
void nls_langreload(char *buff, unsigned short env) {
const char far *nlspath;
const char far *dosdir;
const char far *lang;
static unsigned short lastlang;
unsigned short dosdirlen;
 
/* look up the LANG env variable, upcase it and copy to lang */
lang = env_lookup_val(env, "LANG");
662,11 → 663,21
if (memcmp(&lastlang, buff, 2) == 0) return;
 
buff[4] = 0;
nlspath = env_lookup_val(env, "NLSPATH");
if (nlspath != NULL) _fstrcpy(buff + 4, nlspath);
dosdir = env_lookup_val(env, "DOSDIR");
if (dosdir == NULL) return;
 
if (svarlang_load("SVARCOM", buff, buff + 4) != 0) return;
_fstrcpy(buff + 4, dosdir);
dosdirlen = strlen(buff + 4);
if (buff[4 + dosdirlen - 1] == '\\') dosdirlen--;
memcpy(buff + 4 + dosdirlen, "\\SVARCOM.LNG", 13);
 
/* try loading %DOSDIR%\SVARCOM.LNG */
if (svarlang_load(buff + 4, buff) != 0) {
/* failed! try %DOSDIR%\BIN\SVARCOM.LNG now */
memcpy(buff + 4 + dosdirlen, "\\BIN\\SVARCOM.LNG", 17);
if (svarlang_load(buff + 4, buff) != 0) return;
}
 
_fmemcpy(&lastlang, lang, 2);
}
 
/svarcom/trunk/helpers.h
1,7 → 1,7
/* This file is part of the SvarCOM project and is published under the terms
* of the MIT license.
*
* Copyright (C) 2021 Mateusz Viste
* Copyright (C) 2021-2024 Mateusz Viste
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
/svarcom/trunk/history.txt
11,6 → 11,7
- EDR-DOS compatibility fixes: resident module's PSP is being patched with
cleared JFTs and its parent fields are rewired to SvarCOM. Many thanks to
E.C. Masloch (pushbx) for suggesting this.
- updated SvarLANG.lib to ver 20230730
 
 
=== ver 2023.1 (17.02.2023) ==================================================
/svarcom/trunk/makefile
84,16 → 84,16
zip -9rkDX svarcom.zip makefile *.c *.h *.txt *.asm cmd lang svarlang.lib
# SvarDOS binary package
mkdir appinfo
mkdir bin
mkdir doc
mkdir doc\svarcom
mkdir nls
copy command.com bin
copy *.txt doc\svarcom\
copy svarcom.lsm appinfo\
copy svarcom.lng nls\
copy svarcom.lng bin\
upx -9 --8086 command.com
zip -9rkDX -m svarcom.svp command.com appinfo doc nls
zip -9rkDX -m svarcom.svp command.com appinfo bin doc
rmdir appinfo
rmdir bin
rmdir nls
rmdir doc\svarcom
rmdir doc