29 lines · c
1#include <stdio.h>2 3/* The return statements are purposefully so simple, and4 * unrelated to the program, just to achieve consistent5 * debug line tables, across platforms, that are not6 * dependent on compiler optimzations. */7 8int foo(int x) { return x; /* In foo */ }9 10int call_me(int argc) {11 printf ("At the start, argc: %d.\n", argc);12 13 if (argc < 2)14 return 1; /* Less than 2. */15 else16 return argc; /* Greater than or equal to 2. */17}18 19int20main(int argc, char **argv)21{22 int res = 0;23 res = call_me(argc); /* Back out in main. */24 if (res)25 printf("Result: %d. \n", res);26 27 return 0;28}29