~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to dbug/main.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <dbug.h>
2
 
 
3
 
int main (argc, argv)
4
 
int argc;
5
 
char *argv[];
6
 
{
7
 
  int result, ix;
8
 
  extern int factorial(int);
9
 
  DBUG_ENTER ("main");
10
 
  DBUG_PROCESS (argv[0]);
11
 
  for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) {
12
 
    switch (argv[ix][1]) {
13
 
    case '#':
14
 
      DBUG_PUSH (&(argv[ix][2]));
15
 
      break;
16
 
    }
17
 
  }
18
 
  for (; ix < argc; ix++) {
19
 
    DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix]));
20
 
    result = factorial (atoi(argv[ix]));
21
 
    printf ("%d\n", result);
22
 
  }
23
 
  DBUG_RETURN (0);
24
 
}