home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / misc2 / tcl.lzh / TCLV11.DOC < prev    next >
Text File  |  1984-08-31  |  23KB  |  953 lines

  1. This is a haphazard description of the new features of TCL V1.1. I hope it
  2. helps. I'll be monitoring the TCL notes file and will be happy to explain
  3. specific things. I'm still looking for new suggestions. I suspect (and hope)
  4. that with the wealth of new features, some of you will come up with even
  5. cooler things to add. I found that every time I added something new and
  6. started to use it in macros, it prompted me to think of another feature to
  7. add. Necessity is the mother of invention, don't you know. I'm so boggled with
  8. work right now there are a lot of things that will have to wait. I'm sorry
  9. about the incompleteness of all this but I hate to be the perpetrator of more
  10. Vaporware so here goes.
  11.  
  12. Ted
  13.  
  14. -------------------------------------------------------------------------------
  15.  
  16. When using ESET to set PATH=, it was possible to enter lower case strings
  17. for the pathspecs. Command.com hates this, so now TCL detects setting of
  18. PATH= and converts the value to upper case.
  19.  
  20. A bad chdir or cd command now shows an error.
  21.  
  22. _______________________________________________________________________________
  23.  
  24. Help is no longer available. I didn't like the way it was done, so I disabled
  25. it and I'm working on a seperate help utility more like the VMS help facility.
  26.  
  27. _______________________________________________________________________________
  28.  
  29. TCL has command line switches for things. Currently available are the following:
  30.  
  31. -i  tells TCL it's running on an IBM instead of a Rainbow - this makes command
  32.     line editing work right and also CLS. On an IBM machine, the following
  33.     IBM keyboard to Rainbow equivalent translations are performed:
  34.     
  35.     PgUp = Prev Screen
  36.     PgDn = Next Screen
  37.     End  = Select
  38.     F1     = Do
  39.     Arrows as you'd expect
  40.     On IBM, Insert key will toggle insert mode as well as control-A
  41.     
  42. -m<path> tells TCL that the macro file to use is <path> - if you just type
  43.     -m or -mnothing, no macro file accesses are attempted.
  44.     
  45. -r  tells TCL not to do I/O redirection - let command.com do such commands
  46.     I'm having trouble with this one. First, I haven't implemented pipes yet.
  47.     Second, I can't seem to restore stdout on my AT. So when running on an
  48.     IBM machine, I always set -r. On a Rainbow, don't use -r. This will allow
  49.     you to redirect I/O from installed names. Also, don't do output redirect
  50.     to a device (like NUL or PRN) with a single right angle bracket. Use double
  51.     brackets (which means append). You may have guessed from all this that
  52.     I'm working on eliminating the necessity of COMMAND.COM altogether.
  53.  
  54. -p  run in permanent mode - this is useful for running TCL as your SHELL
  55.     from CONFIG.SYS. Exit is disallowed. (BTW - TCL traps control-c now so you
  56.     can't accidentally lose all your stuff and have to start it again.)
  57.  
  58. -l<num> defines the amount of space to set aside for logical names. Default is
  59.     2048 bytes. If you don't use many, save space and reduce it.
  60.  
  61. -e<num> defines the environment size. Default is 2048. !!!Not implemented yet.
  62.  
  63.  
  64. Here is my Rainbow config.sys line
  65.  
  66.     shell=f:\tasks\tcl.exe -pmf:\tcl\startup.tcl
  67.  
  68. and my AT config.sys line
  69.  
  70.     shell=c:\tasks\tcl.exe -pirm\tcl\startup.tcl
  71.  
  72. _______________________________________________________________________________
  73.  
  74. There are a bunch of new ways to output text to the console:
  75.  
  76. WRITE - 
  77.     This was in V1.0 but it works differently now. It understands 'C'
  78.     language style escape sequences (i.e. beginning with a backslash).
  79.     \n - output CR-LF
  80.     \t - horizontal tab
  81.     \s - a space
  82.     \e - the 'escape' character (dec. 27)
  83.     \ddd - ascii code in decimal (first character not = 0)
  84.     \0ddd - ascii code in octal
  85.     This command does not automatically print a newline anymore
  86.     WARNING: Don't print file specs with this - the backslashes get screwed up
  87.  
  88. WRITELN - 
  89.     same as WRITE but does the newline automatically at the end
  90.     
  91. WRITENI -
  92.     same as WRITE but escape sequences are not interpreted - use this to
  93.     display filespecs
  94.     
  95. PWRITE -
  96.     similar to WRITE - however, escape sequences are initiated with the '$'
  97.     character and are interpreted the same way the the PROMPT environment
  98.     string defines them (This is how TCL prints your prompt)
  99.              
  100. By the way, TCL prints a newline before the prompt. Also, it no longer adds
  101. an asterisk to the prompt. If you still want that (as I do) redefine the
  102. prompt at startup. There is an easy way to do this which brings me to
  103.  
  104. _______________________________________________________________________________
  105.  
  106. !! ENVIRONMENT VARIABLES !!
  107.  
  108. Anywhere you want to use the value of an environment string, use the name
  109. of the string surrounded by percent signs. For example, to show the current
  110. value of comspec from a macro designed for this purpose do
  111.  
  112.     def comspec? writeni Comspec is currently set to %comspec%.
  113.  
  114. then type
  115.  
  116.     comspec?
  117.  
  118. A macro which appends a new path to your path string is
  119.  
  120.     def addpath eset path=%path%;%1
  121.                  
  122. To add an asterisk to your prompt do
  123.  
  124.     eset prompt=*%prompt%
  125.     
  126. If the environment variable is undefined, the %whatever% is simply deleted.
  127.                     
  128. _______________________________________________________________________________
  129.  
  130. Macro stuff:
  131.  
  132. The name of a macro can now be written on the same line as the <SOH> or
  133. control-A in the macro file and the case doesn't matter anymore.
  134.  
  135. Macro names cannot exceed eight letters.
  136.  
  137. Macro definitions cannot exceed 1000 characters (including newlines).
  138.  
  139. You can redefine all sorts of things to make them smarter by defining a
  140. macro with the same name. For example, if you use some utility named FOOBAR
  141. which is defined as an installed name you can override the installed name
  142. and use a macro to give common switches specified in an environment string.
  143. Suppose you always type
  144.  
  145.     foobar /switch1 /switch2=something filespec
  146.     
  147. you can reduce this to
  148.  
  149.     foobar filespec
  150.     
  151. like this
  152.  
  153.     eset foobar=/switch1 /switch2=something
  154.     def foobar .foobar %foobar% %1
  155.  
  156. The period at the beginning of the line tells TCL to ignore a macro of the
  157. same name and use the normal rules governing the determination of what to
  158. do.
  159.  
  160. _______________________________________________________________________________
  161.  
  162. New commands!
  163.  
  164. These commands can be typed in upper or lower case.
  165.  
  166. GOTO -
  167.     A label in TCL is any string of nonwhitespace characters beginning with
  168.     a colon and occuring at the beginning of a line. You use goto to get there.
  169.     
  170.     looper     {this is a do-nothing macro which is usefule for
  171.     :loop goto loop {proving that TCL can detect control-C in a macro and
  172.             {do the right thing - what it does is ask you if you
  173.             {want to terminate the macro - neat huh? Try it.
  174.  
  175. RETURN -
  176.     Return to caller of this macro.
  177.     
  178. ABORT -
  179.     Cancels all macro processing, no matter how many levels deep.
  180.  
  181. COM -
  182.     Pass the rest of the line directly to command.com without further
  183.     interpretation.
  184.  
  185.     Example:    here is a macro which will bypass TCL HELP
  186.  
  187.     def help com help %*
  188.  
  189. _______________________________________________________________________________
  190.  
  191. Conditional operators:
  192.  
  193. All conditional operators are invoked by typing a '?' followed by the
  194. conditional name. If the condition is false, the rest of the line is
  195. ignored. Otherwise the rest of the line is executed. If a '^' follows the '?',
  196. the reverse is done. (The '^' indicates you want the negation of the condition)
  197. Some of these operators are more useful for their side effects. Still, they
  198. all evaluate to true or false.
  199.  
  200. EQU -
  201.     Looks at the next 2 tokens and skips the rest of the line if they are
  202.     not exactly equal.
  203.     
  204.     ?equ yes yes writeln Yes equals yes.
  205.     ?equ %1. yes. writeln First argument equals yes.
  206.     ?^equ %1. . writeln The first argument isn't null.
  207.     
  208.     Note that the last two examples have periods stuck in. This is so that
  209.     even if the %1 is empty, it still evaluates to a recognizable token. If
  210.     you were trying to check the value of an environment string like this:
  211.     
  212.     ?^equ %foo% bar goto somewhere
  213.     
  214.     and foo wasn't defined, the line would evaluate to
  215.     
  216.     ?^equ bar goto somewhere
  217.  
  218.     "bar" and "goto" would be compared and then the statement "somewhere"
  219.     would be executed - not exactly what you want.
  220.     But with this
  221.  
  222.     ?^equ %foo%. bar. goto somewhere
  223.     
  224.     then foo=bar would result in ?^equ bar. bar. goto somewhere
  225.     and  foo=  would result in ?^equ . bar. goto somewhere
  226.     Get it?
  227.  
  228. SIM - 
  229.     Compares strings without regard to case - stands for "similar".
  230.  
  231. FIRST -
  232.     Stores the first character of a token in an environment variable.
  233.     
  234.     ?first Yes yesno {result: yesno=Y
  235.  
  236. INPUT -
  237.     Assumes the first token is the name of an environment string. User input
  238.     is taken from the console and the string entered by the user is stored
  239.     as the value of the environment variable. Evaluates to true if the
  240.     user types anything. (Except just whitespace) The user input goes into
  241.     the command line recall ring. This is so that responses to a macro which
  242.     is re-issued can be recalled.
  243.     
  244.     Here is a macro that will prompt the user for input.
  245.     
  246.     pfi {<prompt string> <environment variable>
  247.     :loop   write %1
  248.         ?input %2 return
  249.         writeln Sorry, null response is not permitted - try again.
  250.         goto loop
  251.  
  252. CLEAR -
  253.     takes one or more environment variable names and deletes them - always
  254.     evaluates to true
  255.     
  256.     ?clear alpha beta gamma
  257.  
  258.     which is the same as doing
  259.     
  260.     eset alpha=
  261.     eset beta=
  262.     eset gamma=
  263.  
  264. NULL -
  265.     Assumes the first token is the name of an environment string. Evaluates
  266.     to true if the environment string isn't defined.
  267.     
  268.     Here is some code which makes sure comspec is defined and asks for it
  269.     if it isn't.
  270.  
  271.     :loop   ?^null comspec goto ok    {compsec set? then do nothing
  272.         writeln Hey! you forgot to define comspec=.
  273.         pfi What\sshould\sit\sbe?\s\s comspec   {use pfi macro from above
  274.     :ok
  275.         {note that \s is used instead of spaces because the intent
  276.         {is to pass all four words as a single token
  277.         {someday, I'll implement quotes
  278.  
  279. FBUILD -
  280.     Builds a legal filespec from component parts, adding punctuation as
  281.     necessary.
  282.     
  283.     ?fbuild path e \tcl macros tcl
  284.     results in
  285.     path=e:\tcl\macros.tcl
  286.  
  287. ISDIR -
  288.     Evaluates to true if the argument is a valid directory
  289.     
  290.     ?isdir \ writeln Yup, the root still exists.
  291.  
  292. FPARSE -
  293.     Breaks up the first argument into filespec components. The remaining
  294.     arguments are environment strings which are set to the component parts.
  295.     
  296.     e.g.
  297.     fparse e:\tcl\macros.tcl disk path root ext
  298.     would result in
  299.     disk=e:
  300.     path=\tcl\
  301.     root=macros
  302.     ext=.tcl
  303.     If your not interested in a component, just use a period. If the component
  304.     is missing, the environment variable is deleted.
  305.     Here is a macro which applies a default extension to a path stored in
  306.     an environment string passed as the first arguement.
  307.  
  308.     defext {<env var> <def ext>
  309.     ?equ %1. . goto error
  310.     ?fparse %1 . . . ext
  311.     ?null ext eset %1=%1.%2
  312.     ?clear ext
  313.  
  314.     sample use
  315.     ?pfi Enter\sfilespec:\s\s spec
  316.     defext spec txt
  317.  
  318. ERRL -
  319.     Is true if the return code from the last executed program is greater than
  320.     or equal to the argument.
  321.     
  322.     example:
  323.  
  324.     cc -c %* >logfile            {compile c programs to objects
  325.     ?^errl 1 return            {if no error ok
  326.     writeln Compiler error!
  327.     abort                {trash caller macro so he won't try to link
  328.  
  329. EXIST -
  330.     Is true if the specified file exists.
  331.  
  332.     Here is a macro which makes sure an install is legal before doing it.
  333.     (a classic example of using the dot operator to make a built-in function
  334.      more intelligent)
  335.     
  336.     install
  337.         ?null %2 goto error1
  338.         ?^exist %2 goto error2
  339.         .install %1 %2
  340.         return
  341.     :error1
  342.         writeln Install error: missing argument(s)
  343.         return
  344.     :error2
  345.         writeni Install error: file %2 doesn't exist.
  346.         writeln
  347.  
  348. TIME -
  349.     Sets an environment variable to the current date and time.
  350.     
  351.     ?time tm
  352.     writeln Test started at %tm%
  353.     test this and that
  354.     ?time tm
  355.     writeln Test ended at %tm%
  356.     ?clear tm
  357.  
  358. _______________________________________________________________________________
  359.  
  360. Zero Length Command Abbreviation
  361.  
  362. If TCL sees that the first token on a command line (considered to be the
  363. "keyword") contains a period, then it assumes you have abbreviated the
  364. actual command to zero characters. It then tries run a macro named "exttrap".
  365. The macro must already be in memory. It won't be loaded automatically like
  366. other macros. You have to do "loadm exttrap" at startup.
  367.  
  368. The entire line is passed to the "exttrap" macro with an extra argument
  369. at the beginning. This argument is the extension from the first token,
  370. including the period. Your macro can then decide what to do based on the
  371. extension of the filespec. Here is an example (it happens to be my exttrap)
  372.  
  373.     exttrap
  374.     eset ext=%1%<
  375.     ?sim %ext% .? dir %1??
  376.     ?sim %ext% .* dir %1
  377.     ?sim %ext% .lnk lnk %1
  378.     ?sim %ext% .c edt ..\c\%1
  379.     ?sim %ext% .h edt ..\h\%1
  380.     ?sim %ext% .asm edt ..\s\%1
  381.     ?sim %ext% .inc edt ..\s\%1
  382.     ?sim %ext% .mac edt ..\s\%1
  383.     ?sim %ext% .sys edt \%1
  384.     ?clear ext
  385.     return
  386.  
  387. I can then simply type
  388.  
  389.     test.c
  390.  
  391. and the statement
  392.  
  393.     edt ..\c\test.c
  394.     
  395. is executed.
  396.  
  397. _______________________________________________________________________________
  398.  
  399. Here are a zillion actual working macros from my macro files. The first
  400. set is from my startup.tcl file and the rest are from my general macros.tcl
  401. file. Sorry, no documentation but if you see something interesting yet
  402. inexplicable, ask me about it in the notes file.
  403.  
  404. _______________________________________________________________________________
  405. From my STARTUP.TCL
  406.  
  407. tclinit
  408. tclstart
  409. undef tclstart
  410. 
  411. tclstart
  412. autoexec
  413. undef autoexec
  414. step2
  415. undef step2
  416. ?exist g:\boottime goto msg2
  417. ?^exist \net.aex goto msg1
  418. :gettime
  419. writeln Getting date and time from BEORN.
  420. gettime
  421. ?^exist \flags.aex goto err1
  422. copy \flags.aex g:\boottime >>nul
  423. goto end
  424. :msg1
  425. writeln Network appears to be not installed
  426. yn Is\sthis\scorrect
  427. ?sim %yn% n goto gettime
  428. yn Want\sto\sset\sdate\sand\stime
  429. ?sim %yn% n goto end
  430. date
  431. time
  432. goto end
  433. :msg2
  434. ?time tm
  435. writeln Date and Time:\t%tm%
  436. ?clear tm
  437. goto end
  438. :err1
  439. writeln \flags.aex is missing
  440. :end
  441. ?clear yn
  442. loadm exttrap
  443. autoexec
  444. eset comspec=e:\dos\command.com
  445. ?^isdir g:\ goto stay
  446. copy \dos\command.com g: >>nul
  447. eset comspec=g:\command.com
  448. eset tmp=g:
  449. :stay
  450. eset include=f:\msc;..\h
  451. eset lib=f:\msc;..\o
  452. eset PATH=F:\TASKS;E:\DOS;F:\MSC;E:\POLY;E:\decnet;..\T
  453. eset prompt=*$e[1m$p$g$e[m
  454. copy ptp.cfg g: >>nul
  455. ?exist net.aex network
  456. break on
  457. cls
  458. step2
  459. writeln Welcome to MRDOS running TCL V1.1 - 37 users at 46%% CPU loading
  460. set mf$ f:\batches\macros.tcl
  461. set MF$ g:\macros.tcl
  462. ?exist MF$ writeln Macro file already on G:
  463. ?^exist MF$ writeln Moving macro file to drive G.
  464. ?^exist MF$ copy mf$ g: >>nul
  465. mfile MF$
  466. loadm install
  467. hfile f:\batches\help.lng
  468. writeln Setting startup logical names.
  469. exec f:\batches\sets
  470. exec b$setsmsc
  471. writeln Setting startup installed names.
  472. exec b$installs
  473. cp netdrv
  474. cls
  475.  
  476. _______________________________________________________________________________
  477. From my MACROS.TCL
  478.  
  479. xmac
  480. mfile %1%<
  481. %*
  482. undef %1
  483. mfile MF$
  484. tools
  485. lib f:\msc\tctools%*;
  486. apply
  487. eset keyword=%1%<
  488. :loop ?sim %1. . goto end
  489. %keyword% %1%<
  490. goto loop
  491. :end
  492. ?clear keyword
  493. 
  494. ctest
  495. writeln here is a comment {slisejf;lsiejf;asleifj
  496. exttrap
  497. eset ext=%1%<
  498. ?sim %ext% .? dir %1??
  499. ?sim %ext% .* dir %1
  500. ?sim %ext% .lnk lnk %1
  501. ?sim %ext% .c edt ..\c\%1
  502. ?sim %ext% .h edt ..\h\%1
  503. ?sim %ext% .asm edt ..\s\%1
  504. ?sim %ext% .inc edt ..\s\%1
  505. ?sim %ext% .mac edt ..\s\%1
  506. ?sim %ext% .sys edt \%1
  507. ?clear ext
  508. return
  509. defext
  510. ?fparse %1 d p r e
  511. ?sim %e%. . eset e=%2
  512. ?fbuild f d p r e
  513. ?clear d p r e
  514. lnk
  515. defext %1 .lnk
  516. savdir
  517. do
  518. link @%f%
  519. ?clear %f%
  520. restdir
  521. mod?
  522. search .. -name %1.[hcoe]* -ls
  523. looper
  524. :looper %*
  525. goto looper
  526. 
  527. dif
  528.     ?clear fcf
  529.     ?sim %1. /b. eset fcf=%1<
  530.     eset f1=%1
  531.     eset f2=%2
  532.     ?null f1 pfi File\sCompare\sfirst? f1
  533.     ?null f1 return
  534.     ?null f2 pfi File\sCompare\ssecond? f2
  535.     ?fparse %f1% d1 p1 r1 e1
  536.     ?clear d2 p2 r2 e2
  537.     ?^null f2 ?fparse %f2% d2 p2 r2 e2
  538.     ?null f2 eset r2=%r1%
  539.         ?^null r2 goto chke
  540.     yn Do\syou\smean\s'%r1%.bak'
  541.     ?sim %yn% y eset r2=%r1%
  542.     ?sim %yn% y goto doit
  543. :chke    ?^null e2 goto doit
  544.     ?^sim %r1% %r2% eset e3=%e1%
  545.     ?sim %r1% %r2% eset e3=.bak
  546.     ?sim %f1%%d1%. . eset e3=.bak
  547.     yn Do\syou\smean\s'%r2%%e3%'
  548.     ?sim %yn% n abort
  549.     ?sim %yn% y eset e2=%e3%
  550. :doit    ?fbuild f1 d1 p1 r1 e1
  551.     ?fbuild f2 d2 p2 r2 e2
  552.     writeni fc %fcf% %f1% %f2%
  553.     fc %fcf% %f1% %f2%
  554. yn
  555.     yesno   %1 yn
  556. yesno
  557.     ?sim    %2. . goto error
  558. :top    write    %1? [y/n]\s\s
  559.     ?^input ttyn goto top
  560.     ?first    %ttyn% tyn
  561.     ?clear    ttyn
  562.     ?^sim    %tyn% y ?^sim %tyn% n goto top
  563.     eset    %2=%tyn%
  564.     ?clear    tyn
  565.     return
  566. :error    writeln \nYESNO Error: missing argument(s)
  567.     abort
  568. mpfi
  569.     ?sim    %2. . goto error
  570.     goto    top
  571. :loop    writeln Input is mandatory - try again
  572. :top    write    %1\s\s
  573.     ?^input %2 goto loop
  574.     return
  575. :error    writeln \nMPFI Error: missing argument(s)
  576. pfi
  577.     ?sim    %2. . goto error
  578.         write   %1\s\s
  579.     ?input    %2
  580.     return
  581. :error    writeln \nPFI Error: missing argument(s)
  582. intest
  583. :top    mpfi    Enter\ssome\stext: text
  584. :opt    pfi    Enter\soptional\stext:\s\s opt
  585.     ?null    opt goto next
  586.     writeln optional text is "%opt%"
  587. :next    write    You typed "
  588.     writeni %text%
  589.     writeln "
  590. :merge    yn    Merge them
  591.     ?sim    %yn% n goto del
  592.     eset    tmp=%opt%%text%
  593.     eset    text=%tmp%
  594.     ?clear    tmp
  595.     writeln Merged string is '%text%'
  596. :del    yn      Delete\sit
  597.     ?sim    %yn% y ?clear text
  598.     ?^sim    %yn% y goto opt
  599. :exit    ?clear    opt
  600.     yn    Run\sthrough\sit\sagain
  601.     ?sim    %yn% y goto top
  602.     ?clear    yn
  603.     return
  604. maktcl
  605.     ?sim    %1. latest. goto latest
  606.     ?sim    %1. link. goto link
  607.     cls
  608.     ?clear    args
  609. :loop    eset    f=%1%<
  610.     ?null    f goto ready
  611.     ?fparse %f% d p r e
  612.     ?null    e eset e=.c
  613.     ?fbuild f d p r e
  614.     ?^null    args eset args=%args% %f%
  615.         ?null   args eset args=%f%
  616.     goto    loop
  617. :ready
  618.     ?clear    f d p r e
  619.     ?^null    args co %args%
  620.     ?clear    args
  621.     yn    Continue
  622.     ?sim    %yn% y goto link
  623.     ?clear    yn
  624.     abort
  625. :link
  626.     ?clear    yn
  627.     do
  628.         link    @tcl.lnk
  629.     metd    tclnew
  630.     exemod    \tasks\tclnew.exe
  631.     writeln
  632.     write    Enter new max:
  633.     ?^input max goto end
  634.     exemod    \tasks\tclnew.exe /max %max%
  635. :end
  636.     ?clear    max
  637.     e:
  638.     dr
  639.     writeln Ready to EXIT.
  640.     return
  641. :latest
  642.     ?^exist f:\tasks\tclnew.exe goto nofile
  643.     del f:\tasks\tcl.exe
  644.     ren f:\tasks\tclnew.exe tcl.exe
  645.     writeln done
  646.     return
  647. :nofile
  648.     writeln There is no new version of TCL.
  649.     return
  650. isdir
  651.     ?sim    %1. . goto err
  652.     ?^isdir %1 goto no
  653.     writeln yes
  654.     return
  655. :no
  656.     writeln no
  657.     return
  658. :err    writeln ISDIR missing argument
  659.     abort
  660. install
  661. ?exist %2 .install %1 %2
  662. ?^exist %2 writeni Install Error: File '%2' isn't visible
  663. time?
  664. ?time time
  665. writeni Current Date and Time - %time%
  666. ?clear time
  667. ENTD
  668. e:
  669. ntd %*
  670. f:
  671. NTD
  672. savdir
  673. cd \decnet\decnet
  674. %*
  675. restdir
  676. AS
  677. set ra as %*
  678. savdir
  679. ds
  680. :loop
  681. ?sim %1. . goto end
  682. eset f=%1%<
  683. ?clear r e
  684. ?fparse %f% . . r e
  685. ?null e eset f=%f%.asm
  686. writeni masm %f%/mx,..\o\;
  687. masm %f%/mx,..\o\;
  688. goto loop
  689. :end
  690. ?clear r e
  691. restdir
  692. SYM
  693. savdir
  694. dt
  695. set debug symdeb %1.sym %1.exe
  696. mapsym %1%<
  697. ?^sim %2. . goto next
  698. yn Run\ssymdeb
  699. ?sim %yn% n goto next
  700. debug
  701. :next restdir
  702. ?clear yn
  703. %*
  704. edoc
  705. set efile f:\doc\%1.doc
  706. e
  707. DOC
  708. fv f:\doc\%1.doc
  709. NT
  710. savdir
  711. cd \decnet\decnet
  712. ntest
  713. restdir
  714. BLDNET
  715. savdir
  716. do
  717. link @dndcprb.lnk
  718. restdir
  719. BEORN
  720. sethost beorn
  721. GETTIME
  722. nettime beorn//
  723. MOVE
  724. search %1 -mv %2
  725. TESTSYS
  726. copy \testsys \config.sys
  727. TRUESYS
  728. copy \truesys \config.sys
  729. TCLOFF
  730. ren \tcl.aex notcl.aex
  731. TCLON
  732. ren \notcl.aex tcl.aex
  733. EMK
  734. set efile ..\c\%1.mak
  735. e
  736. MAK
  737. savdir
  738. cd ..\c
  739. make /f %1.mak
  740. restdir
  741. VDISK
  742. ndu ope dri %1 nod beorn ndis blxc:netdrv.%2
  743. VDISKRO
  744. ndu ope dri %1 nod beorn ndis blxc:netdrv.%2 acc ro
  745. VDCLOSE
  746. ndu clo dri h
  747. CERR
  748. eset logerr=%%>..\c\cerrlog
  749. eset showlog=type ..\c\cerrlog
  750. NOCERR
  751. eset logerr=
  752. eset showlog=
  753. DLOG
  754. del ..\c\cerrlog
  755. PATH
  756. eset path=%*
  757. ATT
  758. ntest attach %1%<
  759. %*
  760. CON
  761. ntest connect %*
  762. DET
  763. ntest detach %1%<
  764. %*
  765. LOG
  766. ntest log
  767. %*
  768. CHK
  769. ntest chk %*
  770. NETOFF
  771. ntest set lin sta off
  772. ntest log
  773. NETON
  774. ntest set lin sta on
  775. ntest log
  776. GREP
  777. set grepword %1%<
  778. search %* | map -x find grepword %%s | command
  779. set grepword
  780. SPR
  781. shortpr <%1 >prn
  782. tof
  783. EXEC
  784. tclaux tomacro %1 g:$macro$
  785. ?errl 1 abort
  786. mfile g:$macro$
  787. loadm $macro$
  788. del g:$macro$
  789. mfile MF$
  790. $macro$
  791. undef $macro$
  792. LEARN
  793. tclaux tomacro %1 g:$macro$ %1
  794. mfile g:$macro$
  795. loadm %1
  796. del g:$macro$
  797. mfile MF$
  798. NETH
  799. copy \netdrv\h\*.h g: >>nul
  800. chkdsk g:
  801. MOVH
  802. copy ..\h\*.h g: >>nul
  803. chkdsk g:
  804. PRIN1
  805. type %1 >prn
  806. tof
  807. DW
  808. dir %1/w%<
  809. %*
  810. D
  811. dir %1%<
  812. %*
  813. C
  814. set rc c %*
  815. savdir
  816. cd ..\c
  817. cc Csw0 %* %logerr%
  818. %showlog%
  819. restdir
  820. ?^errl 1 return
  821. writeln Abort due to compile error.
  822. abort
  823. CO
  824. c -c %*
  825. CA
  826. co /Fa %1
  827. MET
  828. copy ..\t\%1.exe f:\tasks >>nul
  829. METD
  830. ?exist ..\t\%1.exe goto doit
  831. writeln
  832. writeni METD error - %1.exe not found
  833. writeln
  834. abort
  835. :doit
  836. copy ..\t\%1.exe f:\tasks >>nul
  837. del ..\t\%1.exe
  838. PE
  839. prin1 efile
  840. EC
  841. set efile ..\c\%1.c
  842. e
  843. E
  844. writeni editing efile
  845. edt efile
  846. EM
  847. set efile ..\s\%1.mac
  848. e
  849. EA
  850. set efile ..\s\%1.asm
  851. e
  852. ES
  853. set efile ..\s\%1.s
  854. e
  855. EH
  856. set efile ..\h\%1.h
  857. e
  858. EMAC
  859. ?sim %1. s. goto startup
  860. ptp mf$
  861. copy mf$ MF$ >>nul
  862. ?exist b$macros.bak del b$macros.bak
  863. return
  864. :startup edt f:\batches\startup.tcl
  865. ?exist b$startup.bak del b$startup.bak
  866. DC
  867. cd ..\c%<
  868. %*
  869. DS
  870. cd ..\s%<
  871. %*
  872. DH
  873. cd ..\h%<
  874. %*
  875. DO
  876. cd ..\o%<
  877. %*
  878. DT
  879. cd ..\t%<
  880. %*
  881. DD
  882. cd ..\d%<
  883. %*
  884. UP
  885. cd ..
  886. %*
  887. CPS
  888. cd \%1\%2%<
  889. %*
  890. CP
  891. cd \%1\c%<
  892. %*
  893. DR
  894. cd \%<
  895. %*
  896. DB
  897. cd f:\batches
  898. %*
  899. PURGE
  900. whereis *.bak|map -x del %%s|command
  901. X
  902. dir %1*.*%<
  903. %*
  904. DX
  905. del %1*.*%<
  906. %*
  907. OLORIN
  908. savdir
  909. cd \poly
  910. ren olorin.trm $$$dflt.trm
  911. trm
  912. ren $$$dflt.trm olorin.trm
  913. restdir
  914. EAUTO
  915. edt \autoexec.bat
  916. ECONF
  917. edt \config.sys
  918. DEB
  919. del *.bak
  920. %*
  921. WH
  922. whereis %1%< %*
  923. ZAP
  924. del %1\*.*
  925. rmdir %1
  926. GETH
  927. copy ..\h\%1.h g: >>nul
  928. chkdsk g:
  929. EHELP
  930. edt f:\batches\help.lng
  931. SIDIT
  932. savdir
  933. dt
  934. sid sidfile sidfile
  935. restdir
  936. RMPROJ
  937. search \%1 -name *.* -rm -rmdir
  938. MKPROJ
  939. mkdir \%1
  940. mkdir \%1\c
  941. mkdir \%1\s
  942. mkdir \%1\o
  943. mkdir \%1\h
  944. mkdir \%1\t
  945. mkdir \%1\d
  946. GET
  947. nft copy beorn::%1
  948. CTF
  949. copy %1 a: >>nul
  950. CFF
  951. copy a:%1 >>nul
  952.  
  953.