diff options
author | unknown <serg@sergbook.mylan> | 2004-11-09 17:10:08 +0100 |
---|---|---|
committer | unknown <serg@sergbook.mylan> | 2004-11-09 17:10:08 +0100 |
commit | 57a8063f80bc840e8e996745871d89f704df3adb (patch) | |
tree | 273779e87bb3f66fed491749987eb30fb23d92c5 /dbug/main.c | |
parent | 91fd98383cfca36b747888872a24b5a05d1490c9 (diff) | |
download | mariadb-git-57a8063f80bc840e8e996745871d89f704df3adb.tar.gz |
more dbug fixups to get a nicer manual (w/o my_pthread specifics)
use my_main.c for the actual build, and main.c for the manual
dbug/main.c:
de-mysqlify main.c
dbug/my_main.c:
comment added
Diffstat (limited to 'dbug/main.c')
-rw-r--r-- | dbug/main.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/dbug/main.c b/dbug/main.c index 4f37dd7a96d..6d1a307095e 100644 --- a/dbug/main.c +++ b/dbug/main.c @@ -1,34 +1,24 @@ -#ifdef DBUG_OFF /* We are testing dbug */ -#undef DBUG_OFF -#endif - -#include <my_global.h> /* This includes dbug.h */ +#include <dbug_long.h> int main (argc, argv) int argc; char *argv[]; { - register int result, ix; + int result, ix; extern int factorial(int); -#if defined(HAVE_PTHREAD_INIT) && defined(THREAD) - pthread_init(); /* Must be called before DBUG_ENTER */ -#endif - my_thread_global_init(); - { - DBUG_ENTER ("main"); - DBUG_PROCESS (argv[0]); - for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { - switch (argv[ix][1]) { - case '#': - DBUG_PUSH (&(argv[ix][2])); - break; - } - } - for (; ix < argc; ix++) { - DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); - result = factorial (atoi(argv[ix])); - printf ("%d\n", result); + DBUG_ENTER ("main"); + DBUG_PROCESS (argv[0]); + for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { + switch (argv[ix][1]) { + case '#': + DBUG_PUSH (&(argv[ix][2])); + break; } - DBUG_RETURN (0); } + for (; ix < argc; ix++) { + DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); + result = factorial (atoi(argv[ix])); + printf ("%d\n", result); + } + DBUG_RETURN (0); } |