-/* File: z-form.c */
+/* File: z-form.c */
+
+/*
+ * Copyright (c) 1997 Ben Harrison
+ *
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies.
+ */
/* Purpose: Low level text formatting -BEN- */
arg = va_arg(vp, int);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ sprintf(tmp, "%c", arg);
/* Done */
break;
/* Access next argument */
arg = va_arg(vp, unsigned long);
- /* Format the argument */
sprintf(tmp, aux, arg);
}
else
/* Access next argument */
arg = va_arg(vp, unsigned int);
-
- /* Format the argument */
sprintf(tmp, aux, arg);
+
}
/* Done */
arg2[1023] = '\0';
/* Format the argument */
- sprintf(tmp, aux, arg2);
+ sprintf(tmp, aux, arg);
/* Done */
break;
arg = va_arg(vp, vptr);
/* Format the "user data" */
- (void)vstrnfmt_aux(tmp, 1000, aux, arg);
+ sprintf(tmp, aux, arg);
/* Done */
break;
#ifdef JP
- for (q = 0; tmp[q]; q++) if ( iskanji(tmp[q]) ) { do_xtra=FALSE;break;}
+ for (q = 0; tmp[q]; q++) if (iskanji(tmp[q])) { do_xtra=FALSE;break;}
#endif
/* Mega-Hack -- handle "capitilization" */
if (do_xtra)
for (q = 0; tmp[q]; q++)
{
/* Notice first non-space */
- if (!isspace(tmp[q]))
+ if (!iswspace(tmp[q]))
{
/* Capitalize if possible */
-#ifdef JP
- if (!iskanji(tmp[q]))
-#endif
- if (islower(tmp[q]))
- tmp[q] = toupper(tmp[q]);
+ if (islower(tmp[q]))
+ tmp[q] = (char)toupper(tmp[q]);
/* Done */
break;