From c629d2f5c76ed1e47ad9fc28127dcbe9552664ed Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Mon, 2 Jul 2001 21:10:59 +0000 Subject: [PATCH] short (8 bit) replaced by char git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@999 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- device/lib/_divuint.c | 2 +- device/lib/_divulong.c | 2 +- device/lib/_fsdiv.c | 2 +- device/lib/_fsmul.c | 2 +- device/lib/_moduint.c | 2 +- device/lib/_modulong.c | 2 +- device/lib/_muluint.c | 2 +- device/lib/_ser.c | 4 ++-- device/lib/printfl.c | 22 +++++++++++----------- device/lib/vprintf.c | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/device/lib/_divuint.c b/device/lib/_divuint.c index 2226f97c..bba3abf8 100644 --- a/device/lib/_divuint.c +++ b/device/lib/_divuint.c @@ -28,7 +28,7 @@ unsigned int _divuint (unsigned int a, unsigned int b) { unsigned int reste = 0 ; - unsigned short count = 16; + unsigned char count = 16; bit c; do{ diff --git a/device/lib/_divulong.c b/device/lib/_divulong.c index 6b3311ff..2694bbf2 100644 --- a/device/lib/_divulong.c +++ b/device/lib/_divulong.c @@ -28,7 +28,7 @@ unsigned long _divulong (unsigned long a, unsigned long b) { unsigned long reste = 0L; unsigned char count = 32; - short c; + char c; do{ // reste:a <- 0; diff --git a/device/lib/_fsdiv.c b/device/lib/_fsdiv.c index e56e4dda..f597027f 100644 --- a/device/lib/_fsdiv.c +++ b/device/lib/_fsdiv.c @@ -77,7 +77,7 @@ __fsdiv (float a1, float a2) volatile unsigned long mask; volatile long mant1, mant2; volatile int exp ; - short sign; + char sign; fl1.f = a1; fl2.f = a2; diff --git a/device/lib/_fsmul.c b/device/lib/_fsmul.c index 48c92ed5..c1507811 100644 --- a/device/lib/_fsmul.c +++ b/device/lib/_fsmul.c @@ -83,7 +83,7 @@ __fsmul (float a1, float a2) volatile union float_long fl1, fl2; volatile unsigned long result; volatile int exp; - short sign; + char sign; fl1.f = a1; fl2.f = a2; diff --git a/device/lib/_moduint.c b/device/lib/_moduint.c index be50ef8a..fa56e15c 100644 --- a/device/lib/_moduint.c +++ b/device/lib/_moduint.c @@ -29,7 +29,7 @@ unsigned int _moduint (unsigned int a ,unsigned int b) { - unsigned short count = 0; + unsigned char count = 0; while (!MSB_SET(b)) { diff --git a/device/lib/_modulong.c b/device/lib/_modulong.c index d9daa6a1..e3d85b85 100644 --- a/device/lib/_modulong.c +++ b/device/lib/_modulong.c @@ -28,7 +28,7 @@ unsigned long _modulong (unsigned long a ,unsigned long b) { - unsigned short count = 0; + unsigned char count = 0; while (!MSB_SET(b)) { diff --git a/device/lib/_muluint.c b/device/lib/_muluint.c index 12bfb35c..4622adcf 100644 --- a/device/lib/_muluint.c +++ b/device/lib/_muluint.c @@ -79,7 +79,7 @@ unsigned int _muluint (unsigned int a, unsigned int b) // we have to do it the hard way union uu { - struct { unsigned short lo,hi ;} s; + struct { unsigned char lo,hi ;} s; unsigned int t; }; diff --git a/device/lib/_ser.c b/device/lib/_ser.c index 463de50a..064a7d00 100644 --- a/device/lib/_ser.c +++ b/device/lib/_ser.c @@ -142,10 +142,10 @@ ser_printString(char *String) } } -short +char ser_charAvail(void) { - short ret = 0; + char ret = 0; if (ser_rxIndexIn != ser_rxIndexOut) { ret = 1; diff --git a/device/lib/printfl.c b/device/lib/printfl.c index 63bee984..121914bb 100644 --- a/device/lib/printfl.c +++ b/device/lib/printfl.c @@ -29,14 +29,14 @@ format output type argument-type %d decimal int %ld decimal long - %hd decimal short/char + %hd decimal char %x hexadecimal int %lx hexadecimal long - %hx hexadecimal short/char + %hx hexadecimal char %o octal int %lo octal long - %ho octal short/char - %c character char/short + %ho octal char + %c character char %s character _generic pointer */ @@ -51,7 +51,7 @@ static data volatile char ch; static data char radix ; static bit long_flag = 0; static bit string_flag =0; -static bit short_flag = 0; +static bit char_flag = 0; static bit sign; static char * data str ; static data long val; @@ -72,7 +72,7 @@ static void pval(void) if (!long_flag) { lval &= 0x0000ffff; } - if (short_flag) { + if (char_flag) { lval &= 0x000000ff; } @@ -80,7 +80,7 @@ static void pval(void) { #if 1 if(radix != 16) ch = (lval % radix) + '0'; - else ch = "0123456789ABCDEF"[(unsigned short)lval & 0x0f]; + else ch = "0123456789ABCDEF"[(unsigned char)lval & 0x0f]; _asm push _ch _endasm; lval /= radix; #else @@ -112,7 +112,7 @@ void printf_small (char * fmt, ... ) reentrant for (; *fmt ; fmt++ ) { if (*fmt == '%') { - long_flag = string_flag = short_flag = 0; + long_flag = string_flag = char_flag = 0; fmt++ ; switch (*fmt) { case 'l': @@ -120,7 +120,7 @@ void printf_small (char * fmt, ... ) reentrant fmt++; break; case 'h': - short_flag = 1; + char_flag = 1; fmt++; } @@ -151,8 +151,8 @@ void printf_small (char * fmt, ... ) reentrant if (long_flag) val = va_arg(ap,long); else - if (short_flag) - val = va_arg(ap,short); + if (char_flag) + val = va_arg(ap,char); else val = va_arg(ap,int); diff --git a/device/lib/vprintf.c b/device/lib/vprintf.c index a0b2d4c1..ba7dd886 100644 --- a/device/lib/vprintf.c +++ b/device/lib/vprintf.c @@ -72,7 +72,7 @@ static bit lsd; /* this one NEEDS to be in data */ static data value_t value; -static unsigned short radix; +static unsigned char radix; // jwk: TODO: this makes the whole dammed thing nonreentrent static int charsOutputted; -- 2.30.2