Branch: Tag:

2016-01-11

2016-01-11 19:49:51 by Martin Nilsson <nilsson@fastmail.com>

Use variadic macros.

67:   #endif /* PIKE_EXTRA_DEBUG */      #ifdef TRACE_MAIN - #define TRACE(X) fprintf X + #define TRACE(...) fprintf(stderr, __VA_ARGS__)   #else /* !TRACE_MAIN */ - #define TRACE(X) + #define TRACE(...)   #endif /* TRACE_MAIN */      /*
187:    }   #endif    -  TRACE((stderr, "Default master at \"%s\"...\n", mp)); +  TRACE("Default master at \"%s\"...\n", mp);   #undef mp   }   
222:   {    int e;    -  TRACE((stderr, "find_lib_dir...\n")); +  TRACE("find_lib_dir...\n");       set_default_master(argv[0]);       for(e=1; e<argc; e++)    { -  TRACE((stderr, "Parse argument %d:\"%s\"...\n", e, argv[e])); +  TRACE("Parse argument %d:\"%s\"...\n", e, argv[e]);       if(argv[e][0] != '-') break;   
305:   #endif      #ifdef HAVE_MALLOPT -  TRACE((stderr, "Init malloc...\n")); +  TRACE("Init malloc...\n");       /* The malloc implementation in recent glibc (eg Linux)    * defaults to using one arena / thread. This means that
328:   #endif   #endif /* HAVE_MALLOPT */    -  TRACE((stderr, "Init master...\n")); +  TRACE("Init master...\n");       find_lib_dir(argc, argv);   
368:      #endif /* LIBPIKE */    -  TRACE((stderr, "init_pike()\n")); +  TRACE("init_pike()\n");       init_pike(argv, master_file_location);       for(e=1; e<argc; e++)    { -  TRACE((stderr, "Parse argument %d:\"%s\"...\n", e, argv[e])); +  TRACE("Parse argument %d:\"%s\"...\n", e, argv[e]);       if(argv[e][0]=='-')    {
668:    back.severity=THROW_EXIT;       if ((m = load_pike_master())) { -  TRACE((stderr, "Call master->_main()...\n")); +  TRACE("Call master->_main()...\n");       pike_push_argv(argc, argv);   
681:    }    UNSETJMP(back);    -  TRACE((stderr, "Exit %d...\n", num)); +  TRACE("Exit %d...\n", num);       pike_do_exit(num);    return num; /* avoid warning */   }