Internal editor charset patches

This commit is contained in:
Michiel Broek 2004-02-17 19:49:15 +00:00
parent 3232724eb5
commit 29715c5ad1
5 changed files with 27 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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
*/

View File

@ -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);

View File

@ -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