mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 01:43:00 +02:00
textio: add TxErrorV variant
This commit is contained in:
@@ -445,6 +445,9 @@ void CalmaReadError(char *format, ...)
|
||||
{
|
||||
TxError("Error while reading cell \"%s\" ", cifReadCellDef->cd_name);
|
||||
TxError("(byte position %"DLONG_PREFIX"d): ", (dlong)filepos);
|
||||
va_start(args, format);
|
||||
TxErrorV(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
else if ((calmaTotalErrors == 100) && (CIFWarningLevel == CIF_WARN_LIMIT))
|
||||
|
||||
@@ -69,6 +69,7 @@ extern void TxStopMore();
|
||||
|
||||
/* printing procedures with variable arguments lists */
|
||||
extern void TxError(char *, ...);
|
||||
extern void TxErrorV(char *, va_list args);
|
||||
extern void TxPrintf(char *, ...);
|
||||
extern char *TxPrintString(char *, ...);
|
||||
|
||||
|
||||
+8
-4
@@ -302,9 +302,15 @@ TxFlush()
|
||||
*/
|
||||
|
||||
void
|
||||
TxError(char *fmt, ...)
|
||||
{
|
||||
TxError(char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void
|
||||
TxErrorV(char *fmt, va_list args)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
TxFlushOut();
|
||||
@@ -312,7 +318,6 @@ TxError(char *fmt, ...)
|
||||
f = TxMoreFile;
|
||||
else
|
||||
f = stderr;
|
||||
va_start(args, fmt);
|
||||
if (txHavePrompt)
|
||||
{
|
||||
TxUnPrompt();
|
||||
@@ -322,7 +327,6 @@ TxError(char *fmt, ...)
|
||||
else {
|
||||
Vfprintf(f, fmt, args);
|
||||
}
|
||||
va_end(args);
|
||||
TxFlushErr();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user