This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / call-strs.c
1 #include <stdio.h>
2 char buf[100];
3 char bigbuf[1000];
4 char * s;
5
6 char * str_func1(s1)
7 char *s1;
8 {
9 printf("first string arg is: %s\n", s1);
10 strcpy(bigbuf, s1);
11 return bigbuf;
12 }
13
14 char * str_func(s1,
15 s2,
16 s3,
17 s4,
18 s5,
19 s6,
20 s7)
21 char * s1;
22 char * s2;
23 char * s3;
24 char * s4;
25 char * s5;
26 char * s6;
27 char * s7;
28 {
29 printf("first string arg is: %s\n", s1);
30 printf("second string arg is: %s\n", s2);
31 printf("third string arg is: %s\n", s3);
32 printf("fourth string arg is: %s\n", s4);
33 printf("fifth string arg is: %s\n", s5);
34 printf("sixth string arg is: %s\n", s6);
35 printf("seventh string arg is: %s\n", s7);
36 strcpy(bigbuf, s1);
37 strcat(bigbuf, s2);
38 strcat(bigbuf, s3);
39 strcat(bigbuf, s4);
40 strcat(bigbuf, s5);
41 strcat(bigbuf, s6);
42 strcat(bigbuf, s7);
43 return bigbuf;
44 }
45
46
47 main()
48 {
49 s = &buf[0];
50 strcpy(buf, "test string");
51 str_func("abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx", "yz12");
52 str_func1("abcd");
53 }
54
This page took 0.030698 seconds and 4 git commands to generate.