ext2sim: fixup prototypes for TxError() MainExit()

Correct return and argument types.
Use of <stdarg.h> with modern compiler.
This commit is contained in:
Darryl L. Miles 2025-07-18 12:44:20 +01:00 committed by R. Timothy Edwards
parent bb6e55efb1
commit 2f2fd85af0
1 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "utils/magic.h"
#include "utils/hash.h"
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
char *
@ -87,13 +88,18 @@ TxGetLine(
return (fgets(line, len, stdin));
}
void
TxError(
char *s)
const char *s, ...)
{
vfprintf(stdout, s, &a);
va_list ap;
va_start(ap, s);
vfprintf(stdout, s, ap);
va_end(ap);
fflush(stdout);
}
void
MainExit(
int code)
{