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

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