From 142b7515e383448aa288ff9c8dd81e3c0173d17c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 16 Sep 1996 21:07:11 +0000 Subject: [PATCH] fixed warnings --- src/libCom/macCore.c | 11 +++++++---- src/libCom/macLib.h | 5 ++++- src/libCom/macLib/macCore.c | 11 +++++++---- src/libCom/macLib/macLib.h | 5 ++++- src/libCom/macLib/macUtil.c | 13 ++++++++----- src/libCom/macUtil.c | 13 ++++++++----- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/libCom/macCore.c b/src/libCom/macCore.c index b1ff3a718..539f1b971 100644 --- a/src/libCom/macCore.c +++ b/src/libCom/macCore.c @@ -150,7 +150,7 @@ macExpandString( /* debug output */ if ( handle->debug & 1 ) - printf( "macExpandString( %s, maxlen = %d )\n", src, maxlen ); + printf( "macExpandString( %s, maxlen = %ld )\n", src, maxlen ); /* expand raw values if necessary */ if ( expand( handle ) < 0 ) @@ -172,7 +172,7 @@ macExpandString( /* debug output */ if ( handle->debug & 1 ) - printf( "macExpandString() -> %d\n", length ); + printf( "macExpandString() -> %ld\n", length ); return length; } @@ -273,7 +273,7 @@ macGetValue( /* if not found, copy name to value and return minus #chars copied */ if ( entry == NULL ) { strncpy( value, name, maxlen ); - return ( value[maxlen-1] == '\0' ) ? -strlen( name ) : -maxlen; + return ( value[maxlen-1] == '\0' ) ? - (long) strlen( name ) : -maxlen; } /* expand raw values if necessary; if fail (can only fail because of @@ -281,7 +281,7 @@ macGetValue( if ( expand( handle ) < 0 ) { macErrMessage0( -1, "macGetValue: failed to expand raw values" ); strncpy( value, name, maxlen ); - return ( value[maxlen-1] == '\0' ) ? -strlen( name ) : -maxlen; + return ( value[maxlen-1] == '\0' ) ? - (long) strlen( name ) : -maxlen; } /* copy value and return +/- #chars copied depending on successful @@ -743,6 +743,9 @@ char *Strdup( char *string ) } /* $Log$ + * Revision 1.1 1996/07/10 14:49:48 mrk + * added macLib + * * Revision 1.9 1996/06/26 09:43:14 wlupton * first released version * diff --git a/src/libCom/macLib.h b/src/libCom/macLib.h index 393e74e0f..a43f141bf 100644 --- a/src/libCom/macLib.h +++ b/src/libCom/macLib.h @@ -26,7 +26,7 @@ /* * Magic number for validating context. */ -#define MAC_MAGIC 0xabadcafe /* ...sells sub-standard coffee? */ +#define MAC_MAGIC 0xbadcafe /* ...sells sub-standard coffee? */ /* * Maximum size of macro name or value string (simpler to make fixed) @@ -192,6 +192,9 @@ macInstallMacros( ); /* $Log$ + * Revision 1.1 1996/07/10 14:49:51 mrk + * added macLib + * * Revision 1.8 1996/06/26 09:43:16 wlupton * first released version * diff --git a/src/libCom/macLib/macCore.c b/src/libCom/macLib/macCore.c index b1ff3a718..539f1b971 100644 --- a/src/libCom/macLib/macCore.c +++ b/src/libCom/macLib/macCore.c @@ -150,7 +150,7 @@ macExpandString( /* debug output */ if ( handle->debug & 1 ) - printf( "macExpandString( %s, maxlen = %d )\n", src, maxlen ); + printf( "macExpandString( %s, maxlen = %ld )\n", src, maxlen ); /* expand raw values if necessary */ if ( expand( handle ) < 0 ) @@ -172,7 +172,7 @@ macExpandString( /* debug output */ if ( handle->debug & 1 ) - printf( "macExpandString() -> %d\n", length ); + printf( "macExpandString() -> %ld\n", length ); return length; } @@ -273,7 +273,7 @@ macGetValue( /* if not found, copy name to value and return minus #chars copied */ if ( entry == NULL ) { strncpy( value, name, maxlen ); - return ( value[maxlen-1] == '\0' ) ? -strlen( name ) : -maxlen; + return ( value[maxlen-1] == '\0' ) ? - (long) strlen( name ) : -maxlen; } /* expand raw values if necessary; if fail (can only fail because of @@ -281,7 +281,7 @@ macGetValue( if ( expand( handle ) < 0 ) { macErrMessage0( -1, "macGetValue: failed to expand raw values" ); strncpy( value, name, maxlen ); - return ( value[maxlen-1] == '\0' ) ? -strlen( name ) : -maxlen; + return ( value[maxlen-1] == '\0' ) ? - (long) strlen( name ) : -maxlen; } /* copy value and return +/- #chars copied depending on successful @@ -743,6 +743,9 @@ char *Strdup( char *string ) } /* $Log$ + * Revision 1.1 1996/07/10 14:49:48 mrk + * added macLib + * * Revision 1.9 1996/06/26 09:43:14 wlupton * first released version * diff --git a/src/libCom/macLib/macLib.h b/src/libCom/macLib/macLib.h index 393e74e0f..a43f141bf 100644 --- a/src/libCom/macLib/macLib.h +++ b/src/libCom/macLib/macLib.h @@ -26,7 +26,7 @@ /* * Magic number for validating context. */ -#define MAC_MAGIC 0xabadcafe /* ...sells sub-standard coffee? */ +#define MAC_MAGIC 0xbadcafe /* ...sells sub-standard coffee? */ /* * Maximum size of macro name or value string (simpler to make fixed) @@ -192,6 +192,9 @@ macInstallMacros( ); /* $Log$ + * Revision 1.1 1996/07/10 14:49:51 mrk + * added macLib + * * Revision 1.8 1996/06/26 09:43:16 wlupton * first released version * diff --git a/src/libCom/macLib/macUtil.c b/src/libCom/macLib/macUtil.c index 2a6a4af5c..301737c0c 100644 --- a/src/libCom/macLib/macUtil.c +++ b/src/libCom/macLib/macUtil.c @@ -140,9 +140,9 @@ macParseDefns( /* debug output */ if ( handle != NULL && handle->debug & 4 ) for ( i = 0; i < num; i += 2 ) - printf( "[%d] %.*s = [%d] %.*s (%s) (%s)\n", - end[i+0] - ptr[i+0], end[i+0] - ptr[i+0], ptr[i+0], - end[i+1] - ptr[i+1], end[i+1] - ptr[i+1], ptr[i+1], + printf( "[%ld] %.*s = [%ld] %.*s (%s) (%s)\n", + (long) (end[i+0] - ptr[i+0]), (int) (end[i+0] - ptr[i+0]), ptr[i+0], + (long) (end[i+1] - ptr[i+1]), (int) (end[i+1] - ptr[i+1]), ptr[i+1], del[i+0] ? "del" : "nodel", del[i+1] ? "del" : "nodel" ); @@ -216,7 +216,7 @@ macParseDefns( /* debug output */ if ( handle->debug & 1 ) - printf( "macParseDefns() -> %d\n", num / 2 ); + printf( "macParseDefns() -> %ld\n", num / 2 ); /* success exit; return number of definitions */ return num / 2; @@ -262,13 +262,16 @@ macInstallMacros( /* debug output */ if ( handle->debug & 1 ) - printf( "macInstallMacros() -> %d\n", n ); + printf( "macInstallMacros() -> %ld\n", n ); /* return number of macros defined */ return n; } /* $Log$ + * Revision 1.1 1996/07/10 14:49:55 mrk + * added macLib + * * Revision 1.6 1996/06/26 09:43:19 wlupton * first released version * diff --git a/src/libCom/macUtil.c b/src/libCom/macUtil.c index 2a6a4af5c..301737c0c 100644 --- a/src/libCom/macUtil.c +++ b/src/libCom/macUtil.c @@ -140,9 +140,9 @@ macParseDefns( /* debug output */ if ( handle != NULL && handle->debug & 4 ) for ( i = 0; i < num; i += 2 ) - printf( "[%d] %.*s = [%d] %.*s (%s) (%s)\n", - end[i+0] - ptr[i+0], end[i+0] - ptr[i+0], ptr[i+0], - end[i+1] - ptr[i+1], end[i+1] - ptr[i+1], ptr[i+1], + printf( "[%ld] %.*s = [%ld] %.*s (%s) (%s)\n", + (long) (end[i+0] - ptr[i+0]), (int) (end[i+0] - ptr[i+0]), ptr[i+0], + (long) (end[i+1] - ptr[i+1]), (int) (end[i+1] - ptr[i+1]), ptr[i+1], del[i+0] ? "del" : "nodel", del[i+1] ? "del" : "nodel" ); @@ -216,7 +216,7 @@ macParseDefns( /* debug output */ if ( handle->debug & 1 ) - printf( "macParseDefns() -> %d\n", num / 2 ); + printf( "macParseDefns() -> %ld\n", num / 2 ); /* success exit; return number of definitions */ return num / 2; @@ -262,13 +262,16 @@ macInstallMacros( /* debug output */ if ( handle->debug & 1 ) - printf( "macInstallMacros() -> %d\n", n ); + printf( "macInstallMacros() -> %ld\n", n ); /* return number of macros defined */ return n; } /* $Log$ + * Revision 1.1 1996/07/10 14:49:55 mrk + * added macLib + * * Revision 1.6 1996/06/26 09:43:19 wlupton * first released version *