petsciiconv.c: move variables from global to local

This commit is contained in:
Simon Duquennoy 2015-05-12 09:25:22 +02:00
parent 4a93f5148d
commit 5294cafd14

View File

@ -72,13 +72,12 @@ static unsigned char ascii2petscii[128] = {
0x58,0x59,0x5a,0xdb,0xdd,0xdd,0x5e,0xdf,
};
static unsigned int i;
static char *ptr;
/*-----------------------------------------------------------------------------------*/
void
petsciiconv_toascii(char *buf, unsigned int len)
{
unsigned int i;
char *ptr;
char c;
ptr = buf;
@ -108,6 +107,9 @@ petsciiconv_toascii(char *buf, unsigned int len)
void
petsciiconv_topetscii(char *buf, unsigned int len)
{
unsigned int i;
char *ptr;
ptr = buf;
for(i = len; i > 0; --i) {
*ptr = ascii2petscii[*ptr & 0x7f];