Changeset b47c991 in tol


Ignore:
Timestamp:
Jun 20, 2011, 1:13:12 PM (15 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
b50906a
Parents:
f5c1a77
Message:

refs #1259, implementamos el argumento '-np' en tol::initlibrary, interpretamos la opcion -np en tolsh y tolbase

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3655 be4846ae-f051-483a-831f-b64e7d08527f

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tolbase/lib/toltk/init_toltk.tcl

    rf5c1a77 rb47c991  
    291291# Load project
    292292namespace import project::*
     293set project::data(iniproject) 1
    293294foreach option $argv {
    294295  if { [string equal $option "-b"] } {
    295296    set project::data(oculto) 1
     297  } elseif { $option eq "-np" } {
     298    set project::data(iniproject) 0
    296299  }
    297300}
  • tolbase/lib/toltk/project.tcl

    rf5c1a77 rb47c991  
    165165  }
    166166#   update
    167   tol::initlibrary
     167  tol::initlibrary $data(iniproject)
    168168  foreach prj $projects(Project,names) {
    169169    set prjname $projects(${prj},name)
  • tolsh/tolsh.vfs/lib/app-tolsh/tolsh.tcl

    rf5c1a77 rb47c991  
    3232  set options(lang)    0
    3333  set options(initlib) 1
     34  set options(iniproject) 1
    3435  set options(compile) ""
    3536  set options(vmode)   ""
    … …  
    4647#
    4748#    -i       --> do not include initLibrary
     49#    -np      --> do not load _iniproject.tol
    4850#    -c"..."  --> compile a tol expression
    4951#    -c "..." --> compile a tol expression
    … …  
    9294        #
    9395        set options(initlib) 0
     96      } elseif {$opt eq "np"} {
     97        set $options(iniproject) 0
    9498      } elseif {[string index $opt 0] eq "c"} {
    9599        if {[string length $opt]>1} {
    … …  
    226230  puts {
    227231    -i file  --> include a file but not initLibrary
     232    -np      --> do not load _iniproject.tol
    228233    -c"..."  --> compile a tol expression
    229234    -c "..." --> compile a tol expression
    … …  
    386391
    387392    if {$options(initlib)} {
    388       tol::initlibrary
     393      tol::initlibrary $options(iniproject)
    389394    }
    390395
  • toltcl/generic/toltcl.c

    rf5c1a77 rb47c991  
    317317     Tcl_Obj *CONST objv[];  /* Argument objects */
    318318{
    319   if ( objc != 1 ) {
     319  int loadIni;
     320  int status;
     321
     322  if ( objc != 2 ) {
    320323    Tcl_AppendResult(interp, "wrong # args: should be \"",
    321                      Tcl_GetString(objv[0]),"\"", NULL);
     324                     Tcl_GetString(objv[0]), " 0|1\"", NULL);
    322325    return TCL_ERROR;
    323326  }
    324   LoadInitLibrary(1);
    325   return TCL_OK;
     327 
     328  if ( (status = Tcl_GetIntFromObj( interp, objv[1], &loadIni )) == TCL_OK ) {
     329    LoadInitLibrary( loadIni );
     330  }
     331  return status;
    326332}
    327333
Note: See TracChangeset for help on using the changeset viewer.