mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 03:30:01 +00:00
petsciiconv.c: move variables from global to local
This commit is contained in:
parent
4a93f5148d
commit
5294cafd14
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user