mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
7b72401c5f
charset2html moved from mysys to extra ignore: new files added, garbage removed extra/charset2html.c: Rename: mysys/charset2html.c -> extra/charset2html.c configure.in: remove historical difference between test_thr_alarm, test_thr_lock and six newer mysys/test_* programs build dbug after mysys dbug/Makefile.am: build utils and examples, build manual dbug/dbug.c: cleanup DBUG_EXECUTE_IF macro dbug/dbug_analyze.c: fix it to run dbug/dbug_long.h: warning added dbug/main.c: fix it to run dbug/user.r: formating cleanup all undocumented features documented extra/Makefile.am: charset2html moved from mysys include/my_dbug.h: DBUG_EXECUTE_IF() macro mysys/Makefile.am: charset2html moved to extra BitKeeper/etc/ignore: new files added, garbage removed
34 lines
775 B
C
34 lines
775 B
C
#ifdef DBUG_OFF /* We are testing dbug */
|
|
#undef DBUG_OFF
|
|
#endif
|
|
|
|
#include <my_global.h> /* This includes dbug.h */
|
|
|
|
int main (argc, argv)
|
|
int argc;
|
|
char *argv[];
|
|
{
|
|
register 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_RETURN (0);
|
|
}
|
|
}
|