1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
--- bomber.c.orig 2005-11-06 16:50:04.000000000 +0100
+++ bomber.c 2005-11-06 16:47:35.000000000 +0100
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <sys/uio.h>
@@ -626,8 +627,11 @@
void scrprintf(char *str,...)
{
char output[256],*p,*p2;
+va_list ap;
- vsprintf(output,str,&str+1);
+ va_start(ap, str);
+ vsprintf(output,str,ap);
+ va_end(ap);
p=output;
for(;;)
{
@@ -653,8 +657,11 @@
void bigscrprintf(char *str,...)
{
char output[256],*p,*p2;
+va_list ap;
- vsprintf(output,str,&str+1);
+ va_start(ap, str);
+ vsprintf(output,str,ap);
+ va_end(ap);
p=output;
for(;;)
{
@@ -1873,8 +1880,11 @@
additem(char *item,...)
{
char output[256];
+va_list ap;
- vsprintf(output,item,&item+1);
+ va_start(ap, item);
+ vsprintf(output,item,ap);
+ va_end(ap);
if(menunum<0)
menutitle=menuput;
else
|