fixed warnings
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
+4
-1
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user