summaryrefslogtreecommitdiff
path: root/rpmio/sexp
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-05-28 04:47:42 +0000
committerjbj <devnull@localhost>2004-05-28 04:47:42 +0000
commit1d7dfb26c721095d1086dea8eab4979064eb9cd7 (patch)
tree8fe60c1765dd3eab79f24dec56cf8e2da149936a /rpmio/sexp
parent84aef46ba35a80454e71d860f488ef7357355d5e (diff)
downloadlibrpm-tizen-1d7dfb26c721095d1086dea8eab4979064eb9cd7.tar.gz
librpm-tizen-1d7dfb26c721095d1086dea8eab4979064eb9cd7.tar.bz2
librpm-tizen-1d7dfb26c721095d1086dea8eab4979064eb9cd7.zip
More cleanup, remove compile warnings.
CVS patchset: 7270 CVS date: 2004/05/28 04:47:42
Diffstat (limited to 'rpmio/sexp')
-rw-r--r--rpmio/sexp/sexp-input.c31
-rw-r--r--rpmio/sexp/sexp-output.c12
2 files changed, 22 insertions, 21 deletions
diff --git a/rpmio/sexp/sexp-input.c b/rpmio/sexp/sexp-input.c
index b62d8096b..8b9c13d54 100644
--- a/rpmio/sexp/sexp-input.c
+++ b/rpmio/sexp/sexp-input.c
@@ -58,34 +58,35 @@ void initializeCharacterTables(void)
hexdigit, hexvalue, tokenchar, upper, whitespace @*/
{
int i;
- for (i=0;i<256;i++) upper[i] = i;
+
+ for (i=0; i<256; i++) upper[i] = i;
for (i='a'; i<='z'; i++) upper[i] = i - 'a' + 'A';
for (i=0; i<=255; i++)
alpha[i] = decdigit[i] = whitespace[i] = base64digit[i] = FALSE;
whitespace[' '] = whitespace['\n'] = whitespace['\t'] = TRUE;
whitespace['\v'] = whitespace['\r'] = whitespace['\f'] = TRUE;
- for (i='0';i<='9';i++) {
+ for (i='0'; i<='9'; i++) {
base64digit[i] = hexdigit[i] = decdigit[i] = TRUE;
decvalue[i] = hexvalue[i] = i-'0';
base64value[i] = (i-'0')+52;
}
- for (i='a';i<='f';i++) {
- hexdigit[i] = hexdigit[upper[i]] = TRUE;
- hexvalue[i] = hexvalue[upper[i]] = i-'a'+10;
+ for (i='a'; i<='f'; i++) {
+ hexdigit[i] = hexdigit[(int)upper[i]] = TRUE;
+ hexvalue[i] = hexvalue[(int)upper[i]] = i-'a'+10;
}
- for (i='a';i<='z';i++) {
- base64digit[i] = base64digit[upper[i]] = TRUE;
- alpha[i] = alpha[upper[i]] = TRUE;
+ for (i='a'; i<='z'; i++) {
+ base64digit[i] = base64digit[(int)upper[i]] = TRUE;
+ alpha[i] = alpha[(int)upper[i]] = TRUE;
base64value[i] = i-'a'+26;
- base64value[upper[i]] = i-'a';
+ base64value[(int)upper[i]] = i-'a';
}
base64digit['+'] = base64digit['/'] = TRUE;
base64value['+'] = 62;
base64value['/'] = 63;
base64value['='] = 0;
- for (i=0;i<255;i++) tokenchar[i] = FALSE;
- for (i='a';i<='z';i++) tokenchar[i] = tokenchar[upper[i]] = TRUE;
- for (i='0';i<='9';i++) tokenchar[i] = TRUE;
+ for (i=0; i<255; i++) tokenchar[i] = FALSE;
+ for (i='a'; i<='z'; i++) tokenchar[i] = tokenchar[(int)upper[i]] = TRUE;
+ for (i='0'; i<='9'; i++) tokenchar[i] = TRUE;
tokenchar['-'] = TRUE;
tokenchar['.'] = TRUE;
tokenchar['/'] = TRUE;
@@ -350,7 +351,7 @@ void scanVerbatimString(sexpInputStream is, sexpSimpleString ss, long int length
skipChar(is,':');
if (length == -1L) /* no length was specified */
ErrorMessage(ERROR,"Verbatim string had no declared length.");
- for (i=0;i<length;i++) {
+ for (i=0; i<length; i++) {
appendCharToSimpleString(is->nextChar, ss);
is->getChar(is);
}
@@ -391,7 +392,7 @@ void scanQuotedString(sexpInputStream is, sexpSimpleString ss, long int length)
int val = 0;
int j;
- for (j=0;j<3;j++) {
+ for (j=0; j<3; j++) {
if (c >= '0' && c <= '7') {
val = ((val << 3) | (c - '0'));
if (j<2) { is->getChar(is); c = is->nextChar; }
@@ -410,7 +411,7 @@ void scanQuotedString(sexpInputStream is, sexpSimpleString ss, long int length)
is->getChar(is);
c = is->nextChar;
- for (j=0;j<2;j++) {
+ for (j=0; j<2; j++) {
if (isHexDigit(c)) {
val = ((val << 4) | hexvalue[c]);
if (j<1) { is->getChar(is); c = is->nextChar; }
diff --git a/rpmio/sexp/sexp-output.c b/rpmio/sexp/sexp-output.c
index 977d5e9d9..65e1496e6 100644
--- a/rpmio/sexp/sexp-output.c
+++ b/rpmio/sexp/sexp-output.c
@@ -134,7 +134,7 @@ void newLine(sexpOutputStream os, int mode)
}
if (mode == ADVANCED) {
int i;
- for (i=0;i<os->indent&&(4*i)<os->maxcolumn;i++)
+ for (i=0; i<os->indent && (4*i)<os->maxcolumn; i++)
os->putChar(os, ' ');
}
}
@@ -307,7 +307,7 @@ int canPrintAsToken(sexpOutputStream os, sexpSimpleString ss)
if (isDecDigit((int)*c)) return FALSE;
if (os->maxcolumn > 0 && os->column + len >= os->maxcolumn)
return FALSE;
- for (i=0;i<len;i++)
+ for (i=0; i<len; i++)
if (!isTokenChar((int)(*c++))) return FALSE;
return TRUE;
}
@@ -324,7 +324,7 @@ void advancedPrintTokenSimpleString(sexpOutputStream os, sexpSimpleString ss)
if (os->maxcolumn>0 && os->column > (os->maxcolumn - len))
os->newLine(os, ADVANCED);
- for (i=0;i<len;i++)
+ for (i=0; i<len; i++)
os->putChar(os, (int)(*c++));
}
@@ -355,7 +355,7 @@ void advancedPrintVerbatimSimpleString(sexpOutputStream os, sexpSimpleString ss)
os->newLine(os, ADVANCED);
printDecimal(os,len);
os->putChar(os,':');
- for (i=0;i<len;i++) os->putChar(os, (int)*c++);
+ for (i=0; i<len; i++) os->putChar(os, (int)*c++);
}
/* advancedLengthSimpleStringVerbatim(ss)
@@ -384,7 +384,7 @@ void advancedPrintBase64SimpleString(sexpOutputStream os, sexpSimpleString ss)
ErrorMessage(ERROR, "Can't print NULL string base 64");
varPutChar(os,'|');
changeOutputByteSize(os, 6, ADVANCED);
- for (i=0;i<len;i++)
+ for (i=0; i<len; i++)
varPutChar(os, (int)(*c++));
flushOutput(os);
changeOutputByteSize(os, 8, ADVANCED);
@@ -406,7 +406,7 @@ void advancedPrintHexSimpleString(sexpOutputStream os, sexpSimpleString ss)
ErrorMessage(ERROR, "Can't print NULL string hexadecimal");
os->putChar(os, '#');
changeOutputByteSize(os, 4, ADVANCED);
- for (i=0;i<len;i++)
+ for (i=0; i<len; i++)
varPutChar(os, (int)(*c++));
flushOutput(os);
changeOutputByteSize(os, 8, ADVANCED);