pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:60:   #endif      /* Define this to trace the execution of main(). */   /* #define TRACE_MAIN */      #ifdef PIKE_EXTRA_DEBUG   #define TRACE_MAIN   #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 */      /*    * Code searching for master & libpike.    */      #define MASTER_COOKIE1 "(#*&)@(*&$"   #define MASTER_COOKIE2 "Master Cookie:"      #define MASTER_COOKIE MASTER_COOKIE1 MASTER_COOKIE2
pike.git/src/main.c:180:    strcpy(tmp, bin_name);    p = strrchr(tmp, '/');    if (!p) p = tmp;    else p++;    strcpy(p, "master.pike");    set_master( tmp );    }    }   #endif    -  TRACE((stderr, "Default master at \"%s\"...\n", mp)); +  TRACE("Default master at \"%s\"...\n", mp);   #undef mp   }      #ifdef LIBPIKE   static char libpike_file[MAXPATHLEN * 2];   static void *libpike;      typedef void (*modfun)(void);   #ifdef NO_CAST_TO_FUN   /* Function pointers can't be casted to scalar pointers according to
pike.git/src/main.c:215:      static void (*init_pike_var)(const char **argv, const char *file);   static void (*init_pike_runtime_var)(void (*exit_cb)(int));   static void (*add_predefine_var)(char *s);   #endif /* LIBPIKE */      static void find_lib_dir(int argc, char **argv)   {    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;       switch(argv[e][1])    {    default:    break;       case 'm':    if(argv[e][2])
pike.git/src/main.c:298: Inside #if defined(PIKE_EXTRA_DEBUG)
  #ifdef PIKE_EXTRA_DEBUG    if (sizeof(void *) == 8) {    /* 64-bit Solaris 10 in Xenofarm fails with SIGPIPE.    * Force a core dump.    */    signal(SIGPIPE, abort);    }   #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    * memory once allocated from one thread can't later be    * allocated by another thread.    *    * cf [bug 6045] and http://sourceware.org/bugzilla/show_bug.cgi?id=11261    *    * We try to alleviate the problem by reducing the number    * of arenas as much as possible.
pike.git/src/main.c:321: Inside #if defined(HAVE_MALLOPT) and #if defined(M_ARENA_TEST)
  #ifdef M_ARENA_TEST    /* NB: Some versions of glibc don't support setting M_ARENA_TEST to 0. */    /* Note also that the test is inverted since mallopt returns 0 on success. */    mallopt(M_ARENA_TEST, 0) && mallopt(M_ARENA_TEST, 1);   #endif   #ifdef M_ARENA_MAX    mallopt(M_ARENA_MAX, 1);   #endif   #endif /* HAVE_MALLOPT */    -  TRACE((stderr, "Init master...\n")); +  TRACE("Init master...\n");       find_lib_dir(argc, argv);      #ifdef LIBPIKE   #ifdef HAVE_DLINIT    if (!dlinit()) {    fprintf(stderr, "dlinit failed.\n");    exit(1);    }   #endif /* HAVE_DLINIT */
pike.git/src/main.c:361:       LOOKUP(init_pike);   #define init_pike init_pike_var    LOOKUP(init_pike_runtime);   #define init_pike_runtime init_pike_runtime_var    LOOKUP(add_predefine);   #define add_predefine add_predefine_var      #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]=='-')    {    for(p=argv[e]+1; *p;)    {    switch(*p)    {    case 'D':    add_predefine(p+1);    p+=strlen(p);
pike.git/src/main.c:661:    else    call_handle_error();    num=10;    }    }else{    struct object *m;       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);       apply(m, "_main", 1);    pop_stack();    num=0;    } else {    num = -1;    }    }    UNSETJMP(back);    -  TRACE((stderr, "Exit %d...\n", num)); +  TRACE("Exit %d...\n", num);       pike_do_exit(num);    return num; /* avoid warning */   }