[comp.sys.amiga] Startup scripts using vt100

fredc@petsd.UUCP (Fred Cassirer) (11/18/86)

 I've been using DBW's vt100 program since it was 1st posted and think
 it's a great piece of code, but I couldn't help but notice that you 
 couldn't start it with a script (if you can then just ignore the rest of 
 this).  I looked thru the source and didn't
 find anything obvious so I hacked it up a bit and added a new start 
 option "-s".  When started with "-sscriptname" vt100 will automatically
 start running a script without having to click around with the mouse.
 You can then have commands like (assuming your using Matt's shell)
  
 % alias call %i run vt100 -ss:%i

 that allow you to do things like:

 % call work

 where work is a vt100 script on the startup directory.

 I found it to be reasonable update so I thought I'd post it.  If
 I went and re-implemented something that's already there, well what
 can I say.  

 Have fun, any problems I'll try to help, just email me at
        
       vax135!petsd!fredc
       Fred Cassirer
       Concurrent Computer Corporation
       Tinton Falls, NJ. 
 P.S.  Does anyone know how we could speed up the ASCII SEND?  It run's at
       what looks like 100 baud.  In the older versions of vt100 it was
       quite a bit quicker (also in the original amigaterm that vt100 
       started off from).

 ------------ Start clipping about here -------------
/*  Updates to vt100.c to allow a script to be specified on the 
    startup line.  It should be inserted after line 42 in vt100 v2.2 */

    char *initscript;
    
    initscript = NULL;

    if (argc > 1) 
     if (strncmp(argv[1],"-s",2) == 0) {
        initscript = argv[1] + 2;
        argc = 0;
     }
     else 
      if (strncmp(argv[2],"-s",2) == 0) {
        initscript = argv[2] + 2;
        argc = 1;
      }

 /* These calls where here, I included them for reference, they are at
    line 57 in v2.2 source. */

    InitDefaults(argc,argv);
    InitDevs();
  
        .
        .
        .
  
   /* This goes in at line 86  */

    if (initscript) {
       script_start(initscript);
       script_wait = FALSE; /* Jump right into the script */
    }

  /* The main loop of vt100.c starts here ... */