summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-16 19:02:31 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-28 04:06:02 -0200
commit58d940fbb303cc16549f913e33429362760132de (patch)
tree94af5a58b712704cac5b7aeae5450859b607d668
parent885f2712b0d5137d5349c3debbcea0db0f39e92f (diff)
Compile warning fixes.
Use constant octals instead of constant characters in switch case values to avoid warnings/problems if constant characters are signed. Ansify some functions in utils.c. Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
-rw-r--r--psgeom.c8
-rw-r--r--utils.c39
2 files changed, 15 insertions, 32 deletions
diff --git a/psgeom.c b/psgeom.c
index 3901917..38c432e 100644
--- a/psgeom.c
+++ b/psgeom.c
@@ -1389,10 +1389,10 @@ int eG,nG,gI,l,g;
switch (buf[0]) {
case '.': case ':': case ',': case ';':
case '\'': case '"': case '`': case '~':
- case '^': case '\250': case '\270': case '\267':
- case '\260': case '\252': case '\272': case '\271':
- case '\262': case '\263': case '\264': case '\255':
- case '\254': case '\257':
+ case '^': case 0250: case 0270: case 0267:
+ case 0260: case 0252: case 0272: case 0271:
+ case 0262: case 0263: case 0264: case 0255:
+ case 0254: case 0257:
top->size[(g*2)+l]= SZ_LARGE;
break;
}
diff --git a/utils.c b/utils.c
index c79753d..e6c6bab 100644
--- a/utils.c
+++ b/utils.c
@@ -34,8 +34,7 @@
/***====================================================================***/
Opaque
-uAlloc(size)
- unsigned size;
+uAlloc(unsigned size)
{
return((Opaque)malloc(size));
}
@@ -43,9 +42,7 @@ uAlloc(size)
/***====================================================================***/
Opaque
-uCalloc(n,size)
- unsigned n;
- unsigned size;
+uCalloc(unsigned n, unsigned size)
{
return((Opaque)calloc(n,size));
}
@@ -53,9 +50,7 @@ uCalloc(n,size)
/***====================================================================***/
Opaque
-uRealloc(old,newSize)
- Opaque old;
- unsigned newSize;
+uRealloc(Opaque old, unsigned newSize)
{
if (old==NULL)
return((Opaque)malloc(newSize));
@@ -65,11 +60,7 @@ uRealloc(old,newSize)
/***====================================================================***/
Opaque
-uRecalloc(old,nOld,nNew,itemSize)
- Opaque old;
- unsigned nOld;
- unsigned nNew;
- unsigned itemSize;
+uRecalloc(Opaque old, unsigned nOld, unsigned nNew, unsigned itemSize)
{
char *rtrn;
@@ -87,8 +78,7 @@ char *rtrn;
/***====================================================================***/
void
-uFree(ptr)
- Opaque ptr;
+uFree(Opaque ptr)
{
if (ptr!=(Opaque)NULL)
free((char *)ptr);
@@ -103,8 +93,7 @@ static FILE *entryFile= NULL;
int uEntryLevel;
Boolean
-uSetEntryFile(name)
- char *name;
+uSetEntryFile(char *name)
{
if ((entryFile!=NULL)&&(entryFile!=stderr)) {
fprintf(entryFile,"switching to %s\n",name?name:"stderr");
@@ -136,9 +125,7 @@ va_list ap;
}
void
-uExit(l,rtVal)
- int l;
- char * rtVal;
+uExit(int l, char *rtVal)
{
int i;
@@ -160,8 +147,7 @@ int i;
int uDebugIndentSize= 4;
Boolean
-uSetDebugFile(name)
- char *name;
+uSetDebugFile(char *name)
{
if ((uDebugFile!=NULL)&&(uDebugFile!=stderr)) {
fprintf(uDebugFile,"switching to %s\n",name?name:"stderr");
@@ -317,8 +303,7 @@ uInternalError(char *s,...)
#ifndef HAVE_STRDUP
char *
-uStringDup(str)
- char *str;
+uStringDup(char *str)
{
char *rtrn;
@@ -332,8 +317,7 @@ char *rtrn;
#ifndef HAVE_STRCASECMP
int
-uStrCaseCmp(str1, str2)
- char *str1, *str2;
+uStrCaseCmp(char *str1, char *str2)
{
char buf1[512],buf2[512];
char c, *s;
@@ -359,8 +343,7 @@ uStrCaseCmp(str1, str2)
}
int
-uStrCasePrefix(prefix, str)
- char *prefix, *str;
+uStrCasePrefix(char *prefix, char *str)
{
char c1;
char c2;