Fix more functions in util/ack for 64-bit hosts.
This continues the fix from changeset aabde0589450. We must use va_list to forward the arguments, because some of the arguments might be 64-bit pointers. A pointer does not fit in an int.
This commit is contained in:
parent
800d4ae032
commit
96ea0a5903
1 changed files with 14 additions and 6 deletions
|
@ -116,30 +116,38 @@ prns(s) register char *s ; {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* VARARGS1 */
|
/* VARARGS1 */
|
||||||
fuerror(fmt,p1,p2,p3,p4,p5,p6,p7) char *fmt ; {
|
void fuerror(const char *fmt, ...) {
|
||||||
/* Fatal user error */
|
/* Fatal user error */
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
fprintf(STDOUT,"%s: ",progname) ;
|
fprintf(STDOUT,"%s: ",progname) ;
|
||||||
fprintf(STDOUT,fmt,p1,p2,p3,p4,p5,p6,p7);
|
vfprintf(STDOUT, fmt, ap);
|
||||||
fprintf(STDOUT,"\n") ;
|
fprintf(STDOUT,"\n") ;
|
||||||
quit(-1) ;
|
quit(-1) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VARARGS1 */
|
/* VARARGS1 */
|
||||||
werror(fmt,p1,p2,p3,p4,p5,p6,p7) char *fmt ; {
|
void werror(const char *fmt, ...) {
|
||||||
/* Warning user error, w_flag */
|
/* Warning user error, w_flag */
|
||||||
|
va_list ap;
|
||||||
if ( w_flag ) return ;
|
if ( w_flag ) return ;
|
||||||
|
va_start(ap, fmt);
|
||||||
fprintf(STDOUT,"%s: warning, ",progname) ;
|
fprintf(STDOUT,"%s: warning, ",progname) ;
|
||||||
fprintf(STDOUT,fmt,p1,p2,p3,p4,p5,p6,p7);
|
vfprintf(STDOUT, fmt, ap);
|
||||||
fprintf(STDOUT,"\n") ;
|
fprintf(STDOUT,"\n") ;
|
||||||
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VARARGS1 */
|
/* VARARGS1 */
|
||||||
error(fmt,p1,p2,p3,p4,p5,p6,p7) char *fmt ; {
|
void error(const char *fmt, ...) {
|
||||||
/* User error, it is the callers responsibility to quit */
|
/* User error, it is the callers responsibility to quit */
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
fprintf(STDOUT,"%s: ",progname) ;
|
fprintf(STDOUT,"%s: ",progname) ;
|
||||||
fprintf(STDOUT,fmt,p1,p2,p3,p4,p5,p6,p7);
|
vfprintf(STDOUT, fmt, ap);
|
||||||
fprintf(STDOUT,"\n") ;
|
fprintf(STDOUT,"\n") ;
|
||||||
n_error++ ;
|
n_error++ ;
|
||||||
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_flush() {
|
do_flush() {
|
||||||
|
|
Loading…
Reference in a new issue