diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp index 7e4ce20495e64ecd76d75b8ca73511989f0e249b..10e1686c71bb54645a6c17534b0150a46271f845 100644 --- a/src/sbbs3/con_out.cpp +++ b/src/sbbs3/con_out.cpp @@ -46,10 +46,24 @@ /***************************************************/ /* Seven bit table for EXASCII to ASCII conversion */ /***************************************************/ -const char *sbtbl="CUeaaaaceeeiiiAAEaAooouuyOUcLYRfaiounNao?--24!<>" +static const char *sbtbl="CUeaaaaceeeiiiAAEaAooouuyOUcLYRfaiounNao?--24!<>" "###||||++||++++++--|-+||++--|-+----++++++++##[]#" "abrpEout*ono%0ENE+><rj%=o..+n2* "; +/****************************************************************************/ +/* Convert string from IBM extended ASCII to just ASCII */ +/****************************************************************************/ +char* DLLCALL ascii_str(uchar* str) +{ + size_t i; + + for(i=0;str[i];i++) + if(str[i]&0x80) + str[i]=sbtbl[str[i]^0x80]; /* seven bit table */ + + return((char*)str); +} + /****************************************************************************/ /* Outputs a NULL terminated string locally and remotely (if applicable) */ /* Handles ctrl-a characters */