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.41 1998/02/11 00:05:01 hubbe Exp $"); + RCSID("$Id: main.c,v 1.42 1998/02/27 08:39:20 hubbe Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"   #include "interpret.h"
pike.git/src/main.c:102:   #endif   #endif    init_backend();    master_file = 0;   #ifdef HAVE_GETENV    master_file = getenv("PIKE_MASTER");   #endif   #if __NT__    if(!master_file)    { +  HKEY k;    char buffer[4096];    DWORD len=sizeof(buffer)-1,type=REG_SZ; -  -  if(RegQueryValueEx(HKEY_CURRENT_USER, -  "SOFTWARE\\Idonex\\Pike\\0.6\\PIKE_MASTER", +  long ret; +  if(RegOpenKeyEx(HKEY_CURRENT_USER, +  (LPCTSTR)"SOFTWARE\\Idonex\\Pike\\0.6", +  0,KEY_READ,&k)==ERROR_SUCCESS || +  RegOpenKeyEx(HKEY_LOCAL_MACHINE, +  (LPCTSTR)"SOFTWARE\\Idonex\\Pike\\0.6", +  0,KEY_READ,&k)==ERROR_SUCCESS) +  { +  if(RegQueryValueEx(k, +  "PIKE_MASTER",    0,    &type,    buffer, -  &len)==ERROR_SUCCESS || -  RegQueryValueEx(HKEY_LOCAL_MACHINE, -  "SOFTWARE\\Idonex\\Pike\\0.6\\PIKE_MASTER", -  0, -  &type, -  buffer, +     &len)==ERROR_SUCCESS)    {    master_file=strdup(buffer);    } -  +  RegCloseKey(k);    } -  +  }   #endif       if(!master_file) master_file = DEFAULT_MASTER;       for(e=1; e<argc; e++)    {    if(argv[e][0]=='-')    {    for(p=argv[e]+1; *p;)    {