pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: main.c,v 1.66 1999/03/19 11:42:38 hubbe Exp $"); + RCSID("$Id: main.c,v 1.67 1999/03/26 19:29:51 hubbe Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "language.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/main.c:23:   #include "signal_handler.h"   #include "threads.h"   #include "dynamic_load.h"   #include "gc.h"   #include "multiset.h"   #include "mapping.h"   #include "cpp.h"   #include "main.h"   #include "operators.h"   #include "security.h" + #include "version.h"      #include <errno.h>      #ifdef HAVE_LOCALE_H   #include <locale.h>   #endif      #include "time_stuff.h"      #ifdef HAVE_SYS_RESOURCE_H
pike.git/src/main.c:53:   int t_flag=0;   int default_t_flag=0;   int a_flag=0;   int l_flag=0;   int p_flag=0;   #ifdef YYDEBUG   extern int yydebug;   #endif /* YYDEBUG */   static long instructions_left;    + #define MASTER_COOKIE "(#*&)@(*&$Master Cookie:" +  + #ifndef MAXPATHLEN + #define MAXPATHLEN 32768 + #endif +  + char master_location[MAXPATHLEN * 2] = MASTER_COOKIE; +    static void time_to_exit(struct callback *cb,void *tmp,void *ignored)   {    if(instructions_left-- < 0)    {    push_int(0);    f_exit(1);    }   }      static struct callback_list post_master_callbacks;
pike.git/src/main.c:139: Inside #if defined(HAVE_SETLOCALE) and #if defined(LC_COLLATE)
  #endif   #ifdef LC_COLLATE    setlocale(LC_COLLATE, "");   #endif   #ifdef LC_MESSAGES    setlocale(LC_MESSAGES, "");   #endif   #endif    init_backend();    master_file = 0; - #if __NT__ -  if(!master_file) get_master_key(HKEY_CURRENT_USER); -  if(!master_file) get_master_key(HKEY_LOCAL_MACHINE); - #endif +    #ifdef HAVE_GETENV    if(getenv("PIKE_MASTER"))    master_file = getenv("PIKE_MASTER");   #endif    -  if(!master_file) master_file = DEFAULT_MASTER; +  if(master_location[CONSTANT_STRLEN(MASTER_COOKIE)]) +  master_file=master_location + CONSTANT_STRLEN(MASTER_COOKIE);    -  + #if __NT__ +  if(!master_file) get_master_key(HKEY_CURRENT_USER); +  if(!master_file) get_master_key(HKEY_LOCAL_MACHINE); + #endif +  +  if(!master_file) +  { +  sprintf(master_location,DEFAULT_MASTER, +  PIKE_MAJOR_VERSION, +  PIKE_MINOR_VERSION, +  PIKE_BUILD_VERSION); +  master_file=master_location; +  } +     for(e=1; e<argc; e++)    {    if(argv[e][0]=='-')    {    for(p=argv[e]+1; *p;)    {    switch(*p)    {    case 'D':    add_predefine(p+1);