From 29715c5ad15f405fc9af61b256d7ec7fd5118cbd Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Tue, 17 Feb 2004 19:49:15 +0000 Subject: [PATCH] Internal editor charset patches --- ChangeLog | 7 +++++++ mbfido/announce.c | 1 + mbsebbs/fsedit.c | 3 +-- mbsebbs/input.c | 18 +++++++++++++++++- mbsebbs/input.h | 1 + 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f38b97ae..9b781005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ $Id$ v0.51.0 09-Feb-2004 + mbaff: + Patched to store long filename in the newfiles database + + mbsebbs: + Added support for the internal editor for hi-ascii + international character sets. + v0.50.0 03-Oct-2003 - 09-Feb-2004 diff --git a/mbfido/announce.c b/mbfido/announce.c index bf73d7e1..a5f498c9 100644 --- a/mbfido/announce.c +++ b/mbfido/announce.c @@ -148,6 +148,7 @@ void Uploads() sprintf(T_File.Group, "%s", area.NewGroup); sprintf(T_File.Comment, "%s", area.Name); sprintf(T_File.Name, "%s", file.Name); + sprintf(T_File.LName, "%s", file.LName); T_File.Size = file.Size; T_File.SizeKb = file.Size / 1024; T_File.Fdate = file.FileDate; diff --git a/mbsebbs/fsedit.c b/mbsebbs/fsedit.c index f978e032..b65bde1f 100644 --- a/mbsebbs/fsedit.c +++ b/mbsebbs/fsedit.c @@ -44,7 +44,6 @@ #include "pinfo.h" #include "fsedit.h" - void Show_Ins(void) { locate(1, 70); @@ -721,7 +720,7 @@ int Fs_Edit() break; default: - if (ch > 31 && ch < 127) { + if ((ch > 31 && ch < 127) || traduce(&ch) ) { /* * Normal printable characters */ diff --git a/mbsebbs/input.c b/mbsebbs/input.c index 5e0bc2b7..8c8a7a15 100644 --- a/mbsebbs/input.c +++ b/mbsebbs/input.c @@ -43,6 +43,22 @@ +int traduce(char *ch) +{ + int i; + + for (i = 0; i < 85; i++){ + if ( Language(35)[i] == '\0' ) break; + if ( *ch == Language(35)[i] ){ + if ( Language(36)[i] != '\0'){ + *ch = ( Language(36)[i] ); + } + return TRUE; + } + } + return FALSE; +} + /* * Get a character string with cursor position @@ -73,7 +89,7 @@ void GetstrP(char *sStr, int iMaxLen, int Position) putchar('\007'); } - if (ch > 31 && ch < 127) { + if ((ch > 31 && ch < 127) || traduce(&ch)) { if (iPos <= iMaxLen) { iPos++; sprintf(sStr, "%s%c", sStr, ch); diff --git a/mbsebbs/input.h b/mbsebbs/input.h index 7d9bc66c..d589faaa 100644 --- a/mbsebbs/input.h +++ b/mbsebbs/input.h @@ -15,5 +15,6 @@ void GetPhone(char *, int); /* Get telephone number */ void Getpass(char *); /* Get a password from the user */ void Pause(void); /* Puts Pause on Screen and halts screen */ +int traduce(char *); #endif