char pbuf[BIGBUFSZ]; /* will get chopped down to BUFSZ-1 if longer */
int ln;
int msgtyp;
-#if !defined(NO_VSNPRINTF)
int vlen = 0;
-#endif
boolean no_repeat;
if (!line || !*line)
return;
if (strchr(line, '%')) {
-#if !defined(NO_VSNPRINTF)
vlen = vsnprintf(pbuf, sizeof(pbuf), line, the_args);
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) && defined(DEBUG)
if (vlen >= (int) sizeof pbuf)
"pline", sizeof pbuf, vlen);
#else
nhUse(vlen);
-#endif
-#else
- Vsprintf(pbuf, line, the_args);
#endif
line = pbuf;
}
char pbuf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
if (strchr(line, '%')) {
-#if !defined(NO_VSNPRINTF)
(void) vsnprintf(pbuf, sizeof(pbuf), line, the_args);
-#else
- Vsprintf(pbuf, line, the_args);
-#endif
line = pbuf;
}
if ((int) strlen(line) > BUFSZ - 1) {
panic("impossible called impossible");
gp.program_state.in_impossible = 1;
-#if !defined(NO_VSNPRINTF)
(void) vsnprintf(pbuf, sizeof(pbuf), s, the_args);
-#else
- Vsprintf(pbuf, s, the_args);
-#endif
va_end(the_args);
pbuf[BUFSZ - 1] = '\0'; /* sanity */
paniclog("impossible", pbuf);
static void
vconfig_error_add(const char *str, va_list the_args)
{ /* start of vconf...() or of nested block in USE_OLDARG's conf...() */
-#if !defined(NO_VSNPRINTF)
int vlen = 0;
-#endif
char buf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
-#if !defined(NO_VSNPRINTF)
vlen = vsnprintf(buf, sizeof buf, str, the_args);
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) && defined(DEBUG)
if (vlen >= (int) sizeof buf)
"config_error_add", sizeof buf, vlen);
#else
nhUse(vlen);
-#endif
-#else
- Vsprintf(buf, str, the_args);
#endif
buf[BUFSZ - 1] = '\0';
config_erradd(buf);
work with 3.7.0. The scoreboard file (RECORD) from 3.6.x or 3.4.x or
3.3.x will work.
-2. If pline.c fails to compile, edit vmsconf.h and uncomment
- #define NO_VSNPRINTF
- to avoid calling a C library routine that wasn't available on older
- versions of VMS. (Note: in the distributed sources, this has already
- been uncommented.)
+2. Ancient C libs will not work; vsnprintf is required.
3. To specify user-preference options in your environment, define the
logical name NETHACKOPTIONS to have the value of a quoted string