pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // 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: master.pike.in,v 1.269 2003/04/10 00:31:07 nilsson Exp $ + // $Id: master.pike.in,v 1.270 2003/04/10 02:02:33 nilsson Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:1972:    exit(0);       case "execute":    random_seed(time() ^ (getpid()<<8));    argv = tmp->get_args(argv,1);   #ifdef __AUTO_BIGNUM__    main_resolv( "Gmp", "bignum" );   #endif /* __AUTO_BIGNUM__ */       program prog; -  if(currentversion <= Version(7,4)) +  if(Version(compat_major,compat_minor) <= Version(7,4))    prog = compile_string(    "mixed create(int argc, array(string) argv,array(string) env){"+    opts[1]+";}");    else    prog = compile_string(    "#define NOT(X) !(X)\n"    "#define CHAR(X) 'X'\n"    "mixed run(int argc, array(string) argv,"    "mapping(string:string) env){"+    opts[1]+";}");
pike.git/lib/master.pike.in:2109:      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(trace) predef::trace(trace);    mixed ret;    mixed err = catch {    // The main reason for this catch is actually to get a new call    // to eval_instruction in interpret.c so that the debug and    // trace levels set above take effect in the bytecode evaluator. -  object script=prog(argv); +  object script; +  if(Version(compat_major,compat_minor) <= Version(7,4)) { +  script=prog(); +  } +  else { +  script=prog(argv); +  }    if(!script->main)    _error("Error: %s has no main().\n", argv[0]);    ret=script->main(sizeof(argv),argv,env);    };    if(trace) predef::trace(0);    if (err) {    handle_error (err);    ret = 10;    }    if(!intp(ret)) exit(0);
pike.git/lib/master.pike.in:3089:   {       //! The major and minor parts of the version.    int major;    int minor;       //! @decl void create(int major, int minor)    //! Set the version in the object.    void create(int maj, int min)    { +  if(maj==-1) maj = __REAL_MAJOR__; +  if(min==-1) min = __REAL_MINOR__;    major = maj;    minor = min;    }      #define CMP(X) ((major - ([object]X)->major) || (minor - ([object]X)->minor))       //! Methods define so that version objects    //! can be compared and ordered.    int `<(mixed v) { return objectp(v) && CMP(v) < 0; }    int `>(mixed v) { return objectp(v) && CMP(v) > 0; }