+2014-11-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * gdb.base/annota1.c: Remove #ifdef PROTOTYPES, keep prototyped
+ variant.
+ * gdb.base/annota3.c: Likewise.
+ * gdb.base/async.c: Likewise.
+ * gdb.base/average.c: Likewise.
+ * gdb.base/call-ar-st.c: Likewise.
+ * gdb.base/call-rt-st.c: Likewise.
+ * gdb.base/call-sc.c: Likewise.
+ * gdb.base/call-strs.c: Likewise.
+ * gdb.base/ending-run.c: Likewise.
+ * gdb.base/execd-prog.c: Likewise.
+ * gdb.base/exprs.c: Likewise.
+ * gdb.base/foll-exec.c: Likewise.
+ * gdb.base/foll-fork.c: Likewise.
+ * gdb.base/foll-vfork.c: Likewise.
+ * gdb.base/funcargs.c: Likewise.
+ * gdb.base/gcore.c: Likewise.
+ * gdb.base/jump.c: Likewise.
+ * gdb.base/langs0.c: Likewise.
+ * gdb.base/langs1.c: Likewise.
+ * gdb.base/langs2.c: Likewise.
+ * gdb.base/mips_pro.c: Likewise.
+ * gdb.base/nodebug.c: Likewise.
+ * gdb.base/opaque0.c: Likewise.
+ * gdb.base/opaque1.c: Likewise.
+ * gdb.base/recurse.c: Likewise.
+ * gdb.base/run.c: Likewise.
+ * gdb.base/scope0.c: Likewise.
+ * gdb.base/scope1.c: Likewise.
+ * gdb.base/setshow.c: Likewise.
+ * gdb.base/setvar.c: Likewise.
+ * gdb.base/shmain.c: Likewise.
+ * gdb.base/shr1.c: Likewise.
+ * gdb.base/shr2.c: Likewise.
+ * gdb.base/sigall.c: Likewise.
+ * gdb.base/signals.c: Likewise.
+ * gdb.base/so-indr-cl.c: Likewise.
+ * gdb.base/solib2.c: Likewise.
+ * gdb.base/structs.c: Likewise.
+ * gdb.base/sum.c: Likewise.
+ * gdb.base/vforked-prog.c: Likewise.
+ * gdb.base/watchpoint.c: Likewise.
+ * gdb.reverse/shr2.c: Likewise.
+ * gdb.reverse/until-reverse.c: Likewise.
+ * gdb.reverse/ur1.c: Likewise.
+ * gdb.reverse/watch-reverse.c: Likewise.
+
2014-11-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
* gdb.base/sepdebug.c: Remove #ifdef PROTOTYPES, keep prototyped
#include <signal.h>
-#ifdef PROTOTYPES
void
handle_USR1 (int sig)
{
}
-#else
-void
-handle_USR1 (sig)
- int sig;
-{
-}
-#endif
int value;
-#ifdef PROTOTYPES
int
main (void)
-#else
-int
-main ()
-#endif
{
int my_array[3] = { 1, 2, 3 }; /* break main */
#include <signal.h>
-#ifdef PROTOTYPES
void
handle_USR1 (int sig)
{
}
-#else
-void
-handle_USR1 (sig)
- int sig;
-{
-}
-#endif
int value;
-#ifdef PROTOTYPES
int
main (void)
-#else
-int
-main ()
-#endif
{
int my_array[3] = { 1, 2, 3 }; /* break main */
-#ifdef PROTOTYPES
int
foo (void)
-#else
-int
-foo ()
-#endif
{
int y;
volatile int x;
return x + y;
}
-#ifdef PROTOTYPES
int
main (void)
-#else
-int
-main ()
-#endif
{
int y, z;
}
-#ifdef PROTOTYPES
int
baz (void)
-#else
-int
-baz ()
-#endif
{
return 5;
}
#include <stdio.h>
#include <stdlib.h>
-#ifdef PROTOTYPES
extern int sum(int *, int, int);
-#else
-extern int sum();
-#endif
#define num 10
static int my_list[num] = {3,4,2,0,2,1,8,3,6,7};
-#ifdef PROTOTYPES
void print_average(int *list, int low, int high)
-#else
-void print_average(list, low, high)
-int *list, low, high;
-#endif
{
int total = 0, num_elements = 0, average = 0;
total = sum(list, low, high);
printf("%10.d\n", average);
}
-#ifdef PROTOTYPES
int main(void)
-#else
-main ()
-#endif
{
char c;
int first = 0, last = 0; /* stop-in-main */
* IN id_int student -- enumerated type
* IN colors shirt -- enumerated type
*****************************************************************/
-#ifdef PROTOTYPES
void print_student_id_shirt_color (id_int student, colors shirt)
-#else
-void print_student_id_shirt_color ( student, shirt )
- id_int student;
- colors shirt;
-#endif
{
printf("student id : %d\t", student);
* PRINT_CHAR_ARRAY :
* IN char array_c[] -- character array
*****************************************************************/
-#ifdef PROTOTYPES
void print_char_array (char array_c[])
-#else
-void print_char_array ( array_c )
- char array_c[];
-#endif
{
int index;
* PRINT_DOUBLE_ARRAY :
* IN double array_d[] -- array of doubles
*****************************************************************/
-#ifdef PROTOTYPES
void print_double_array (double array_d[])
-#else
-void print_double_array (array_d)
- double array_d[];
-#endif
{
int index;
* PRINT_FLOAT_ARRAY:
* IN float array_f[] -- array of floats
*****************************************************************/
-#ifdef PROTOTYPES
void print_float_array (float array_f[])
-#else
-void print_float_array ( array_f )
- float array_f[];
-#endif
{
int index;
* PRINT_INT_ARRAY:
* IN int array_i[] -- array of integers
*****************************************************************/
-#ifdef PROTOTYPES
void print_int_array (int array_i[])
-#else
-void print_int_array ( array_i )
- int array_i[];
-#endif
{
int index;
* IN float array_f[] -- array of floats
* IN double array_d[] -- array of doubles
*****************************************************************/
-#ifdef PROTOTYPES
void print_all_arrays(int array_i[], char array_c[], float array_f[], double array_d[])
-#else
-void print_all_arrays( array_i, array_c, array_f, array_d )
- int array_i[];
- char array_c[];
- float array_f[];
- double array_d[];
-#endif
{
print_int_array(array_i); /* -step1- */
print_char_array(array_c); /* -next1- */
* A do nothing function. Used to provide a point at which calls can be made.
* IN int seed
*****************************************************************/
-#ifdef PROTOTYPES
void compute_with_small_structs (int seed)
-#else
-void compute_with_small_structs ( seed )
- int seed;
-#endif
{
struct small_rep_info_t array[4];
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags (struct bit_flags_t *bit_flags, unsigned a, unsigned b, unsigned g, unsigned d, unsigned e, unsigned o)
-#else
-void init_bit_flags ( bit_flags, a, b, g, d, e, o )
-struct bit_flags_t *bit_flags;
-unsigned a;
-unsigned b;
-unsigned g;
-unsigned d;
-unsigned e;
-unsigned o;
-#endif
{
bit_flags->alpha = a;
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags_combo (struct bit_flags_combo_t *bit_flags_combo, unsigned a, unsigned b, char ch1, unsigned g, unsigned d, char ch2, unsigned e, unsigned o)
-#else
-void init_bit_flags_combo ( bit_flags_combo, a, b, ch1, g, d, ch2, e, o )
- struct bit_flags_combo_t *bit_flags_combo;
- unsigned a;
- unsigned b;
- char ch1;
- unsigned g;
- unsigned d;
- char ch2;
- unsigned e;
- unsigned o;
-#endif
{
bit_flags_combo->alpha = a; /* -step3- */
* OUT struct one_double_t *one_double -- structure to fill
* IN double init_val
*****************************************************************/
-#ifdef PROTOTYPES
void init_one_double (struct one_double_t *one_double, double init_val)
-#else
-void init_one_double ( one_double, init_val )
- struct one_double_t *one_double;
- double init_val;
-#endif
{
one_double->double1 = init_val;
* IN float init_val1
* IN float init_val2
*****************************************************************/
-#ifdef PROTOTYPES
void init_two_floats (struct two_floats_t *two_floats, float init_val1, float init_val2)
-#else
-void init_two_floats ( two_floats, init_val1, init_val2 )
- struct two_floats_t *two_floats;
- float init_val1;
- float init_val2;
-#endif
{
two_floats->float1 = init_val1;
two_floats->float2 = init_val2;
* IN char init_val1
* IN char init_val2
*****************************************************************/
-#ifdef PROTOTYPES
void init_two_chars (struct two_char_t *two_char, char init_val1, char init_val2)
-#else
-void init_two_chars ( two_char, init_val1, init_val2 )
- struct two_char_t *two_char;
- char init_val1;
- char init_val2;
-#endif
{
two_char->ch1 = init_val1;
* IN char init_val2
* IN char init_val3
*****************************************************************/
-#ifdef PROTOTYPES
void init_three_chars (struct three_char_t *three_char, char init_val1, char init_val2, char init_val3)
-#else
-void init_three_chars ( three_char, init_val1, init_val2, init_val3 )
- struct three_char_t *three_char;
- char init_val1;
- char init_val2;
- char init_val3;
-#endif
{
three_char->ch1 = init_val1;
* IN char init_val4
* IN char init_val5
*****************************************************************/
-#ifdef PROTOTYPES
void init_five_chars (struct five_char_t *five_char, char init_val1, char init_val2, char init_val3, char init_val4, char init_val5)
-#else
-void init_five_chars ( five_char, init_val1, init_val2, init_val3,init_val4,init_val5 )
- struct five_char_t *five_char;
- char init_val1;
- char init_val2;
- char init_val3;
- char init_val4;
- char init_val5;
-#endif
{
five_char->ch1 = init_val1;
five_char->ch2 = init_val2;
* IN int init_val1
* IN char init_val2
*****************************************************************/
-#ifdef PROTOTYPES
void init_int_char_combo (struct int_char_combo_t *combo, int init_val1, char init_val2)
-#else
-void init_int_char_combo ( combo, init_val1, init_val2 )
- struct int_char_combo_t *combo;
- int init_val1;
- char init_val2;
-#endif
{
combo->int1 = init_val1;
* OUT struct small_rep_into_t *small_struct -- structure to be filled
* IN int seed
*****************************************************************/
-#ifdef PROTOTYPES
void init_struct_rep(struct small_rep_info_t *small_struct, int seed)
-#else
-void init_struct_rep( small_struct, seed )
- struct small_rep_info_t *small_struct;
- int seed;
-#endif
{
small_struct->value = 2 + (seed*2);
* Takes all the small structures as input and calls the appropriate
* initialization routine for each structure
*****************************************************************/
-#ifdef PROTOTYPES
void init_small_structs (
struct small_rep_info_t *struct1,
struct small_rep_info_t *struct2,
struct two_floats_t *f1,
struct two_floats_t *f2,
struct two_floats_t *f3)
-#else
-void init_small_structs (struct1, struct2, struct3,struct4,flags,flags_combo,
-three_char, five_char,int_char_combo, d1, d2,d3,f1,f2,f3)
- struct small_rep_info_t *struct1;
- struct small_rep_info_t *struct2;
- struct small_rep_info_t *struct3;
- struct small_rep_info_t *struct4;
- struct bit_flags_t *flags;
- struct bit_flags_combo_t *flags_combo;
- struct three_char_t *three_char;
- struct five_char_t *five_char;
- struct int_char_combo_t *int_char_combo;
- struct one_double_t *d1;
- struct one_double_t *d2;
- struct one_double_t *d3;
- struct two_floats_t *f1;
- struct two_floats_t *f2;
- struct two_floats_t *f3;
-#endif
{
init_bit_flags(flags, (unsigned)1, (unsigned)0, (unsigned)1,
* PRINT_TEN_DOUBLES :
* ?????????????????????????????
****************************************************************/
-#ifdef PROTOTYPES
void print_ten_doubles (
double d1,
double d2,
double d8,
double d9,
double d10)
-#else
-void print_ten_doubles ( d1, d2, d3, d4, d5, d6, d7, d8, d9, d10 )
- double d1;
- double d2;
- double d3;
- double d4;
- double d5;
- double d6;
- double d7;
- double d8;
- double d9;
- double d10;
-#endif
{
printf("Two Doubles : %f\t%f\n", d1, d2);
* PRINT_BIT_FLAGS :
* IN struct bit_flags_t bit_flags
****************************************************************/
-#ifdef PROTOTYPES
void print_bit_flags (struct bit_flags_t bit_flags)
-#else
-void print_bit_flags ( bit_flags )
-struct bit_flags_t bit_flags;
-#endif
{
if (bit_flags.alpha) printf("alpha\n");
* PRINT_BIT_FLAGS_COMBO :
* IN struct bit_flags_combo_t bit_flags_combo
****************************************************************/
-#ifdef PROTOTYPES
void print_bit_flags_combo (struct bit_flags_combo_t bit_flags_combo)
-#else
-void print_bit_flags_combo ( bit_flags_combo )
- struct bit_flags_combo_t bit_flags_combo;
-#endif
{
if (bit_flags_combo.alpha) printf("alpha\n");
* PRINT_ONE_DOUBLE :
* IN struct one_double_t one_double
****************************************************************/
-#ifdef PROTOTYPES
void print_one_double (struct one_double_t one_double)
-#else
-void print_one_double ( one_double )
-struct one_double_t one_double;
-#endif
{
printf("Contents of one_double_t: \n\n");
* PRINT_TWO_FLOATS :
* IN struct two_floats_t two_floats
****************************************************************/
-#ifdef PROTOTYPES
void print_two_floats (struct two_floats_t two_floats)
-#else
-void print_two_floats ( two_floats )
-struct two_floats_t two_floats;
-#endif
{
printf("Contents of two_floats_t: \n\n");
* PRINT_TWO_CHARS :
* IN struct two_char_t two_char
****************************************************************/
-#ifdef PROTOTYPES
void print_two_chars (struct two_char_t two_char)
-#else
-void print_two_chars ( two_char )
-struct two_char_t two_char;
-#endif
{
printf("Contents of two_char_t: \n\n");
* PRINT_THREE_CHARS :
* IN struct three_char_t three_char
****************************************************************/
-#ifdef PROTOTYPES
void print_three_chars (struct three_char_t three_char)
-#else
-void print_three_chars ( three_char )
-struct three_char_t three_char;
-#endif
{
printf("Contents of three_char_t: \n\n");
* PRINT_FIVE_CHARS :
* IN struct five_char_t five_char
****************************************************************/
-#ifdef PROTOTYPES
void print_five_chars (struct five_char_t five_char)
-#else
-void print_five_chars ( five_char )
-struct five_char_t five_char;
-#endif
{
printf("Contents of five_char_t: \n\n");
* PRINT_INT_CHAR_COMBO :
* IN struct int_char_combo_t int_char_combo
****************************************************************/
-#ifdef PROTOTYPES
void print_int_char_combo (struct int_char_combo_t int_char_combo)
-#else
-void print_int_char_combo ( int_char_combo )
-struct int_char_combo_t int_char_combo;
-#endif
{
printf("Contents of int_char_combo_t: \n\n");
* IN struct small_rep_info_t struct2
* IN struct small_rep_info_t struct3
****************************************************************/
-#ifdef PROTOTYPES
void print_struct_rep(
struct small_rep_info_t struct1,
struct small_rep_info_t struct2,
struct small_rep_info_t struct3)
-#else
-void print_struct_rep( struct1, struct2, struct3)
- struct small_rep_info_t struct1;
- struct small_rep_info_t struct2;
- struct small_rep_info_t struct3;
-#endif
{
* IN struct small_rep_info_t struct3
* IN struct small_rep_info_t struct4
****************************************************************/
-#ifdef PROTOTYPES
void sum_struct_print (
int seed,
struct small_rep_info_t struct1,
struct small_rep_info_t struct2,
struct small_rep_info_t struct3,
struct small_rep_info_t struct4)
-#else
-void sum_struct_print ( seed, struct1, struct2, struct3, struct4)
- int seed;
- struct small_rep_info_t struct1;
- struct small_rep_info_t struct2;
- struct small_rep_info_t struct3;
- struct small_rep_info_t struct4;
-#endif
{
int sum;
* All of the small structures of odd sizes (40 bits, 8bits, etc.)
* are pushed onto the stack.
****************************************************************/
-#ifdef PROTOTYPES
void print_small_structs (
struct small_rep_info_t struct1,
struct small_rep_info_t struct2,
struct two_floats_t f1,
struct two_floats_t f2,
struct two_floats_t f3)
-#else
-void print_small_structs ( struct1, struct2, struct3, struct4, flags,
-flags_combo, three_char, five_char, int_char_combo, d1, d2,d3,f1,f2,f3)
- struct small_rep_info_t struct1;
- struct small_rep_info_t struct2;
- struct small_rep_info_t struct3;
- struct small_rep_info_t struct4;
- struct bit_flags_t flags;
- struct bit_flags_combo_t flags_combo;
- struct three_char_t three_char;
- struct five_char_t five_char;
- struct int_char_combo_t int_char_combo;
- struct one_double_t d1;
- struct one_double_t d2;
- struct one_double_t d3;
- struct two_floats_t f1;
- struct two_floats_t f2;
- struct two_floats_t f3;
-#endif
{
print_bit_flags(flags);
print_bit_flags_combo(flags_combo);
* may force more space to be pushed onto the stack as part of the callers
* frame.
****************************************************************/
-#ifdef PROTOTYPES
void print_long_arg_list (
double a,
double b,
struct two_floats_t f1,
struct two_floats_t f2,
struct two_floats_t f3)
-#else
-void print_long_arg_list ( a, b, c, d, e, f, struct1, struct2, struct3,
-struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1,d2,d3,
-f1, f2, f3 )
- double a;
- double b;
- int c;
- int d;
- int e;
- int f;
- struct small_rep_info_t struct1;
- struct small_rep_info_t struct2;
- struct small_rep_info_t struct3;
- struct small_rep_info_t struct4;
- struct bit_flags_t flags;
- struct bit_flags_combo_t flags_combo;
- struct three_char_t three_char;
- struct five_char_t five_char;
- struct int_char_combo_t int_char_combo;
- struct one_double_t d1;
- struct one_double_t d2;
- struct one_double_t d3;
- struct two_floats_t f1;
- struct two_floats_t f2;
- struct two_floats_t f3;
-#endif
{
printf("double : %f\n", a); /* -step2- */
printf("double : %f\n", b);
}
-#ifdef PROTOTYPES
void print_one_large_struct (struct array_rep_info_t linked_list1)
-#else
-void print_one_large_struct( linked_list1 )
- struct array_rep_info_t linked_list1;
-#endif
{
/* printf("Contents of linked list1: \n\n");
* IN struct array_rep_info_t linked_list2
* IN struct array_rep_info_t linked_list3
****************************************************************/
-#ifdef PROTOTYPES
void print_array_rep(
struct array_rep_info_t linked_list1,
struct array_rep_info_t linked_list2,
struct array_rep_info_t linked_list3)
-#else
-void print_array_rep( linked_list1, linked_list2, linked_list3 )
- struct array_rep_info_t linked_list1;
- struct array_rep_info_t linked_list2;
- struct array_rep_info_t linked_list3;
-#endif
{
int index;
* IN struct array_rep_info_t linked_list3
* IN struct array_rep_info_t linked_list4
****************************************************************/
-#ifdef PROTOTYPES
void sum_array_print (
int seed,
struct array_rep_info_t linked_list1,
struct array_rep_info_t linked_list2,
struct array_rep_info_t linked_list3,
struct array_rep_info_t linked_list4)
-#else
-void sum_array_print ( seed, linked_list1, linked_list2, linked_list3,linked_list4)
- int seed;
- struct array_rep_info_t linked_list1;
- struct array_rep_info_t linked_list2;
- struct array_rep_info_t linked_list3;
- struct array_rep_info_t linked_list4;
-#endif
{
int index;
int sum;
* IN struct array_rep_info_t *linked_list
* IN int seed
****************************************************************/
-#ifdef PROTOTYPES
void init_array_rep(
struct array_rep_info_t *linked_list,
int seed)
-#else
-void init_array_rep( linked_list, seed )
- struct array_rep_info_t *linked_list;
- int seed;
-#endif
{
int index;
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags_char (
struct bit_flags_char_t *bit_flags,
unsigned a,
unsigned d,
unsigned e,
unsigned o)
-#else
-void init_bit_flags_char (bit_flags,a,b,g,d,e,o)
-struct bit_flags_char_t *bit_flags;
-unsigned a;
-unsigned b;
-unsigned g;
-unsigned d;
-unsigned e;
-unsigned o;
-#endif
{
bit_flags->alpha = a;
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags_short (
struct bit_flags_short_t *bit_flags,
unsigned a,
unsigned d,
unsigned e,
unsigned o)
-#else
-void init_bit_flags_short (bit_flags,a,b,g,d,e,o)
-struct bit_flags_short_t *bit_flags;
-unsigned a;
-unsigned b;
-unsigned g;
-unsigned d;
-unsigned e;
-unsigned o;
-#endif
{
bit_flags->alpha = a;
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags (
struct bit_flags_t *bit_flags,
unsigned a,
unsigned d,
unsigned e,
unsigned o)
-#else
-void init_bit_flags (bit_flags,a,b,g,d,e,o)
-struct bit_flags_t *bit_flags;
-unsigned a;
-unsigned b;
-unsigned g;
-unsigned d;
-unsigned e;
-unsigned o;
-#endif
{
bit_flags->alpha = a;
* IN unsigned e -- 0 or 1
* IN unsigned o -- 0 or 1
*****************************************************************/
-#ifdef PROTOTYPES
void init_bit_flags_combo (
struct bit_flags_combo_t *bit_flags_combo,
unsigned a,
char ch2,
unsigned e,
unsigned o)
-#else
-void init_bit_flags_combo (bit_flags_combo, a, b, ch1, g, d, ch2, e, o)
-struct bit_flags_combo_t *bit_flags_combo;
-unsigned a;
-unsigned b;
-char ch1;
-unsigned g;
-unsigned d;
-char ch2;
-unsigned e;
-unsigned o;
-#endif
{
bit_flags_combo->alpha = a;
* OUT struct one_double_t *one_double -- structure to fill
* IN double init_val
*****************************************************************/
-#ifdef PROTOTYPES
void init_one_double ( struct one_double_t *one_double, double init_val)
-#else
-void init_one_double (one_double, init_val)
-struct one_double_t *one_double;
-double init_val;
-#endif
{
one_double->double1 = init_val;
* IN float init_val1
* IN float init_val2
*****************************************************************/
-#ifdef PROTOTYPES
void init_two_floats (
struct two_floats_t *two_floats,
float init_val1,
float init_val2)
-#else
-void init_two_floats (two_floats, init_val1, init_val2)
-struct two_floats_t *two_floats;
-float init_val1;
-float init_val2;
-#endif
{
two_floats->float1 = init_val1;
* IN char init_val2
* IN char init_val3
*****************************************************************/
-#ifdef PROTOTYPES
void init_three_chars (
struct three_char_t *three_char,
char init_val1,
char init_val2,
char init_val3)
-#else
-void init_three_chars ( three_char, init_val1, init_val2, init_val3)
-struct three_char_t *three_char;
-char init_val1;
-char init_val2;
-char init_val3;
-#endif
{
three_char->ch1 = init_val1;
* IN char init_val4
* IN char init_val5
*****************************************************************/
-#ifdef PROTOTYPES
void init_five_chars (
struct five_char_t *five_char,
char init_val1,
char init_val3,
char init_val4,
char init_val5)
-#else
-void init_five_chars ( five_char, init_val1, init_val2, init_val3, init_val4, init_val5)
-struct five_char_t *five_char;
-char init_val1;
-char init_val2;
-char init_val3;
-char init_val4;
-char init_val5;
-#endif
{
five_char->ch1 = init_val1;
* IN int init_val1
* IN char init_val2
*****************************************************************/
-#ifdef PROTOTYPES
void init_int_char_combo (
struct int_char_combo_t *combo,
int init_val1,
char init_val2)
-#else
-void init_int_char_combo ( combo, init_val1, init_val2)
-struct int_char_combo_t *combo;
-int init_val1;
-char init_val2;
-#endif
{
combo->int1 = init_val1;
* OUT struct small_rep_into_t *small_struct -- structure to be filled
* IN int seed
*****************************************************************/
-#ifdef PROTOTYPES
void init_struct_rep(
struct small_rep_info_t *small_struct,
int seed)
-#else
-void init_struct_rep( small_struct, seed)
-struct small_rep_info_t *small_struct;
-int seed;
-#endif
{
small_struct->value = 2 + (seed*2);
* PRINT_BIT_FLAGS_CHAR :
* IN struct bit_flags_char_t bit_flags
****************************************************************/
-#ifdef PROTOTYPES
struct bit_flags_char_t print_bit_flags_char (struct bit_flags_char_t bit_flags)
-#else
-struct bit_flags_char_t print_bit_flags_char ( bit_flags)
-struct bit_flags_char_t bit_flags;
-#endif
{
if (bit_flags.alpha) printf("alpha\n");
* PRINT_BIT_FLAGS_SHORT :
* IN struct bit_flags_short_t bit_flags
****************************************************************/
-#ifdef PROTOTYPES
struct bit_flags_short_t print_bit_flags_short (struct bit_flags_short_t bit_flags)
-#else
-struct bit_flags_short_t print_bit_flags_short ( bit_flags)
-struct bit_flags_short_t bit_flags;
-#endif
{
if (bit_flags.alpha) printf("alpha\n");
* PRINT_BIT_FLAGS :
* IN struct bit_flags_t bit_flags
****************************************************************/
-#ifdef PROTOTYPES
struct bit_flags_t print_bit_flags (struct bit_flags_t bit_flags)
-#else
-struct bit_flags_t print_bit_flags ( bit_flags)
-struct bit_flags_t bit_flags;
-#endif
{
if (bit_flags.alpha) printf("alpha\n");
* PRINT_BIT_FLAGS_COMBO :
* IN struct bit_flags_combo_t bit_flags_combo
****************************************************************/
-#ifdef PROTOTYPES
struct bit_flags_combo_t print_bit_flags_combo (struct bit_flags_combo_t bit_flags_combo)
-#else
-struct bit_flags_combo_t print_bit_flags_combo ( bit_flags_combo )
-struct bit_flags_combo_t bit_flags_combo;
-#endif
{
if (bit_flags_combo.alpha) printf("alpha\n");
* PRINT_ONE_DOUBLE :
* IN struct one_double_t one_double
****************************************************************/
-#ifdef PROTOTYPES
struct one_double_t print_one_double (struct one_double_t one_double)
-#else
-struct one_double_t print_one_double ( one_double )
-struct one_double_t one_double;
-#endif
{
printf("Contents of one_double_t: \n\n");
* PRINT_TWO_FLOATS :
* IN struct two_floats_t two_floats
****************************************************************/
-#ifdef PROTOTYPES
struct two_floats_t print_two_floats (struct two_floats_t two_floats)
-#else
-struct two_floats_t print_two_floats ( two_floats )
-struct two_floats_t two_floats;
-#endif
{
printf("Contents of two_floats_t: \n\n");
* PRINT_THREE_CHARS :
* IN struct three_char_t three_char
****************************************************************/
-#ifdef PROTOTYPES
struct three_char_t print_three_chars (struct three_char_t three_char)
-#else
-struct three_char_t print_three_chars ( three_char )
-struct three_char_t three_char;
-#endif
{
printf("Contents of three_char_t: \n\n");
* PRINT_FIVE_CHARS :
* IN struct five_char_t five_char
****************************************************************/
-#ifdef PROTOTYPES
struct five_char_t print_five_chars (struct five_char_t five_char)
-#else
-struct five_char_t print_five_chars ( five_char )
-struct five_char_t five_char;
-#endif
{
printf("Contents of five_char_t: \n\n");
* PRINT_INT_CHAR_COMBO :
* IN struct int_char_combo_t int_char_combo
****************************************************************/
-#ifdef PROTOTYPES
struct int_char_combo_t print_int_char_combo (struct int_char_combo_t int_char_combo)
-#else
-struct int_char_combo_t print_int_char_combo ( int_char_combo )
-struct int_char_combo_t int_char_combo;
-#endif
{
printf("Contents of int_char_combo_t: \n\n");
/*****************************************************************
* PRINT_STRUCT_REP :
****************************************************************/
-#ifdef PROTOTYPES
struct small_rep_info_t print_struct_rep(struct small_rep_info_t struct1)
-#else
-struct small_rep_info_t print_struct_rep( struct1 )
-struct small_rep_info_t struct1;
-#endif
{
printf("Contents of struct1: \n\n");
}
-#ifdef PROTOTYPES
struct array_rep_info_t print_one_large_struct(struct array_rep_info_t linked_list1)
-#else
-struct array_rep_info_t print_one_large_struct( linked_list1 )
-struct array_rep_info_t linked_list1;
-#endif
{
* IN struct array_rep_info_t *linked_list
* IN int seed
****************************************************************/
-#ifdef PROTOTYPES
void init_array_rep(struct array_rep_info_t *linked_list, int seed)
-#else
-void init_array_rep( linked_list, seed )
-struct array_rep_info_t *linked_list;
-int seed;
-#endif
{
int index;
return foo;
}
-#ifdef PROTOTYPES
void Fun(T foo)
-#else
-void Fun(foo)
- T foo;
-#endif
{
L = foo;
}
char bigbuf[1000];
char * s;
-#ifdef PROTOTYPES
char * str_func1(char *s1)
-#else
-char * str_func1(s1)
-char *s1;
-#endif
{
printf("first string arg is: %s\n", s1);
strcpy(bigbuf, s1);
return bigbuf;
}
-#ifdef PROTOTYPES
char * str_func(
char * s1,
char * s2,
char * s5,
char * s6,
char * s7)
-#else
-char * str_func(s1,
- s2,
- s3,
- s4,
- s5,
- s6,
- s7)
-char * s1;
-char * s2;
-char * s3;
-char * s4;
-char * s5;
-char * s6;
-char * s7;
-#endif
{
printf("first string arg is: %s\n", s1);
printf("second string arg is: %s\n", s2);
#include <stdio.h>
#include <stdlib.h>
-#ifdef PROTOTYPES
int callee (int x)
-#else
-int callee( x )
-int x;
-#endif
{
int y = x * x; /* -break1- */
return (y - 2);
*/
int global_i = 0;
-#ifdef PROTOTYPES
int main (int argc, char **argv)
-#else
-main (argc, argv)
- int argc;
- char * argv[];
-#endif
{
/* There is a local_j in foll-exec, which exec's us. We
should not be able to see that other definition of local_j
-#ifdef PROTOTYPES
int main (int argc, char **argv, char **envp)
-#else
-main (argc, argv, envp)
- int argc;
- char **argv;
- char **envp;
-#endif
{
extern void dummy();
dummy();
int global_i = 100;
-#ifdef PROTOTYPES
int main (void)
-#else
-main ()
-#endif
{
int local_j = global_i+1;
int local_k = local_j+1;
#include <unistd.h>
#include <stdlib.h>
-#ifdef PROTOTYPES
void callee (int i)
-#else
-void callee (i)
- int i;
-#endif
{
/* Any output corrupts GDB CLI expect strings.
printf("callee: %d\n", i); */
}
-#ifdef PROTOTYPES
int main (void)
-#else
-main ()
-#endif
{
int pid;
int v = 5;
#include <stdio.h>
#include <unistd.h>
-#ifdef PROTOTYPES
int main (void)
-#else
-main ()
-#endif
{
int pid;
/* Test various permutations and interleaving of integral arguments */
-#ifdef PROTOTYPES
void call0a (char c, short s, int i, long l)
-#else
-call0a (c, s, i, l)
-char c; short s; int i; long l;
-#endif
{
c = 'a';
s = 5;
l = 7;
}
-#ifdef PROTOTYPES
void call0b (short s, int i, long l, char c)
-#else
-call0b (s, i, l, c)
-short s; int i; long l; char c;
-#endif
{
s = 6; i = 7; l = 8; c = 'j';
}
-#ifdef PROTOTYPES
void call0c (int i, long l, char c, short s)
-#else
-call0c (i, l, c, s)
-int i; long l; char c; short s;
-#endif
{
i = 3; l = 4; c = 'k'; s = 5;
}
-#ifdef PROTOTYPES
void call0d (long l, char c, short s, int i)
-#else
-call0d (l, c, s, i)
-long l; char c; short s; int i;
-#endif
{
l = 7; c = 'z'; s = 8; i = 9;
}
-#ifdef PROTOTYPES
void call0e (char c1, long l, char c2, int i, char c3, short s, char c4, char c5)
-#else
-call0e (c1, l, c2, i, c3, s, c4, c5)
-char c1; long l; char c2; int i; char c3; short s; char c4; char c5;
-#endif
{
c1 = 'a'; l = 5; c2 = 'b'; i = 7; c3 = 'c'; s = 7; c4 = 'f'; c5 = 'g';
}
/* Test various permutations and interleaving of unsigned integral arguments */
-#ifdef PROTOTYPES
void call1a (unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call1a (uc, us, ui, ul)
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
uc = 5; us = 6; ui = 7; ul = 8;
}
-#ifdef PROTOTYPES
void call1b (unsigned short us, unsigned int ui, unsigned long ul, unsigned char uc)
-#else
-call1b (us, ui, ul, uc)
-unsigned short us; unsigned int ui; unsigned long ul; unsigned char uc;
-#endif
{
uc = 5; us = 6; ui = 7; ul = 8;
}
-#ifdef PROTOTYPES
void call1c (unsigned int ui, unsigned long ul, unsigned char uc, unsigned short us)
-#else
-call1c (ui, ul, uc, us)
-unsigned int ui; unsigned long ul; unsigned char uc; unsigned short us;
-#endif
{
uc = 5; us = 6; ui = 7; ul = 8;
}
-#ifdef PROTOTYPES
void call1d (unsigned long ul, unsigned char uc, unsigned short us, unsigned int ui)
-#else
-call1d (ul, uc, us, ui)
-unsigned long ul; unsigned char uc; unsigned short us; unsigned int ui;
-#endif
{
uc = 5; us = 6; ui = 7; ul = 8;
}
-#ifdef PROTOTYPES
void call1e (unsigned char uc1, unsigned long ul, unsigned char uc2, unsigned int ui, unsigned char uc3, unsigned short us, unsigned char uc4, unsigned char uc5)
-#else
-call1e (uc1, ul, uc2, ui, uc3, us, uc4, uc5)
-unsigned char uc1; unsigned long ul; unsigned char uc2; unsigned int ui;
-unsigned char uc3; unsigned short us; unsigned char uc4; unsigned char uc5;
-#endif
{
uc1 = 5; ul = 7; uc2 = 8; ui = 9; uc3 = 10; us = 11; uc4 = 12; uc5 = 55;
}
floating point arguments. */
-#ifdef PROTOTYPES
void call2a (char c, float f1, short s, double d1, int i, float f2, long l, double d2)
-#else
-call2a (c, f1, s, d1, i, f2, l, d2)
-char c; float f1; short s; double d1; int i; float f2; long l; double d2;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2b (float f1, short s, double d1, int i, float f2, long l, double d2, char c)
-#else
-call2b (f1, s, d1, i, f2, l, d2, c)
-float f1; short s; double d1; int i; float f2; long l; double d2; char c;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2c (short s, double d1, int i, float f2, long l, double d2, char c, float f1)
-#else
-call2c (s, d1, i, f2, l, d2, c, f1)
-short s; double d1; int i; float f2; long l; double d2; char c; float f1;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2d (double d1, int i, float f2, long l, double d2, char c, float f1, short s)
-#else
-call2d (d1, i, f2, l, d2, c, f1, s)
-double d1; int i; float f2; long l; double d2; char c; float f1; short s;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2e (int i, float f2, long l, double d2, char c, float f1, short s, double d1)
-#else
-call2e (i, f2, l, d2, c, f1, s, d1)
-int i; float f2; long l; double d2; char c; float f1; short s; double d1;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2f (float f2, long l, double d2, char c, float f1, short s, double d1, int i)
-#else
-call2f (f2, l, d2, c, f1, s, d1, i)
-float f2; long l; double d2; char c; float f1; short s; double d1; int i;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2g (long l, double d2, char c, float f1, short s, double d1, int i, float f2)
-#else
-call2g (l, d2, c, f1, s, d1, i, f2)
-long l; double d2; char c; float f1; short s; double d1; int i; float f2;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2h (double d2, char c, float f1, short s, double d1, int i, float f2, long l)
-#else
-call2h (d2, c, f1, s, d1, i, f2, l)
-double d2; char c; float f1; short s; double d1; int i; float f2; long l;
-#endif
{
c = 'a'; f1 = 0.0; s = 5; d1 = 0.0; i = 6; f2 = 0.1; l = 7; d2 = 0.2;
}
-#ifdef PROTOTYPES
void call2i (char c1, float f1, char c2, char c3, double d1, char c4, char c5, char c6, float f2, short s, char c7, double d2)
-#else
-call2i (c1, f1, c2, c3, d1, c4, c5, c6, f2, s, c7, d2)
-char c1; float f1; char c2; char c3; double d1; char c4; char c5; char c6;
-float f2; short s; char c7; double d2;
-#endif
{
c1 = 'a'; f1 = 0.0; c2 = 5; d1 = 0.0; c3 = 6; f2 = 0.1; c4 = 7; d2 = 0.2;
c5 = 's'; c6 = 'f'; c7 = 'z'; s = 77;
/* Test pointers to various integral and floating types. */
-#ifdef PROTOTYPES
void call3a (char *cp, short *sp, int *ip, long *lp)
-#else
-call3a (cp, sp, ip, lp)
-char *cp; short *sp; int *ip; long *lp;
-#endif
{
cp = 0; sp = 0; ip = 0; lp = 0;
}
-#ifdef PROTOTYPES
void call3b (unsigned char *ucp, unsigned short *usp, unsigned int *uip, unsigned long *ulp)
-#else
-call3b (ucp, usp, uip, ulp)
-unsigned char *ucp; unsigned short *usp; unsigned int *uip;
-unsigned long *ulp;
-#endif
{
ucp = 0; usp = 0; uip = 0; ulp = 0;
}
-#ifdef PROTOTYPES
void call3c (float *fp, double *dp)
-#else
-call3c (fp, dp)
-float *fp; double *dp;
-#endif
{
fp = 0; dp = 0;
}
/* Test various _Complex type args. */
-#ifdef PROTOTYPES
void callca (float _Complex f1, float _Complex f2, float _Complex f3)
-#else
-callca (f1, f2, f3)
-float _Complex f1; float _Complex f2; float _Complex f3;
-#endif
{
}
-#ifdef PROTOTYPES
void callcb (double _Complex d1, double _Complex d2, double _Complex d3)
-#else
-callcb (d1, d2, d3)
-double _Complex d1; double _Complex d2; double _Complex d3;
-#endif
{
}
-#ifdef PROTOTYPES
void callcc (long double _Complex ld1, long double _Complex ld2, long double _Complex ld3)
-#else
-callcc (ld1, ld2, ld3)
-long double _Complex ld1; long double _Complex ld2; long double _Complex ld3;
-#endif
{
}
-#ifdef PROTOTYPES
void callcd (float _Complex fc1, double _Complex dc1, long double _Complex ldc1)
-#else
-callcd (fc1, dc1, ldc1)
-float _Complex fc1; double _Complex dc1; long double _Complex ldc1;
-#endif
{
}
-#ifdef PROTOTYPES
void callce (double _Complex dc1, long double _Complex ldc1, float _Complex fc1)
-#else
-callce (dc1, ldc1, fc1)
-double _Complex dc1; long double _Complex ldc1; float _Complex fc1;
-#endif
{
}
-#ifdef PROTOTYPES
void callcf (long double _Complex ldc1, float _Complex fc1, double _Complex dc1)
-#else
-callcf (ldc1, fc1, dc1)
-long double _Complex ldc1; float _Complex fc1; double _Complex dc1;
-#endif
{
}
/* Test passing _Complex type and integral. */
-#ifdef PROTOTYPES
void callc1a (char c, short s, int i, unsigned int ui, long l,
float _Complex fc1, double _Complex dc1,
long double _Complex ldc1)
-#else
-callc1a (c, s, i, ui, l, fc1, dc1, ldc1)
-char c; short s; int i; unsigned int ui; long l; float _Complex fc1; double _Complex dc1; long double _Complex ldc1;
-#endif
{}
-#ifdef PROTOTYPES
void callc1b (long double _Complex ldc1, char c, short s, int i,
float _Complex fc1, unsigned int ui, long l, double _Complex dc1)
-#else
-callc1b (ldc1, c, s, i, fc1, ui, l, dc1)
-char c; short s; int i; unsigned int ui; long l; float _Complex fc1; double _Complex dc1; long double _Complex ldc1;
-#endif
{}
-#ifdef PROTOTYPES
void callc2a (char c, short s, int i, unsigned int ui, long l, float f,
double d, float _Complex fc1, double _Complex dc1,
long double _Complex ldc1)
-#else
-callc2a (c, s, i, ui, l, f, d, fc1, dc1, ldc1)
- char c; short s; int i; unsigned int ui; long l; float f; double d;
- float _Complex fc1; double _Complex dc1;
- long double _Complex ldc1;
-#endif
{}
-#ifdef PROTOTYPES
void callc2b (float _Complex fc1, char c, short s, int i, unsigned int ui,
long double _Complex ldc1, long l, float f, double d,
double _Complex dc1)
-#else
-callc2b (fc1, c, s, i, ui, ldc1, l, f, d, dc1)
- char c; short s; int i; unsigned int ui; long l; float f; double d;
- float _Complex fc1; double _Complex dc1;
- long double _Complex ldc1;
-#endif
{}
/* Test passing structures and unions by reference. */
-#ifdef PROTOTYPES
void call4a (struct stag *stp)
-#else
-call4a (stp)
-struct stag *stp;
-#endif
{stp = 0;}
-#ifdef PROTOTYPES
void call4b (union utag *unp)
-#else
-call4b (unp)
-union utag *unp;
-#endif
{
unp = 0;
}
/* Test passing structures and unions by value. */
-#ifdef PROTOTYPES
void call5a (struct stag st)
-#else
-call5a (st)
-struct stag st;
-#endif
{st.s1 = 5;}
-#ifdef PROTOTYPES
void call5b (union utag un)
-#else
-call5b (un)
-union utag un;
-#endif
{un.u1 = 7;}
{
}
-#ifdef PROTOTYPES
void call6j (unsigned long ul)
-#else
-call6j (ul)
-unsigned long ul;
-#endif
{
ul = ul;
call6k ();
}
-#ifdef PROTOTYPES
void call6i (unsigned int ui, unsigned long ul)
-#else
-call6i (ui, ul)
-unsigned int ui; unsigned long ul;
-#endif
{
ui = ui;
call6j (ul);
}
-#ifdef PROTOTYPES
void call6h (unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6h (us, ui, ul)
-unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
us = us;
call6i (ui, ul);
}
-#ifdef PROTOTYPES
void call6g (unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6g (uc, us, ui, ul)
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
uc = uc;
call6h (us, ui, ul);
}
-#ifdef PROTOTYPES
void call6f (double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6f (d, uc, us, ui, ul)
-double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
d = d;
call6g (uc, us, ui, ul);
}
-#ifdef PROTOTYPES
void call6e (float f, double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6e (f, d, uc, us, ui, ul)
-float f; double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
f = f;
call6f (d, uc, us, ui, ul);
}
-#ifdef PROTOTYPES
void call6d (long l, float f, double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6d (l, f, d, uc, us, ui, ul)
-long l; float f; double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
l = l;
call6e (f, d, uc, us, ui, ul);
}
-#ifdef PROTOTYPES
void call6c (int i, long l, float f, double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6c (i, l, f, d, uc, us, ui, ul)
-int i; long l; float f; double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
i = i;
call6d (l, f, d, uc, us, ui, ul);
}
-#ifdef PROTOTYPES
void call6b (short s, int i, long l, float f, double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6b (s, i, l, f, d, uc, us, ui, ul)
-short s; int i; long l; float f; double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
s = s;
call6c (i, l, f, d, uc, us, ui, ul);
}
-#ifdef PROTOTYPES
void call6a (char c, short s, int i, long l, float f, double d, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-call6a (c, s, i, l, f, d, uc, us, ui, ul)
-char c; short s; int i; long l; float f; double d;
-unsigned char uc; unsigned short us; unsigned int ui; unsigned long ul;
-#endif
{
c = c;
call6b (s, i, l, f, d, uc, us, ui, ul);
/* Test shuffling of args, round robin */
-#ifdef PROTOTYPES
void call7k (char c, int i, short s, long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui)
-#else
-call7k (c, i, s, l, f, uc, d, us, ul, ui)
-char c; int i; short s; long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui;
-#endif
{
c = 'a'; i = 7; s = 8; l = 7; f = 0.3; uc = 44; d = 0.44; us = 77;
ul = 43; ui = 33;
}
-#ifdef PROTOTYPES
void call7j (unsigned int ui, char c, int i, short s, long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul)
-#else
-call7j (ui, c, i, s, l, f, uc, d, us, ul)
-unsigned int ui; char c; int i; short s; long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul;
-#endif
{
call7k (c, i, s, l, f, uc, d, us, ul, ui);
}
-#ifdef PROTOTYPES
void call7i (unsigned long ul, unsigned int ui, char c, int i, short s, long l, float f, unsigned char uc, double d, unsigned short us)
-#else
-call7i (ul, ui, c, i, s, l, f, uc, d, us)
-unsigned long ul; unsigned int ui; char c; int i; short s; long l; float f; unsigned char uc; double d; unsigned short us;
-#endif
{
call7j (ui, c, i, s, l, f, uc, d, us, ul);
}
-#ifdef PROTOTYPES
void call7h (unsigned short us, unsigned long ul, unsigned int ui, char c, int i, short s, long l, float f, unsigned char uc, double d)
-#else
-call7h (us, ul, ui, c, i, s, l, f, uc, d)
-unsigned short us; unsigned long ul; unsigned int ui; char c; int i; short s; long l; float f; unsigned char uc; double d;
-#endif
{
call7i (ul, ui, c, i, s, l, f, uc, d, us);
}
-#ifdef PROTOTYPES
void call7g (double d, unsigned short us, unsigned long ul, unsigned int ui, char c, int i, short s, long l, float f, unsigned char uc)
-#else
-call7g (d, us, ul, ui, c, i, s, l, f, uc)
-double d; unsigned short us; unsigned long ul; unsigned int ui; char c; int i; short s; long l; float f; unsigned char uc;
-#endif
{
call7h (us, ul, ui, c, i, s, l, f, uc, d);
}
-#ifdef PROTOTYPES
void call7f (unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui, char c, int i, short s, long l, float f)
-#else
-call7f (uc, d, us, ul, ui, c, i, s, l, f)
-unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui; char c; int i; short s; long l; float f;
-#endif
{
call7g (d, us, ul, ui, c, i, s, l, f, uc);
}
-#ifdef PROTOTYPES
void call7e (float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui, char c, int i, short s, long l)
-#else
-call7e (f, uc, d, us, ul, ui, c, i, s, l)
-float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui; char c; int i; short s; long l;
-#endif
{
call7f (uc, d, us, ul, ui, c, i, s, l, f);
}
-#ifdef PROTOTYPES
void call7d (long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui, char c, int i, short s)
-#else
-call7d (l, f, uc, d, us, ul, ui, c, i, s)
-long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui; char c; int i; short s;
-#endif
{
call7e (f, uc, d, us, ul, ui, c, i, s, l);
}
-#ifdef PROTOTYPES
void call7c (short s, long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui, char c, int i)
-#else
-call7c (s, l, f, uc, d, us, ul, ui, c, i)
-short s; long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui; char c; int i;
-#endif
{
call7d (l, f, uc, d, us, ul, ui, c, i, s);
}
-#ifdef PROTOTYPES
void call7b (int i, short s, long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui, char c)
-#else
-call7b (i, s, l, f, uc, d, us, ul, ui, c)
-int i; short s; long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui; char c;
-#endif
{
call7c (s, l, f, uc, d, us, ul, ui, c, i);
}
-#ifdef PROTOTYPES
void call7a (char c, int i, short s, long l, float f, unsigned char uc, double d, unsigned short us, unsigned long ul, unsigned int ui)
-#else
-call7a (c, i, s, l, f, uc, d, us, ul, ui)
-char c; int i; short s; long l; float f; unsigned char uc; double d; unsigned short us; unsigned long ul; unsigned int ui;
-#endif
{
call7b (i, s, l, f, uc, d, us, ul, ui, c);
}
{
}
-#ifdef PROTOTYPES
void recurse (SVAL a, int depth)
-#else
-void recurse (a, depth)
-SVAL a;
-int depth;
-#endif
{
a.s = a.i = a.l = --depth;
if (depth == 0)
calls alloca may do things differently with respect to frames. So give
it a try. */
-#ifdef PROTOTYPES
void localvars_after_alloca (char c, short s, int i, long l)
-#else
-void
-localvars_after_alloca (c, s, i, l)
- char c;
- short s;
- int i;
- long l;
-#endif
{
#ifdef HAVE_STACK_ALLOCA
/* No need to use the alloca.c alloca-on-top-of-malloc; it doesn't
l = 7;
}
-#ifdef PROTOTYPES
void call_after_alloca_subr (char c, short s, int i, long l, unsigned char uc, unsigned short us, unsigned int ui, unsigned long ul)
-#else
-void
-call_after_alloca_subr (c, s, i, l, uc, us, ui, ul)
-char c; int i; short s; long l; unsigned char uc; unsigned short us; unsigned long ul; unsigned int ui;
-#endif
{
c = 'a';
i = 7; s = 8; l = 7; uc = 44; us = 77;
ul = 43; ui = 33;
}
-#ifdef PROTOTYPES
void call_after_alloca (char c, short s, int i, long l)
-#else
-void
-call_after_alloca (c, s, i, l)
- char c;
- short s;
- int i;
- long l;
-#endif
{
#ifdef HAVE_STACK_ALLOCA
/* No need to use the alloca.c alloca-on-top-of-malloc; it doesn't
will require a trampoline between dyncall and this function on the
call path, then another trampoline on between this function and main
on the return path. */
-#ifdef PROTOTYPES
double call_with_trampolines (double d1)
-#else
-double
-call_with_trampolines (d1)
-double d1;
-#endif
{
return d1;
} /* End of call_with_trampolines, this comment is needed by funcargs.exp */
terminal_func ();
}
-#ifdef PROTOTYPES
int factorial_func (int value)
-#else
-int factorial_func (value)
- int value;
-#endif
{
if (value > 1) {
value *= factorial_func (value - 1);
particularly deep about the functionality nor names in here.
*/
-#ifdef PROTOTYPES
static int square (int x)
-#else
-static int square (x)
- int x;
-#endif
{
return x*x; /* out-of-func */
}
/* This file is actually in C, it is not supposed to simulate something
translated from another language or anything like that. */
-#ifdef PROTOTYPES
extern int fsub_();
int csub (int x)
-#else
-int
-csub (x)
- int x;
-#endif
{
return x + 1;
}
/* I am not sure whether there is a way to have a fortran program without */
/* a MAIN, but it does not really harm us to have one. */
-#ifdef PROTOTYPES
/* Main program */ void MAIN__()
-#else
-/* Main program */ MAIN__()
-#endif
{
} /* MAIN__ */
#line 4 "langs1.f"
/* Subroutine */ int fsub_()
{
-#ifdef PROTOTYPES
extern integer cppsub_(int*);
-#else
- extern integer cppsub_();
-#endif
#line 5 "langs1.f"
#line 6 "langs1.f"
/* This is intended to be a vague simulation of cfront output. */
-#ifdef PROTOTYPES
#line 1 "langs2.cxx"
extern int csub (int);
int
{
return foo__Fi (*y);
}
-#else
-#line 1 "langs2.cxx"
-extern int csub ();
-int
-foo__Fi (x) int x;
-{
- return csub (x / 2);
-}
-
-extern int cppsub_ ();
-int
-cppsub_ (y) int *y;
-{
- return foo__Fi (*y);
-}
-#endif
/* Tests regarding examination of prologues. */
-#ifdef PROTOTYPES
int
inner (int z)
-#else
-int
-inner (z)
- int z;
-#endif
{
return 2 * z;
}
-#ifdef PROTOTYPES
int
middle (int x)
-#else
-int
-middle (x)
- int x;
-#endif
{
if (x == 0)
return inner (5);
return inner (6);
}
-#ifdef PROTOTYPES
int
top (int y)
-#else
-int
-top (y)
- int y;
-#endif
{
return middle (y + 1);
}
-#ifdef PROTOTYPES
int
main (int argc, char **argv)
-#else
-int
-main (argc, argv)
- int argc;
- char **argv;
-#endif
{
return top (-1) + top (1);
}
int bssglobal; /* Should go in global bss */
static int bsslocal; /* Should go in local bss */
-#ifdef PROTOTYPES
int
inner (int x)
-#else
-int
-inner (x)
- int x;
-#endif
{
return x + dataglobal + datalocal + bssglobal + bsslocal;
}
-#ifdef PROTOTYPES
static short
middle (int x)
-#else
-static short
-middle (x)
- int x;
-#endif
{
return 2 * inner (x);
}
-#ifdef PROTOTYPES
short
top (int x)
-#else
-short
-top (x)
- int x;
-#endif
{
return 2 * middle (x);
}
-#ifdef PROTOTYPES
int
main (int argc, char **argv)
-#else
-int
-main (argc, argv)
- int argc;
- char **argv;
-#endif
{
return top (argc);
}
int *x;
-#ifdef PROTOTYPES
int array_index (char *arr, int i)
-#else
-int
-array_index (arr, i)
- char *arr;
- int i;
-#endif
{
/* The basic concept is just "return arr[i];". But call malloc so that gdb
will be able to call functions. */
struct foo *foop;
extern struct foo *getfoo ();
-#ifdef PROTOTYPES
extern void putfoo (struct foo *foop);
-#endif
int main ()
{
return (&afoo);
}
-#ifdef PROTOTYPES
void putfoo (struct foo *foop)
-#else
-void putfoo (foop)
- struct foo *foop;
-#endif
{
}
/* Trivial code used to test watchpoints in recursive code and
auto-deletion of watchpoints as they go out of scope. */
-#ifdef PROTOTYPES
static int
recurse (int a)
-#else
-static int
-recurse (a)
- int a;
-#endif
{
int b = 0;
#include <stdio.h>
#include <stdlib.h>
-#ifdef PROTOTYPES
int factorial (int);
int
main (int argc, char **argv, char **envp)
-#else
-int
-main (argc, argv, envp)
-int argc;
-char *argv[], **envp;
-#endif
{
#ifdef FAKEARGV
printf ("%d\n", factorial (1)); /* commands.exp: hw local_var out of scope */
return 0;
}
-#ifdef PROTOTYPES
int factorial (int value)
-#else
-int factorial (value) int value;
-#endif
{
int local_var;
/* This is to derail optimizer in localscopes.
Return 1 + 2 + . . . + N. */
-#ifdef PROTOTYPES
int
sum_upto (int n)
-#else
-int
-sum_upto (n)
- int n;
-#endif
{
int i;
int retval = 0;
return retval;
}
-#ifdef PROTOTYPES
int
useit (int val)
-#else
-int
-useit (val) int val;
-#endif
{
static int usedval;
return val + sum_upto (0);
}
-#ifdef PROTOTYPES
int
useitp (const int *val)
-#else
-int
-useitp (val) const int *val;
-#endif
{
static int usedval;
return *val + sum_upto (0);
}
-#ifdef PROTOTYPES
int
autovars (int bcd, int abc)
-#else
-int
-autovars (bcd, abc)
- int bcd;
- int abc;
-#endif
{
int i0 = useit (0), i1 = useit (1), i2 = useit (2);
int i3 = useit (3), i4 = useit (4), i5 = useit (5);
+ i91 + i92 + i93 + i94 + i95 + i96 + i97 + i98 + i99 + abc + bcd;
}
-#ifdef PROTOTYPES
int
localscopes (int x)
-#else
-int
-localscopes (x)
- int x;
-#endif
{
int localval;
int retval;
useit1 (&filelocal_ro);
}
-#ifdef PROTOTYPES
void useit1 (const int *val)
-#else
-void useit1 (val) const int *val;
-#endif
{
static int usedval;
#include <stdio.h>
-#ifdef PROTOTYPES
int
main(int argc, char **argv)
-#else
-int
-main(argc, argv)
- int argc;
- char **argv;
-#endif
{
int i = 1;
#include <stdlib.h>
-#ifdef PROTOTYPES
int main (int argc, char **argv, char **envp)
-#else
-main (argc, argv, envp)
- int argc;
- char **argv;
- char **envp;
-#endif
{
extern void dummy();
dummy();
int g;
-#ifdef PROTOTYPES
int local_structarg(struct s x)
-#else
-int local_structarg(x)
-struct s x;
-#endif
{
return x.b;
}
-#ifdef PROTOTYPES
int mainshr1(int g)
-#else
-int mainshr1(g)
-int g;
-#endif
{
return 2*g;
}
int sgi = 2;
static int sgs = 7;
-#ifdef PROTOTYPES
int shr1(int x)
-#else
-int shr1(x)
-int x;
-#endif
{
f mumble;
int l;
return 2*x;
}
-#ifdef PROTOTYPES
static int shr1_local(int x)
-#else
-static int shr1_local(x)
-int x;
-#endif
{
return 2*x;
}
-#ifdef PROTOTYPES
int structarg(struct s x)
-#else
-int structarg(x)
-struct s x;
-#endif
{
return x.a;
}
-#ifdef PROTOTYPES
int pstructarg(struct s *x)
-#else
-int pstructarg(x)
-struct s *x;
-#endif
{
return x->a;
}
-#ifdef PROTOTYPES
int shr2(int x)
-#else
-int shr2(x) int x;
-#endif
{
return 2*x; /* shr2-return */
}
-#ifdef PROTOTYPES
int shr2_local(int x)
-#else
-int shr2_local(x) int x;
-#endif
{
return 2*x;
}
/* Signal handlers, we set breakpoints in them to make sure that the
signals really get delivered. */
-#ifdef PROTOTYPES
void
handle_ABRT (int sig)
-#else
-void
-handle_ABRT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_HUP (int sig)
-#else
-void
-handle_HUP (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_QUIT (int sig)
-#else
-void
-handle_QUIT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_ILL (int sig)
-#else
-void
-handle_ILL (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_EMT (int sig)
-#else
-void
-handle_EMT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_FPE (int sig)
-#else
-void
-handle_FPE (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_BUS (int sig)
-#else
-void
-handle_BUS (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_SEGV (int sig)
-#else
-void
-handle_SEGV (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_SYS (int sig)
-#else
-void
-handle_SYS (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_PIPE (int sig)
-#else
-void
-handle_PIPE (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_ALRM (int sig)
-#else
-void
-handle_ALRM (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_URG (int sig)
-#else
-void
-handle_URG (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_TSTP (int sig)
-#else
-void
-handle_TSTP (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_CONT (int sig)
-#else
-void
-handle_CONT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_CHLD (int sig)
-#else
-void
-handle_CHLD (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_TTIN (int sig)
-#else
-void
-handle_TTIN (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_TTOU (int sig)
-#else
-void
-handle_TTOU (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_IO (int sig)
-#else
-void
-handle_IO (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_XCPU (int sig)
-#else
-void
-handle_XCPU (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_XFSZ (int sig)
-#else
-void
-handle_XFSZ (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_VTALRM (int sig)
-#else
-void
-handle_VTALRM (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_PROF (int sig)
-#else
-void
-handle_PROF (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_WINCH (int sig)
-#else
-void
-handle_WINCH (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_LOST (int sig)
-#else
-void
-handle_LOST (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_USR1 (int sig)
-#else
-void
-handle_USR1 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_USR2 (int sig)
-#else
-void
-handle_USR2 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_PWR (int sig)
-#else
-void
-handle_PWR (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_POLL (int sig)
-#else
-void
-handle_POLL (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_WIND (int sig)
-#else
-void
-handle_WIND (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_PHONE (int sig)
-#else
-void
-handle_PHONE (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_WAITING (int sig)
-#else
-void
-handle_WAITING (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_LWP (int sig)
-#else
-void
-handle_LWP (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_DANGER (int sig)
-#else
-void
-handle_DANGER (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_GRANT (int sig)
-#else
-void
-handle_GRANT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_RETRACT (int sig)
-#else
-void
-handle_RETRACT (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_MSG (int sig)
-#else
-void
-handle_MSG (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_SOUND (int sig)
-#else
-void
-handle_SOUND (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_SAK (int sig)
-#else
-void
-handle_SAK (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_PRIO (int sig)
-#else
-void
-handle_PRIO (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_33 (int sig)
-#else
-void
-handle_33 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_34 (int sig)
-#else
-void
-handle_34 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_35 (int sig)
-#else
-void
-handle_35 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_36 (int sig)
-#else
-void
-handle_36 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_37 (int sig)
-#else
-void
-handle_37 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_38 (int sig)
-#else
-void
-handle_38 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_39 (int sig)
-#else
-void
-handle_39 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_40 (int sig)
-#else
-void
-handle_40 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_41 (int sig)
-#else
-void
-handle_41 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_42 (int sig)
-#else
-void
-handle_42 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_43 (int sig)
-#else
-void
-handle_43 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_44 (int sig)
-#else
-void
-handle_44 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_45 (int sig)
-#else
-void
-handle_45 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_46 (int sig)
-#else
-void
-handle_46 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_47 (int sig)
-#else
-void
-handle_47 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_48 (int sig)
-#else
-void
-handle_48 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_49 (int sig)
-#else
-void
-handle_49 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_50 (int sig)
-#else
-void
-handle_50 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_51 (int sig)
-#else
-void
-handle_51 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_52 (int sig)
-#else
-void
-handle_52 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_53 (int sig)
-#else
-void
-handle_53 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_54 (int sig)
-#else
-void
-handle_54 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_55 (int sig)
-#else
-void
-handle_55 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_56 (int sig)
-#else
-void
-handle_56 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_57 (int sig)
-#else
-void
-handle_57 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_58 (int sig)
-#else
-void
-handle_58 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_59 (int sig)
-#else
-void
-handle_59 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_60 (int sig)
-#else
-void
-handle_60 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_61 (int sig)
-#else
-void
-handle_61 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_62 (int sig)
-#else
-void
-handle_62 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_63 (int sig)
-#else
-void
-handle_63 (sig)
- int sig;
-#endif
{
}
-#ifdef PROTOTYPES
void
handle_TERM (int sig)
-#else
-void
-handle_TERM (sig)
- int sig;
-#endif
{
}
\f
static int count = 0;
-#ifdef PROTOTYPES
static void
handler (int sig)
-#else
-static void
-handler (sig)
- int sig;
-#endif
{
signal (sig, handler);
++count;
*/
#include <stdio.h>
-#ifdef PROTOTYPES
extern "C" int solib_main (int);
static int
solib_wrapper (int (*function)(int))
-#else
-extern int solib_main (int);
-
-static int
-solib_wrapper (function)
- int (*function)(int);
-#endif
{
return (*function)(100);
}
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef PROTOTYPES
int solib_main (int arg)
-#else
-int solib_main (arg)
- int arg;
-#endif
{
return arg*arg*arg;
}
return foo18;
}
-#ifdef PROTOTYPES
void Fun1(struct struct1 foo1)
-#else
-void Fun1(foo1)
- struct struct1 foo1;
-#endif
{
L1 = foo1;
}
-#ifdef PROTOTYPES
void Fun2(struct struct2 foo2)
-#else
-void Fun2(foo2)
- struct struct2 foo2;
-#endif
{
L2 = foo2;
}
-#ifdef PROTOTYPES
void Fun3(struct struct3 foo3)
-#else
-void Fun3(foo3)
- struct struct3 foo3;
-#endif
{
L3 = foo3;
}
-#ifdef PROTOTYPES
void Fun4(struct struct4 foo4)
-#else
-void Fun4(foo4)
- struct struct4 foo4;
-#endif
{
L4 = foo4;
}
-#ifdef PROTOTYPES
void Fun5(struct struct5 foo5)
-#else
-void Fun5(foo5)
- struct struct5 foo5;
-#endif
{
L5 = foo5;
}
-#ifdef PROTOTYPES
void Fun6(struct struct6 foo6)
-#else
-void Fun6(foo6)
- struct struct6 foo6;
-#endif
{
L6 = foo6;
}
-#ifdef PROTOTYPES
void Fun7(struct struct7 foo7)
-#else
-void Fun7(foo7)
- struct struct7 foo7;
-#endif
{
L7 = foo7;
}
-#ifdef PROTOTYPES
void Fun8(struct struct8 foo8)
-#else
-void Fun8(foo8)
- struct struct8 foo8;
-#endif
{
L8 = foo8;
}
-#ifdef PROTOTYPES
void Fun9(struct struct9 foo9)
-#else
-void Fun9(foo9)
- struct struct9 foo9;
-#endif
{
L9 = foo9;
}
-#ifdef PROTOTYPES
void Fun10(struct struct10 foo10)
-#else
-void Fun10(foo10)
- struct struct10 foo10;
-#endif
{
L10 = foo10;
}
-#ifdef PROTOTYPES
void Fun11(struct struct11 foo11)
-#else
-void Fun11(foo11)
- struct struct11 foo11;
-#endif
{
L11 = foo11;
}
-#ifdef PROTOTYPES
void Fun12(struct struct12 foo12)
-#else
-void Fun12(foo12)
- struct struct12 foo12;
-#endif
{
L12 = foo12;
}
-#ifdef PROTOTYPES
void Fun13(struct struct13 foo13)
-#else
-void Fun13(foo13)
- struct struct13 foo13;
-#endif
{
L13 = foo13;
}
-#ifdef PROTOTYPES
void Fun14(struct struct14 foo14)
-#else
-void Fun14(foo14)
- struct struct14 foo14;
-#endif
{
L14 = foo14;
}
-#ifdef PROTOTYPES
void Fun15(struct struct15 foo15)
-#else
-void Fun15(foo15)
- struct struct15 foo15;
-#endif
{
L15 = foo15;
}
-#ifdef PROTOTYPES
void Fun16(struct struct16 foo16)
-#else
-void Fun16(foo16)
- struct struct16 foo16;
-#endif
{
L16 = foo16;
}
-#ifdef PROTOTYPES
void Fun17(struct struct17 foo17)
-#else
-void Fun17(foo17)
- struct struct17 foo17;
-#endif
{
L17 = foo17;
}
-#ifdef PROTOTYPES
void Fun18(struct struct18 foo18)
-#else
-void Fun18(foo18)
- struct struct18 foo18;
-#endif
{
L18 = foo18;
}
/* This is a sample program for the HP/DDE debugger. */
#include <stdio.h>
-#ifdef PROTOTYPES
int sum(int *list, int low, int high)
-#else
-int sum(list, low, high)
-int *list, low, high;
-#endif
{
int i = 0, s = 0; /* stop-in-sum */
for (i = low; i <= high; i++)
#include <stdio.h>
-#ifdef PROTOTYPES
int main (void)
-#else
-main()
-#endif
{
printf("Hello from vforked-prog...\n");
return 0;
{
}
-#ifdef PROTOTYPES
void recurser (int x)
-#else
-void recurser (x) int x;
-#endif
{
int local_x = 0;
#include "shr.h"
-#ifdef PROTOTYPES
int shr2(int x)
-#else
-int shr2(x) int x;
-#endif
{
return 2*x;
}
-#ifdef PROTOTYPES
int shr2_local(int x)
-#else
-int shr2_local(x) int x;
-#endif
{
return 2*x;
}
#include <stdio.h>
#include <stdlib.h>
-#ifdef PROTOTYPES
extern int marker1 (void);
extern int marker2 (int a);
extern void marker3 (char *a, char *b);
extern void marker4 (long d);
-#else
-extern int marker1 ();
-extern int marker2 ();
-extern void marker3 ();
-extern void marker4 ();
-#endif
/*
* This simple classical example of recursion is useful for
* testing stack backtraces and such.
*/
-#ifdef PROTOTYPES
int factorial(int);
int
main (int argc, char **argv, char **envp)
-#else
-int
-main (argc, argv, envp)
-int argc;
-char *argv[], **envp;
-#endif
{
if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
fprintf (stderr, "usage: factorial <number>\n");
return argc; /* set breakpoint 10 here */
} /* set breakpoint 10a here */
-#ifdef PROTOTYPES
int factorial (int value)
-#else
-int factorial (value)
-int value;
-#endif
{
if (value > 1) { /* set breakpoint 7 here */
value *= factorial (value - 1);
return (value); /* set breakpoint 19 here */
}
-#ifdef PROTOTYPES
int multi_line_if_conditional (int a, int b, int c)
-#else
-int multi_line_if_conditional (a, b, c)
- int a, b, c;
-#endif
{
if (a /* set breakpoint 3 here */
&& b
return 1;
}
-#ifdef PROTOTYPES
int multi_line_while_conditional (int a, int b, int c)
-#else
-int multi_line_while_conditional (a, b, c)
- int a, b, c;
-#endif
{
while (a /* set breakpoint 4 here */
&& b
These functions are in a separate source file to prevent an
optimizing compiler from inlining them and optimizing them away. */
-#ifdef PROTOTYPES
int marker1 (void) { return (0); } /* set breakpoint 15 here */
int marker2 (int a) { return (1); } /* set breakpoint 8 here */
void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
void marker4 (long d) {} /* set breakpoint 14 here */
-#else
-int marker1 () { return (0); } /* set breakpoint 16 here */
-int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
-void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
-void marker4 (d) long d; {} /* set breakpoint 13 here */
-#endif
/* A structure we use for field name completion tests. */
struct some_struct
{
}
-#ifdef PROTOTYPES
void recurser (int x)
-#else
-void recurser (x) int x;
-#endif
{
int local_x;