1
0
mirror of https://github.com/simh/simh.git synced 2026-05-04 06:58:38 +00:00

SCP: Removed unused conditional compile referenced to HAS_vsprintf_void and HAS_vsnprintf_void. Avoid emitting redundant \r characters when writing to stdout while a simulator is running. Suggestions from Bob Supnik.

This commit is contained in:
Mark Pizzolato
2015-03-29 16:21:27 -07:00
parent cc442a85cc
commit 137f825811
2 changed files with 15 additions and 73 deletions

View File

@@ -3867,26 +3867,10 @@ int32 i, len;
buf[bufsize-1] = '\0';
while (1) { /* format passed string, args */
#if defined(NO_vsnprintf)
#if defined(HAS_vsprintf_void)
/* Note, this could blow beyond the buffer, and we couldn't tell */
/* That is a limitation of the C runtime library available on this platform */
vsprintf (buf, fmt, arglist);
for (len = 0; len < bufsize-1; len++)
if (buf[len] == 0) break;
#else
len = vsprintf (buf, fmt, arglist);
#endif /* HAS_vsprintf_void */
#else /* NO_vsnprintf */
#if defined(HAS_vsnprintf_void)
vsnprintf (buf, bufsize-1, fmt, arglist);
for (len = 0; len < bufsize-1; len++)
if (buf[len] == 0) break;
#else
#else /* !defined(NO_vsnprintf) */
len = vsnprintf (buf, bufsize-1, fmt, arglist);
#endif /* HAS_vsnprintf_void */
#endif /* NO_vsnprintf */
#endif /* NO_vsnprintf */
/* If the formatted result didn't fit into the buffer, then grow the buffer and try again */