Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / call-strs.c
blobf3bc8da9166d4aa95b3146fc36db5b6b6e548bb4
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
5 char buf[100];
6 char bigbuf[1000];
7 char * s;
9 #ifdef PROTOTYPES
10 char * str_func1(char *s1)
11 #else
12 char * str_func1(s1)
13 char *s1;
14 #endif
16 printf("first string arg is: %s\n", s1);
17 strcpy(bigbuf, s1);
18 return bigbuf;
21 #ifdef PROTOTYPES
22 char * str_func(
23 char * s1,
24 char * s2,
25 char * s3,
26 char * s4,
27 char * s5,
28 char * s6,
29 char * s7)
30 #else
31 char * str_func(s1,
32 s2,
33 s3,
34 s4,
35 s5,
36 s6,
37 s7)
38 char * s1;
39 char * s2;
40 char * s3;
41 char * s4;
42 char * s5;
43 char * s6;
44 char * s7;
45 #endif
47 printf("first string arg is: %s\n", s1);
48 printf("second string arg is: %s\n", s2);
49 printf("third string arg is: %s\n", s3);
50 printf("fourth string arg is: %s\n", s4);
51 printf("fifth string arg is: %s\n", s5);
52 printf("sixth string arg is: %s\n", s6);
53 printf("seventh string arg is: %s\n", s7);
54 strcpy(bigbuf, s1);
55 strcat(bigbuf, s2);
56 strcat(bigbuf, s3);
57 strcat(bigbuf, s4);
58 strcat(bigbuf, s5);
59 strcat(bigbuf, s6);
60 strcat(bigbuf, s7);
61 return bigbuf;
64 char *
65 link_malloc ()
67 return (char*) malloc (1);
70 int main()
72 s = &buf[0];
73 strcpy(buf, "test string");
74 str_func("abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx", "yz12");
75 str_func1("abcd");
76 return 0;