MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / main

Function main

dbug/dbug_analyze.c:567–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565extern char *optarg;
566
567int main (int argc, char **argv)
568{
569 register int c;
570 int badflg = 0;
571 FILE *infile;
572 FILE *outfile = {stdout};
573
574 my_thread_global_init();
575 {
576 DBUG_ENTER ("main");
577 DBUG_PROCESS (argv[0]);
578 my_name = argv[0];
579 while ((c = getopt (argc,argv,"#:v")) != EOF) {
580 switch (c) {
581 case '#': /* Debugging Macro enable */
582 DBUG_PUSH (optarg);
583 break;
584 case 'v': /* Verbose mode */
585 verbose++;
586 break;
587 default:
588 badflg++;
589 break;
590 }
591 }
592 if (badflg) {
593 usage ();
594 DBUG_RETURN (EX_USAGE);
595 }
596 if (optind < argc) {
597 FILEOPEN (infile, argv[optind], "r");
598 } else {
599 FILEOPEN (infile, PRO_FILE, "r");
600 }
601 process (infile);
602 output (outfile);
603 DBUG_RETURN (EX_OK);
604 }
605}

Callers

nothing calls this directly

Calls 4

my_thread_global_initFunction · 0.85
processFunction · 0.85
outputFunction · 0.85
usageFunction · 0.50

Tested by

no test coverage detected