pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: main.c,v 1.224 2005/05/20 10:39:04 mast Exp $ + || $Id: main.c,v 1.225 2006/07/05 00:37:18 mast Exp $   */      #include "global.h"   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"
pike.git/src/main.c:164: Inside #if defined(LIBPIKE)
  static char libpike_file[MAXPATHLEN * 2];   static void *libpike;      static void (*init_pike)(const char **argv, const char *file);   static void (*init_pike_runtime)(void (*exit_cb)(int));   #endif /* LIBPIKE */      static void find_lib_dir(int argc, char **argv)   {    int e; -  char *p; -  char *dir; +        TRACE((stderr, "find_lib_dir...\n"));       set_default_master();       for(e=1; e<argc; e++)    {    TRACE((stderr, "Parse argument %d:\"%s\"...\n", e, argv[e]));       if(argv[e][0] != '-') break;
pike.git/src/main.c:209:    ((argv[e][2] == 's') && !argv[e][3])) {    e++;    }    break;       case 'q':    if(!argv[e][2]) e++;    break;    }    } +    #ifdef LIBPIKE -  +  { +  char *p; +  char *dir;    memcpy(libpike_file, master_location + CONSTANT_STRLEN(MASTER_COOKIE),    sizeof(master_location) - CONSTANT_STRLEN(MASTER_COOKIE));    for (p = dir = libpike_file; *p; p++) {    if ((*p == '/')   #ifdef __NT__    || (*p == '\\')   #endif /* __NT__ */    )    dir = p+1;    }    if ((p + CONSTANT_STRLEN("pike.so")) >= libpike_file + 2*MAXPATHLEN) {    /* Not likely to happen as long as MASTER_COOKIE is longer than "pike.so".    */    fprintf(stderr, "Too long path to pike.so.\n");    exit(1);    }    /* Don't forget the NUL! */    memcpy(p, "pike.so", CONSTANT_STRLEN("pike.so") + 1); -  +  }   #endif /* LIBPIKE */   }      int main(int argc, char **argv)   {    JMP_BUF back;    int e, num;    char *p; -  struct array *a; +        TRACE((stderr, "Init master...\n"));       find_lib_dir(argc, argv);      #ifdef LIBPIKE   #ifdef HAVE_DLINIT    if (!dlinit()) {    fprintf(stderr, "dlinit failed.\n");    exit(1);