Added more Chinese support
This commit is contained in:
parent
e23af63d04
commit
a256051f8a
1
AUTHORS
1
AUTHORS
@ -52,3 +52,4 @@ Phil Kimble kimerud@users.sourceforge.net 1:14/200@fidonet
|
|||||||
David Gonzalez skynetbbs@007mundo.com 4:930/1@fidonet
|
David Gonzalez skynetbbs@007mundo.com 4:930/1@fidonet
|
||||||
Malte Tychsen 2:240/9350@fidonet
|
Malte Tychsen 2:240/9350@fidonet
|
||||||
Dmitry Komissaroff rsprog@mail.ru
|
Dmitry Komissaroff rsprog@mail.ru
|
||||||
|
skyroam skyroam@users.sourceforge.net
|
||||||
|
@ -28,6 +28,7 @@ v0.71.2 16-Jan-2005
|
|||||||
Allowed hi-ascii input characters in the internal fs editor,
|
Allowed hi-ascii input characters in the internal fs editor,
|
||||||
the chat input and one general input function. This may have
|
the chat input and one general input function. This may have
|
||||||
effects for all users not using us-ascii keyboards.
|
effects for all users not using us-ascii keyboards.
|
||||||
|
Added more support for Chinese using the traduce function.
|
||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
Empty *.msg netmails for our own system are dropped with and
|
Empty *.msg netmails for our own system are dropped with and
|
||||||
@ -50,9 +51,15 @@ v0.71.2 16-Jan-2005
|
|||||||
The created semafore files are now world readable so that low
|
The created semafore files are now world readable so that low
|
||||||
privileged users like nobody can check the semafore's.
|
privileged users like nobody can check the semafore's.
|
||||||
|
|
||||||
|
mbsetup:
|
||||||
|
Added langugae defaults for Chinese.
|
||||||
|
|
||||||
html:
|
html:
|
||||||
Added batch file upload written by Russell Tiedt to the faq.
|
Added batch file upload written by Russell Tiedt to the faq.
|
||||||
|
|
||||||
|
lang:
|
||||||
|
Added Chinese language.
|
||||||
|
|
||||||
script:
|
script:
|
||||||
Fixed the Slackware setup script that didn't make the startup
|
Fixed the Slackware setup script that didn't make the startup
|
||||||
symlinks in runlevel 4 if the directory /etc/rc.d/rc4.d didn't
|
symlinks in runlevel 4 if the directory /etc/rc.d/rc4.d didn't
|
||||||
|
4
Makefile
4
Makefile
@ -54,6 +54,10 @@ install:
|
|||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/log
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/log
|
||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/tmp
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/tmp
|
||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/home
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/home
|
||||||
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/chinese
|
||||||
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/chinese/txtfiles
|
||||||
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/chinese/menus
|
||||||
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/chinese/macro
|
||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/dutch
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/dutch
|
||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/dutch/txtfiles
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0770 ${PREFIX}/dutch/txtfiles
|
||||||
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/dutch/menus
|
@${INSTALL} -d -o ${OWNER} -g ${GROUP} -m 0750 ${PREFIX}/dutch/menus
|
||||||
|
@ -250,3 +250,5 @@
|
|||||||
/* Define if machine is bigendian */
|
/* Define if machine is bigendian */
|
||||||
#undef WORDS_BIGENDIAN
|
#undef WORDS_BIGENDIAN
|
||||||
|
|
||||||
|
/* Define if Del != 207 */
|
||||||
|
#define GBK_DEL @GBK_DEL@
|
||||||
|
25
configure
vendored
25
configure
vendored
@ -846,6 +846,7 @@ Optional Features:
|
|||||||
--enable-optimize Enable CPU optimize
|
--enable-optimize Enable CPU optimize
|
||||||
--enable-newbinkp Compile Debugging Binkp code
|
--enable-newbinkp Compile Debugging Binkp code
|
||||||
--enable-newsgate Compile with newsgate
|
--enable-newsgate Compile with newsgate
|
||||||
|
--enable-gbkdel Delete key is 126 (default is 207)
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -3076,6 +3077,7 @@ else
|
|||||||
NEWSGATE="No"
|
NEWSGATE="No"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for re_comp in -lcompat" >&5
|
echo "$as_me:$LINENO: checking for re_comp in -lcompat" >&5
|
||||||
echo $ECHO_N "checking for re_comp in -lcompat... $ECHO_C" >&6
|
echo $ECHO_N "checking for re_comp in -lcompat... $ECHO_C" >&6
|
||||||
if test "${ac_cv_lib_compat_re_comp+set}" = set; then
|
if test "${ac_cv_lib_compat_re_comp+set}" = set; then
|
||||||
@ -8929,6 +8931,27 @@ echo "${ECHO_T}no" >&6
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-gbkdel or --disable-gbkdel was given.
|
||||||
|
if test "${enable_gbkdel+set}" = set; then
|
||||||
|
enableval="$enable_gbkdel"
|
||||||
|
gbkdel=$enableval
|
||||||
|
else
|
||||||
|
gbkdel=no
|
||||||
|
fi;
|
||||||
|
if test "$gbkdel" = "yes"; then
|
||||||
|
GBK_DEL=126
|
||||||
|
DEL=$GBK_DEL
|
||||||
|
echo "checking delete key... changed into $DEL"
|
||||||
|
else
|
||||||
|
DEL="default"
|
||||||
|
GBK_DEL=0
|
||||||
|
echo "checking delete key... default"
|
||||||
|
fi
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define GBK_DEL $GBK_DEL
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-log-compress or --without-log-compress was given.
|
# Check whether --with-log-compress or --without-log-compress was given.
|
||||||
if test "${with_log_compress+set}" = set; then
|
if test "${with_log_compress+set}" = set; then
|
||||||
@ -10336,6 +10359,7 @@ echo "$as_me:$LINENO: result:
|
|||||||
Version : ..................... ${VERSION}
|
Version : ..................... ${VERSION}
|
||||||
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
||||||
Full newsgate : ............... ${NEWSGATE}
|
Full newsgate : ............... ${NEWSGATE}
|
||||||
|
Delete key : .................. ${DEL}
|
||||||
|
|
||||||
" >&5
|
" >&5
|
||||||
echo "${ECHO_T}
|
echo "${ECHO_T}
|
||||||
@ -10346,6 +10370,7 @@ echo "${ECHO_T}
|
|||||||
Version : ..................... ${VERSION}
|
Version : ..................... ${VERSION}
|
||||||
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
||||||
Full newsgate : ............... ${NEWSGATE}
|
Full newsgate : ............... ${NEWSGATE}
|
||||||
|
Delete key : .................. ${DEL}
|
||||||
|
|
||||||
" >&6
|
" >&6
|
||||||
|
|
||||||
|
17
configure.in
17
configure.in
@ -109,6 +109,7 @@ else
|
|||||||
NEWSGATE="No"
|
NEWSGATE="No"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Checks for libraries and functions.
|
dnl Checks for libraries and functions.
|
||||||
dnl
|
dnl
|
||||||
@ -288,6 +289,21 @@ AC_PATH_PROG(GOLDNODE,goldnode)
|
|||||||
AC_PATH_PROG(GOLDNODE,gnlnx)
|
AC_PATH_PROG(GOLDNODE,gnlnx)
|
||||||
AC_PATH_PROG(CONVERT,convert)
|
AC_PATH_PROG(CONVERT,convert)
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl FIX DEL for Del!=207, this was default upto 207 or 126 if no argument
|
||||||
|
dnl
|
||||||
|
AC_ARG_ENABLE(gbkdel, [ --enable-gbkdel Delete key is 126 (default is 207)], [ gbkdel=$enableval ], [ gbkdel=no ])
|
||||||
|
if test "$gbkdel" = "yes"; then
|
||||||
|
GBK_DEL=126
|
||||||
|
DEL=$GBK_DEL
|
||||||
|
echo "checking delete key... changed into $DEL"
|
||||||
|
else
|
||||||
|
DEL="default"
|
||||||
|
GBK_DEL=0
|
||||||
|
echo "checking delete key... default"
|
||||||
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(GBK_DEL,$GBK_DEL)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
AC_ARG_WITH(log-compress,[ --with-log-compress=METHOD Log compression method (default gzip)], LOG_COMPRESS=$with_log_compress, LOG_COMPRESS=gzip)
|
AC_ARG_WITH(log-compress,[ --with-log-compress=METHOD Log compression method (default gzip)], LOG_COMPRESS=$with_log_compress, LOG_COMPRESS=gzip)
|
||||||
case "$LOG_COMPRESS" in
|
case "$LOG_COMPRESS" in
|
||||||
@ -381,6 +397,7 @@ AC_MSG_RESULT([
|
|||||||
Version : ..................... ${VERSION}
|
Version : ..................... ${VERSION}
|
||||||
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
Hydra/Binkp zlib compression : ${ZLIBSUP}
|
||||||
Full newsgate : ............... ${NEWSGATE}
|
Full newsgate : ............... ${NEWSGATE}
|
||||||
|
Delete key : .................. ${DEL}
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -293,7 +293,11 @@ struct icmp_filter {
|
|||||||
#define KEY_HOME 204
|
#define KEY_HOME 204
|
||||||
#define KEY_END 205
|
#define KEY_END 205
|
||||||
#define KEY_INS 206
|
#define KEY_INS 206
|
||||||
|
#if GBK_DEL
|
||||||
|
#define KEY_DEL GBK_DEL
|
||||||
|
#else
|
||||||
#define KEY_DEL 207
|
#define KEY_DEL 207
|
||||||
|
#endif
|
||||||
#define KEY_PGUP 208
|
#define KEY_PGUP 208
|
||||||
#define KEY_PGDN 209
|
#define KEY_PGDN 209
|
||||||
#define KEY_F10 210
|
#define KEY_F10 210
|
||||||
|
@ -279,16 +279,7 @@ void Chat(char *username, char *channel)
|
|||||||
* Allow hi-ascii for multi-language.
|
* Allow hi-ascii for multi-language.
|
||||||
*/
|
*/
|
||||||
ch = testkey(exitinfo.iScreenLen -1, curpos + 2);
|
ch = testkey(exitinfo.iScreenLen -1, curpos + 2);
|
||||||
if (isprint(ch) || (ch > 0x7F)) {
|
if ((ch == KEY_BACKSPACE) || (ch == KEY_RUBOUT) || (ch == KEY_DEL)) {
|
||||||
alarm_on();
|
|
||||||
if (curpos < 77) {
|
|
||||||
PUTCHAR(ch);
|
|
||||||
sbuf[curpos] = ch;
|
|
||||||
curpos++;
|
|
||||||
} else {
|
|
||||||
PUTCHAR(7);
|
|
||||||
}
|
|
||||||
} else if ((ch == KEY_BACKSPACE) || (ch == KEY_RUBOUT) || (ch == KEY_DEL)) {
|
|
||||||
alarm_on();
|
alarm_on();
|
||||||
if (curpos) {
|
if (curpos) {
|
||||||
curpos--;
|
curpos--;
|
||||||
@ -297,6 +288,16 @@ void Chat(char *username, char *channel)
|
|||||||
} else {
|
} else {
|
||||||
PUTCHAR(7);
|
PUTCHAR(7);
|
||||||
}
|
}
|
||||||
|
/* if KEY_DEL isprint, do no output again */
|
||||||
|
} else if (isprint(ch) || traduce(&ch)) {
|
||||||
|
alarm_on();
|
||||||
|
if (curpos < 77) {
|
||||||
|
PUTCHAR(ch);
|
||||||
|
sbuf[curpos] = ch;
|
||||||
|
curpos++;
|
||||||
|
} else {
|
||||||
|
PUTCHAR(7);
|
||||||
|
}
|
||||||
} else if ((ch == '\r') && curpos) {
|
} else if ((ch == '\r') && curpos) {
|
||||||
alarm_on();
|
alarm_on();
|
||||||
sprintf(buf, "CPUT:2,%d,%s;", mypid, sbuf);
|
sprintf(buf, "CPUT:2,%d,%s;", mypid, sbuf);
|
||||||
|
@ -212,7 +212,7 @@ void GetstrLC(char *sStr, int iMaxlen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch > 31 && ch < 127) {
|
if ((ch > 31 && ch < 127) || traduce(&ch)) {
|
||||||
if (iPos <= iMaxlen) {
|
if (iPos <= iMaxlen) {
|
||||||
iPos++;
|
iPos++;
|
||||||
sprintf(sStr, "%s%c", sStr, ch);
|
sprintf(sStr, "%s%c", sStr, ch);
|
||||||
|
@ -295,7 +295,7 @@ int traduce(char *ch)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 85; i++){
|
for (i = 0; i < 81; i++){
|
||||||
if ( Language(35)[i] == '\0' ) break;
|
if ( Language(35)[i] == '\0' ) break;
|
||||||
if ( *ch == Language(35)[i] ){
|
if ( *ch == Language(35)[i] ){
|
||||||
if ( Language(36)[i] != '\0'){
|
if ( Language(36)[i] != '\0'){
|
||||||
@ -303,7 +303,17 @@ int traduce(char *ch)
|
|||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 81; i++){
|
||||||
|
if ( Language(33)[i] == '\0' ) break;
|
||||||
|
if ( *ch == Language(33)[i] ){
|
||||||
|
if ( Language(34)[i] != '\0'){
|
||||||
|
*ch = ( Language(34)[i] );
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,16 +342,15 @@ void GetstrP(char *sStr, int iMaxLen, int Position)
|
|||||||
while (ch != KEY_ENTER) {
|
while (ch != KEY_ENTER) {
|
||||||
|
|
||||||
ch = Readkey();
|
ch = Readkey();
|
||||||
|
|
||||||
if ((ch == KEY_BACKSPACE) || (ch == KEY_DEL) || (ch == KEY_RUBOUT)) {
|
if ((ch == KEY_BACKSPACE) || (ch == KEY_DEL) || (ch == KEY_RUBOUT)) {
|
||||||
if (iPos > 0) {
|
if (iPos > 0) {
|
||||||
BackErase();
|
BackErase();
|
||||||
sStr[--iPos] = '\0';
|
sStr[--iPos] = '\0';
|
||||||
} else
|
} else
|
||||||
PUTCHAR('\007');
|
PUTCHAR('\007');
|
||||||
}
|
|
||||||
|
|
||||||
if ((ch > 31) || traduce(&ch)) {
|
/* if 13 < DEL < 127 , should not output again */
|
||||||
|
} else if ((ch > 31 && ch < 127) || traduce(&ch)) {
|
||||||
if (iPos <= iMaxLen) {
|
if (iPos <= iMaxLen) {
|
||||||
iPos++;
|
iPos++;
|
||||||
sprintf(sStr, "%s%c", sStr, ch);
|
sprintf(sStr, "%s%c", sStr, ch);
|
||||||
|
@ -133,6 +133,16 @@ int CountLanguage(void)
|
|||||||
lang.Available = TRUE;
|
lang.Available = TRUE;
|
||||||
fwrite(&lang, sizeof(lang), 1, fil);
|
fwrite(&lang, sizeof(lang), 1, fil);
|
||||||
|
|
||||||
|
memset(&lang, 0, sizeof(lang));
|
||||||
|
sprintf(lang.Name, "Chinese");
|
||||||
|
sprintf(lang.LangKey, "C");
|
||||||
|
sprintf(lang.MenuPath, "%s/chinese/menus", getenv("MBSE_ROOT"));
|
||||||
|
sprintf(lang.TextPath, "%s/chinese/txtfiles", getenv("MBSE_ROOT"));
|
||||||
|
sprintf(lang.MacroPath, "%s/chinese/macro", getenv("MBSE_ROOT"));
|
||||||
|
sprintf(lang.Filename, "chinese.lang");
|
||||||
|
lang.Available = TRUE;
|
||||||
|
fwrite(&lang, sizeof(lang), 1, fil);
|
||||||
|
|
||||||
fclose(fil);
|
fclose(fil);
|
||||||
chmod(ffile, 0640);
|
chmod(ffile, 0640);
|
||||||
return 6;
|
return 6;
|
||||||
|
Reference in New Issue
Block a user