1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00
freebsd-ports/games/tt/files/patch-utils.c
Kirill Ponomarev 9bab578685 This is a new port of tetris game, written almost 15 years ago,
but being very playable, highly portable, well-tested, and
still being developed!  It is specifically designed to be
played over terminal lines.  Includes quite a few game-type
options, and just overall-neat piece of software.

PR:		56743
Submitted by:	Alexey Dokuchaev <danfe@regency.nsu.ru>
2003-09-24 18:14:21 +00:00

33 lines
839 B
C

--- utils.c.orig Fri Sep 12 18:01:20 2003
+++ utils.c Fri Sep 12 22:21:05 2003
@@ -30,8 +30,7 @@
# include <poll.h>
#endif
#include <curses.h>
-#undef va_start /* required with Red Hat's ncurses :-P */
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h> /* M001 */
@@ -75,16 +74,13 @@
\***************************************************************************/
/*VARARGS*/
-char *form (va_alist)
- va_dcl
+char *form (const char *fmt_string, ...)
{
va_list pvar;
- char *fmt_string;
static char result[LINELEN];
- va_start (pvar);
- fmt_string = va_arg (pvar, char*);
- (void) vsprintf (result, fmt_string, pvar);
+ va_start (pvar, fmt_string);
+ (void) vsnprintf (result, LINELEN, fmt_string, pvar);
va_end (pvar);
return (result);
}