Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JOBLOG V1.5 -- a terminal session logger, part 01/06

5 views
Skip to first unread message

Leonard J. Peirce

unread,
Apr 4, 1995, 3:00:00 AM4/4/95
to
Submitted-by: pei...@gumby.cc.wmich.edu (Leonard J. Peirce)
Posting-number: Volume 7, Issue 49
Archive-name: joblog/part01
Supersedes: joblog: Volume 1, Issue 102-106

INTRODUCTION
Welcome to JOBLOG, a terminal session logging facility. JOBLOG is based
on the popular program PHOTO, written by Asbed Bedrossian at USC. Basically,
JOBLOG does what PHOTO does, provides some additional options for "secure"
log files (untouched by the user), and fixes some bugs that caused VT220
terminals to hang under certain circumstances.

PHOTO is Copyright 1986 by Asbed Bedrossian at University of Southern
California.

--
Leonard J. Peirce Internet: pei...@mickey.acs.wmich.edu
Western Michigan University pei...@wmich.edu
University Computing Services
Kalamazoo, MI 49008 Voice: (616) 387-5469

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$! Name : JOBLOG
$! By : Mark.B...@MVB.SAIC.COM
$! Date : 4-APR-1995 12:37:23.40
$! Using: VMS_SHARE 8.5-1, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$! James Gray, Michael Bednarek
$!
$! To unpack this archive:
$!+ Ensure that all parts are present, (6 at about 100 Blocks each).
$!+ Append all parts together to form one larger file.
$! Minimum of VMS 4.4 (VAX) / OpenVMS 1.0 (Alpha) is required.
$! Remove the headers of the first part, up to `cut here' line.
$! Execute file as a command procedure.
$!
$! The following file(s) will be created after unpacking:
$! 1. BUILD.COM;32
$! 2. COPYRIGHT.TXT;4
$! 3. DESCRIP.MMS;52
$! 4. DOC.TXT;4
$! 5. JOBLOG.C;230
$! 6. JOBLOG.HLP;2
$! 7. JOBLOGCLD.CLD;5
$! 8. JOBLOGMSG.MSG;4
$! 9. MANIFEST.TXT;5
$! 10. README.TXT;31
$! 11. SUBS.C;8
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f="SYS$SCRATCH:."+f$getjpi("","PID")+";"
$ if f$trnlnm("SHARE_UNPACK") .nes. "" then $ -
f=f$parse("SHARE_UNPACK_TEMP",f)
$ e="write sys$error ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack:subroutine!P1=file,P2=chksum,P3=attrib,P4=size,P5=fileno,P6=filetotal
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(CURRENT_BUFFER);DELETE(m);EXITIF INDEX(
ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;
PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;s := ERASE_LINE;c := SUBSTR(s,1,1);s :=
s-c;IF c = "X" THEN SPLIT_LINE; ENDIF;MOVE_HORIZONTAL(-1);l := LENGTH(s);p :=
1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);p := p+1;CASE c FROM ' ' TO '`' ['`']
: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1;[INRANGE,OUTRANGE]
: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;PROCEDURE Decode(b)LOCAL m;
POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");o:=CREATE_BUFFER(f,f);Decode(o);WRITE_FILE(o,
GET_INFO(COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl='f' 'f'-1 'f'
$ fa=f$getdvi(f$parse(f),"ALLDEVNAM")
$ Pa=f$getdvi(f$parse(P1),"ALLDEVNAM")
$ if fa .eqs. Pa then $ rename &f 'f$parse(P1)'
$ if fa .nes. Pa then $ copy &f 'f$parse(P1)'
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$!`20BUILD.COM`20--`20build`20JOBLOG
X$!
X$!`20Copyright`20(c)`201990,`20Leonard`20J.`20Peirce
X$!
X$`20IF`20P1`20.EQS.`20"OBJ"`20THEN`20GOTO`20BUILD_OBJ
X$!
X$!`20build`20JOBLOG`20from`20the`20sources
X$!
X$`20`20write`20sys$output`20"Building`20JOBLOG`20from`20the`20sources....."
X$`20`20write`20sys$output`20""
X$`20`20write`20sys$output`20"CC:`09JOBLOG.C"
X$!`20/OPTIMIZE=NOINLINE`20specified`20to`20overcome`20a`20bug`20in`20VAX`20C
V`203.0
X$`20`20cc/optimize=noinline`20joblog.c
X$`20`20write`20sys$output`20"CC:`09SUBS.C"
X$`20`20cc/optimize=noinline`20subs.c
X$`20`20write`20sys$output`20"MESSAGE:`09JOBLOGMSG.MSG"
X$`20`20message/nolist/object=joblogmsg.obj`20joblogmsg.msg
X$`20`20write`20sys$output`20"SET`20COMMAND:`09JOBLOGCLD.CLD"
X$`20`20set`20command/object`20joblogcld.cld
X$BUILD_OBJ:
X$`20`20write`20sys$output`20""
X$`20`20write`20sys$output`20"Linking`20JOBLOG....."
X$!
X$!`20NOTE:`20`20if`20you're`20using`20VAX`20C`20you`20might`20need`20to`20chan
Vge`20the`20link`20command
X$!`09`20`20to`20look`20like`20this:
X$!`20link/notrace`20joblog,subs,joblogcld,joblogmsg,sys$share:vaxcrtl.opt/opt
V
X$`20`20link/notrace`20joblog,subs,joblogcld,joblogmsg
X$`20`20write`20sys$output`20""
X$`20`20write`20sys$output`20"***`20JOBLOG`20built`20***"
X$`20`20exit
$ call unpack BUILD.COM;32 1249866305 "" 3 1 11
$!
$ create 'f'
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20JOBLOG
V`20General`20Public`20License
X
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20(C)`20Copyright`20199
V0`20by`20Leonard`20J.`20Peirce
X
X
X`09`09`09`20`20`09COPYING`20POLICIES
X
X`20`20`20Permission`20is`20hereby`20`20granted`20for`20copying`20and`20distrib
Vution`20of`20copies`20of`20the
XJOBLOG`20source`20`20files,`20and`20that`20of`20`20any`20part`20thereof,`20sub
Vject`20to`20`20the`20following
Xlicense`20conditions:
X
X`20`20`20`201.`20You`20may,`20without`20`20additional`20permission`20from`20th
Ve`20author,`20distribute`20
X`20`20`20`20`20`20`20JOBLOG`20or`20components`20of`20JOBLOG,`20with`20or`20wit
Vhout`20additions`20developed
X`20`20`20`20`20`20`20by`20you`20or`20by`20`20others`20at`20no`20charge.`20`20
V`20You`20may`20also`20distribute`20JOBLOG
X`20`20`20`20`20`20`20along`20with`20any`20other`20product`20`20for`20sale,`20p
Vrovided`20`20that`20the`20`20cost`20of
X`20`20`20`20`20`20`20the`20bundled`20package`20is`20the`20same`20regardless`20
Vof`20whether`20JOBLOG`20is`20in-
X`20`20`20`20`20`20`20cluded,`20and`20provided`20that`20those`20interested`20
V`20only`20in`20JOBLOG`20`20must`20be
X`20`20`20`20`20`20`20notified`20that`20it`20is`20a`20product`20freely`20availa
Vble`20from`20the`20author.
X
X`20`20`20`202.`20Furthermore,`20if`20you`20distribute`20JOBLOG`20software`20or
V`20`20parts`20of`20JOBLOG,
X`20`20`20`20`20`20`20with`20or`20without`20additions`20developed`20by`20you`20
Vor`20others,`20then`20you`20must`20
X`20`20`20`20`20`20`20either`20`20make`20`20available`20the`20`20source`20to`20
V`20all`20portions`20`20of`20the`20JOBLOG
X`20`20`20`20`20`20`20system`20(exclusive`20`20of`20any`20additions`20made`20by
V`20`20you`20or`20by`20others)`20upon
X`20`20`20`20`20`20`20request,`20or`20instead`20you`20may`20notify`20anyone`20r
Vequesting`20source`20that`20it
X`20`20`20`20`20`20`20is`20freely`20available`20from`20the`20author.
X
X`20`20`20`203.`20In`20`20addition,`20you`20`20may`20`20not`20`20omit`20any`20o
Vf`20the`20`20copyright`20`20notices`20on
X`20`20`20`20`20`20`20either`20the`20source`20files,`20the`20executable`20file,
V`20or`20the`20documentation.
X
X`20`20`20`204.`20Also,`20you`20`20may`20not`20omit`20transmission`20of`20this
V`20License`20agreement`20with`20
X`20`20`20`20`20`20`20whatever`20portions`20of`20JOBLOG`20that`20are`20distribu
Vted.
X
X`20`20`20`205.`20Lastly,`20any`20`20users`20of`20`20this`20`20software`20must
V`20be`20`20notified`20that`20`20it`20is
X`20`20`20`20`20`20`20without`20`20warrantee`20or`20guarantee`20`20of`20any`20n
Vature,`20express`20or`20implied,`20
X`20`20`20`20`20`20`20nor`20is`20there`20any`20fitness`20for`20use`20represente
Vd.
X
XSoftware`20is`20`20a`20malleable`20`20thing`20and`20the`20`20author`20can`20in
V`20`20no`20way`20`20guarantee`20that
Xusing`20this`20`20program`20will`20not`20cause`20grevious`20`20damage`20to`20y
Vour`20system.`20`20Of`20course
Xthis`20`20isn't`20anticipated,`20but`20`20if`20it`20`20does`20`20happen,`20the
V`20author`20`20cannot`20`20be`20held
Xliable`20for`20any`20damages`20either`20directly`20or`20indirectly`20caused`20
Vby`20this`20event.
X
XModification`20of`20the`20`20system`20is`20encouraged,`20providing`20`20that
V`20the`20portions`20of`20the
Xsystem`20that`20`20are`20from`20the`20original`20still`20`20carry`20the`20`20a
Vppropriate`20copyright`20no-
Xtices`20`20and`20`20that`20the`20`20changed`20`20sections`20`20are`20clearly
V`20`20delimited`20`20as`20such.`20`20The
Xauthor`20requests`20copies`20of`20any`20changes`20made`20to`20ensure`20that`20
Vthe`20various`20versions
Xstay`20reasonably`20in`20sync`20with`20each`20other.
X
XNote`20that`20it`20is`20not`20`20permitted`20to`20copy,`20sublicense,`20distri
Vbute`20or`20transfer`20any
Xof`20the`20JOBLOG`20software`20except`20as`20expressly`20indicated`20herein.
V`20`20`20Any`20attempts`20to
Xdo`20otherwise`20will`20be`20considered`20a`20violation`20of`20this`20license
V`20and`20your`20rights`20to
Xthe`20JOBLOG`20software`20will`20be`20voided.
X
X
XComments`20on`20`20the`20system`20`20and/or`20this`20licensing`20agreement`20a
Vre`20encouraged.`20`20Send
Xelectronic`20`20mail`20to`20pe...@wmich.edu.`20`20The`20text`20`20of`20this
V`20`20copyright`20license
Xwas`20borrowed`20from`20the`20ELM(tm)`20Mail`20System`20with`20permission`20fr
Vom`20Dave`20Taylor.
$ call unpack COPYRIGHT.TXT;4 710550098 "" 6 2 11
$!
$ create 'f'
X##############################################################################
V
X##############################################################################
V
X#
X#`20`20Site:`09Western`20Michigan`20University
X#`09`09University`20Computing`20Services
X#
X#`20`20System:`09JOBLOG
X#
X#`20`20Version=01`09Level=00`0901/05/90`09Leonard`20J.`20Peirce
X#
X#`20`20Purpose:`20`20`20`20`20Description`20file`20for`20building`20JOBLOG
X#
X#`20`20Version=01`09Level=01`0912/03/90`09Leonard`20J.`20Peirce
X#
X#`20`20Purpose:`20`20`20`20`20Updates`20for`201.1.
X#
X#`20`20Version=01`09Level=02`0902/11/91`09Leonard`20J.`20Peirce
X#
X#`20`20Purpose:`20`20`20`20`20Updates`20for`201.2.
X#
X#`20`20Version=01`09Level=03`0903/17/95`09Leonard`20J.`20Peirce
X#
X#`20`20Purpose:`20`20`20`20`20Updates`20for`201.5.
X#
X#`20`20Syntax:`09mms`09`09`09to`20build`20JOBLOG
X#`09`09mms`20install`09`09to`20build/install`20JOBLOG
X#`09`09mms`20clean`09`09to`20clean`20up`20after`20ourselves
X#
X#`20`20Other`20information:`09Copyright`20(c)`201990,`20Leonard`20J.`20Peirce
V
X#
X##############################################################################
V
X##############################################################################
V
X
XPROG`20=`20joblog
X
XSOURCES`20=`20joblog.c,subs.c,joblogcld.cld,joblogmsg.msg
X
XOBJECTS`20=`20joblog.obj,subs.obj,joblogcld.obj,joblogmsg.obj
X
XERRORS`20=`20error.dat`09`09`09!`20where`20error`20messages`20are`20sent
X
XBINDIR`20=`20sys$common:`5Bsysexe`5D`09`09!`20where`20the`20executable`20lives
V
XPROT`20=`20prot=(s:rwed,o:rwed,g:e,w:e)
X
X#`20VAX`20C`203.0`20has`20a`20problem`20with`20inline`20code`20generation;`20m
Vake`20sure`20that
X#`20/optimize`20has`20=noinline`20if`20you`20are`20using`20it
X
XCFLAGS=/optimize=noinline
XLINKFLAGS=/notrace
X#CFLAGS=/debug/nooptimize
X#LINKFLAGS=/debug
XLIBS=
X#
X#`20if`20you're`20using`20VAX`20C`20instead`20of`20DEC`20C`20you`20might`20nee
Vd`20to`20define`20LINKOPTIONS
X#`20this`20way:
X#LINKOPTIONS=$(LIBS),sys$share:vaxcrtl.opt/opt
X#
X#`20otherwise,`20if`20you're`20using`20DEC`20C`20this`20should`20work:
XLINKOPTIONS=$(LIBS)
X
X
X$(PROG).exe`20:`09$(OBJECTS)
X`09`09$(LINK)`20$(LINKFLAGS)/exec=$(PROG)`20$(OBJECTS)`20$(LINKOPTIONS)
X
Xclean`20:
X`09`09-`20delete/nolog/noconfirm`20*.obj;*,*.exe;*
X
Xinstall`20:`09$(PROG).exe
X`09`09copy`20$(PROG).exe`20$(BINDIR)/$(PROT)
X`09`09library/help/replace`20sys$help:helplib.hlb`20joblog.hlp
X
X#`20default`20rule`20--`20.C`20to`20.OBJ
X
X.c.obj`20:
X`09`09$(CC)`20$(CFLAGS)`20$*.C
X
X.FIRST
X`09`09@-`20define/nolog`20sys$error`20$(ERRORS)
X
X.LAST
X`09`09@-`20define/nolog`20sys$error`20sys$output
X
X#`20individual`20dependencies`20--`20make`20sure`20to`20update`20these`20if`20
Vyou`20change`20something!
X
Xjoblog.obj`20:
Xjoblogcld.obj`20:
Xjoblogmsg.obj`20:
$ call unpack DESCRIP.MMS;52 1543534484 "" 5 3 11
$!
$ create 'f'
XJOBLOG:`20`20a`20bonafide`20terminal`20logging`20facility
X---------------------------------------------
X
XJOBLOG,`20a`20facility`20for`20logging`20terminal`20sessions,`20is`20now`20ava
Vilable.
X
XThere`20are`20two`20types`20of`20JOBLOG`20log`20files:`20`20VERIFIED`20and`20U
VNVERIFIED.`20`20VERIFIED
Xlog`20files`20are`20guaranteed`20to`20be`20unedited`20by`20anyone,`20including
V`20the`20person`20who
Xcreated`20it.`20`20Since`20the`20log`20files`20themselves`20are`20never`20acce
Vssible`20to`20the`20user
Xwhile`20running`20JOBLOG,`20the`20only`20opportunity`20for`20modification`20is
V`20if`20logging`20is
Xdisabled`20while`20in`20JOBLOG,`20which`20immediately`20makes`20the`20log`20fi
Vle`20UNVERIFIED.
X
XThe`20difference`20between`20VERIFIED`20and`20UNVERIFIED`20log`20files`20becom
Ves`20important
Xfor`20printed`20and`20mailed`20log`20files,`20especially`20for`20class`20assig
Vnments.
X
XThis`20also`20corrects`20a`20major`20shortcoming`20of`20the`20SET`20HOST/LOG
V`20implementation
Xsince`20the`20file`20is`20never`20where`20a`20user`20can`20modify`20it.
X
XTo`20start`20JOBLOG,`20enter:
X
X`20`20`20`20`20$`20JOBLOG
X
XAs`20a`20reminder,`20while`20in`20JOBLOG,`20your`20prompt`20will`20be`20"Joblo
Vg>`20".`20`20To`20exit
XJOBLOG,`20simply`20enter:
X
X`20`20`20`20`20Joblog>`20LOGOUT
X
XRemember`20that`20after`20exiting`20JOBLOG,`20you`20are`20still`20logged`20in
V`20and`20need`20to`20enter
XLOGOUT`20to`20end`20your`20session.
X
XThere`20are`20two`20commands`20that`20can`20be`20specified`20while`20running
V`20JOBLOG:`201)`20turning
Xtime`20stamping`20of`20DCL`20commands`20on/off,`20and`202)`20turning`20logging
V`20on/off.
X
XTo`20toggle`20time`20stamping`20of`20DCL`20commands`20on/off,`20enter`20Contro
Vl-`5D.`20`20Time-
Xstamping`20is`20initially`20turned`20off`20when`20you`20enter`20JOBLOG`20unles
Vs`20you`20specified
Xthe`20/TIME_STAMP`20identifier`20when`20JOBLOG`20is`20started.`20`20The`20time
V`20stamps`20for`20the
XDCL`20commands`20will`20only`20appear`20in`20the`20log`20file`20and`20will`20n
Vot`20appear`20on`20the
Xscreen.
X
XTo`20toggle`20between`20logging`20on/off,`20enter`20Control-`5C.`20`20Logging
V`20is`20initially
Xturned`20on`20when`20JOBLOG`20is`20started.`20`20If`20logging`20is`20ever`20tu
Vrned`20off,`20the`20log
Xfile`20immediately`20becomes`20UNVERIFIED.
X
XThe`20disposition`20of`20the`20log`20file`20upon`20exiting`20JOBLOG`20can`20be
V`20handled`20in`20two
Xways.`20`20You`20can`20either`20specify`20it`20when`20invoking`20JOBLOG`20or
V`20you`20can`20wait`20for
XJOBLOG`20to`20ask`20what`20should`20be`20done.`20`20The`20different`20disposit
Vions`20for`20the`20log
Xfile`20are:
X
X`20`20`201)`20Print`20the`20log`20file.`20You`20will`20be`20prompted`20for`20t
Vhe`20print`20queue`20to`20be
X`20`20`20`20`20`20used.`20`20The`20/PRINT`20qualifier`20can`20be`20specified
V`20upon`20startup`20to`20have
X`20`20`20`20`20`20the`20log`20file`20automatically`20printed`20upon`20exit`20f
Vrom`20JOBLOG.`20`20The`20queue
X`20`20`20`20`20`20can`20be`20specified`20upon`20startup`20by`20using`20/PRINT=
Vqueue`20where`20queue
X`20`20`20`20`20`20is`20the`20print`20queue`20to`20be`20used.`20`20If`20the`20q
Vueue`20is`20not`20specified,`20you
X`20`20`20`20`20`20will`20be`20prompted`20for`20it`20after`20exiting`20JOBLOG.
V`20
X
X`20`20`202)`20Save`20the`20log`20file.`20`20You`20will`20be`20prompted`20for
V`20the`20name`20of`20the`20log
X`20`20`20`20`20`20file.`20`20The`20/SAVE`20qualifier`20can`20be`20specified`20
Vupon`20startup`20to`20have
X`20`20`20`20`20`20log`20file`20automatically`20saved`20upon`20exit`20from`20JO
VBLOG.`20`20The`20filename
X`20`20`20`20`20`20can`20be`20specified`20upon`20startup`20by`20using`20/SAVE=f
Vilename`20where
X`20`20`20`20`20`20filename`20is`20the`20name`20of`20the`20file`20to`20which`20
Vthe`20log`20file`20is`20to`20be
X`20`20`20`20`20`20saved.`20`20If`20the`20filename`20is`20not`20specified,`20yo
Vu`20will`20be`20prompted
X`20`20`20`20`20`20for`20it`20after`20exiting`20JOBLOG.
X
X`20`20`203)`20Mail`20notification`20of`20a`20pending`20log`20file.`20`20You`20
Vwill`20be`20prompted`20for
X`20`20`20`20`20`20the`20user`20that`20is`20to`20receive`20the`20log`20file.`20
V`20The`20/MAIL`20qualifier`20can
X`20`20`20`20`20`20be`20specified`20upon`20startup`20to`20have`20the`20notifica
Vtion`20automatically
X`20`20`20`20`20`20mailed`20upon`20exit`20from`20JOBLOG.`20`20The`20person`20to
V`20receive`20the`20notifi-
X`20`20`20`20`20`20cation`20can`20be`20specified`20upon`20startup`20by`20using
V`20/MAIL=username
X`20`20`20`20`20`20where`20username`20is`20the`20name`20of`20the`20user`20to`20
Vreceive`20the`20notification.
X`20`20`20`20`20`20If`20the`20username`20is`20not`20specified,`20you`20will`20b
Ve`20prompted`20for`20it
X`20`20`20`20`20`20after`20exiting`20JOBLOG.
X
X`20`20`20`20`20`20The`20log`20file`20notification`20will`20contain`20instructi
Vons`20on`20how`20to`20re-
X`20`20`20`20`20`20trieve`20the`20log`20file`20as`20well`20as`20whether`20or`20
Vnot`20the`20log`20file`20was
X`20`20`20`20`20`20VERIFIED`20or`20UNVERIFIED.
X
X`20`20`20`20`20`20There`20are`20certain`20restrictions`20on`20who`20can`20rece
Vive`20mailed`20log`20files.
X`20`20`20`20`20`20To`20be`20able`20to`20mail`20a`20log`20file`20to`20a`20user,
V`20the`20intended`20recipient
X`20`20`20`20`20`20must`20be`20faculty,`20staff,`20or`20hold`20the`20JOBLOG_REC
VIPIENT`20identifier.
X`20`20`20`20`20`20It`20is`20also`20not`20possible`20to`20send`20a`20log`20file
V`20to`20yourself.
X`20`20`20`20`20`20
X`20`20`204)`20Delete`20the`20log`20file.`20`20This`20is`20the`20default`20and
V`20can`20be`20used`20when`20you
X`20`20`20`20`20`20want`20to`20start`20over.
X
XRetrieving`20log`20files
X--------------------
XOnce`20you`20have`20received`20a`20log`20file`20notification,`20the`20log`20fi
Vle`20can`20be`20retrieved
Xby`20using`20the`20/RETRIEVE`20qualifier.`20`20Either`20/USER`20or`20/CLASS`20
Vmust`20be`20specified
Xalong`20with`20/RETRIEVE.`20`20For`20example,`20to`20retrieve`20a`20log`20file
V`20from`20user`20620SMITH,
Xthe`20syntax`20would`20be:
X
X`20`20`20`20`20$`20JOBLOG/RETRIEVE/USER=620SMITH
X
XThe`20resulting`20filename`20would`20be`20620SMITH.JOBLOG`20if`20the`20log`20f
Vile`20was`20VERIFIED
Xand`20620SMITH.UNVERIFIED_JOBLOG`20if`20the`20log`20file`20was`20UNVERIFIED.
X
XThe`20/CLASS`20qualifier`20would`20normally`20only`20be`20used`20by`20instruct
Vors.`20`20For`20example,
Xif`20an`20instructor`20wanted`20to`20retrieve`20all`20of`20the`20log`20files
V`20for`20one's`20CS`20105
Xclass,`20the`20syntax`20would`20be
X
X`09$`20JOBLOG/RETRIEVE/CLASS=CS105
X
XThere`20are`20no`20spaces`20in`20the`20class`20specification.
X
XSince`20a`20user`20can`20only`20retrieve`20log`20files`20that`20were`20"mailed
V"`20specifically
Xto`20him/her,`20the`20problem`20of`20retrieving`20log`20files`20for`20another
V`20instructor's
XCS`20105`20class`20is`20avoided.
X
XMailed`20log`20files`20will`20be`20deleted`20after`20a`20certain`20length`20of
V`20time,`20currently
Xten`20days.`20`20After`20seven`20days,`20both`20the`20sender`20and`20the`20rec
Vipient`20will`20be`20warned
Xthat`20the`20log`20file`20hasn't`20been`20picked`20up`20and`20that`20it`20will
V`20be`20deleted.
X
XWhile`20running`20JOBLOG`20it`20is`20best`20to`20avoid`20doing`20full-screen
V`20applications`20such
Xas`20editing.`20`20Sometimes`20they`20are`20not`20logged`20correctly,`20and`20
Vsuch`20files`20also
Xcause`20problems`20if`20they`20are`20printed.
X
XIt`20is`20also`20not`20possible`20to`20run`20JOBLOG`20while`20in`20JOBLOG.
X
XFor`20more`20information`20about`20JOBLOG,`20enter:
X
X`20`20`20`20`20$`20HELP`20JOBLOG
$ call unpack DOC.TXT;4 459296139 "" 11 4 11
$!
$ create 'f'
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20`20Site:`09Western`20Michigan`20University
X`09`09University`20Computing`20Services
X
X`20`20`20System:`09JOBLOG
X`20`20
X`20`20`20Program:`09JOBLOG
X
X`20`20`20Version=01`09Level=00`0907/02/90`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09JOBLOG`20will`20capture`20the`20output`20for`20a`20termina
Vl`20session,`20place
X`09`09it`20in`20a`20file,`20and,`20upon`20exit,`20give`20the`20option`20of`20p
Vrinting`20it,
X`09`09saving`20it,`20storing`20the`20log`20file`20in`20a`20secure`20area`20and
V`20sending
X`09`09notification`20of`20it`20to`20another`20user,`20or`20deleting`20it.
X
X`09`09There`20are`20essentially`20two`20types`20of`20JOBLOG`20log`20files:`20
V`20VERIFIED
X`09`09and`20UNVERIFIED.`20`20VERIFIED`20log`20files`20are`20guaranteed`20to`20
Vbe`20un-
X`09`09touched`20by`20the`20person`20who`20created`20them.`20`20Since`20the`20l
Vog`20files
X`09`09themselves`20are`20never`20accessible`20to`20the`20user`20while`20runnin
Vg
X`09`09JOBLOG,`20the`20only`20opportunity`20for`20modification`20is`20if`20logg
Ving
X`09`09is`20disabled`20while`20in`20JOBLOG.`20`20While`20this`20is`20often`20a
V`20nice
X`09`09feature,`20it`20immediately`20makes`20the`20log`20file`20UNVERIFIED.
X
X`09`09The`20difference`20between`20VERIFIED`20and`20UNVERIFIED`20log`20files
V`20be-
X`09`09comes`20important`20for`20printed`20and`20mailed`20log`20files,`20especi
Vally
X`09`09for`20class`20assignments`20and`20such.`20
X
X`20`20`20Version=01`09Level=01`0912/03/90`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09Fix`20/SKIM`20so`20that`20it`20actually`20works.
X
X`09`09Add`20a`20second`20exit`20handler`20that`20is`20called`20in`20quit()`20s
Vo`20that
X`09`09if`20a`20user`20hangs`20up`20or`20disconnects`20their`20log`20file`20is
V`20deleted.
X
X`09`09Make`20sure`20to`20override`20the`20user's`20default`20protection`20for
V`20the
X`09`09log`20file`20so`20that`20it`20can`20be`20deleted.
X
X`09`09Make`20sure`20that`20the`20log`20file`20is`20deleted`20on`20any`20ungrac
Veful`20exit.
X
X`09`09Clean`20up`20some`20comments`20that`20were`20misleading`20or`20just`20pl
Vain
X`09`09wrong.
X
X`20`20`20Version=01`09Level=02`0901/18/91`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09Quit`20using`20mailboxes`20to`20detect`20input`20on`20the
V`20TTY`20and`20PTY.
X`09`09No`20more`20dropped`20reads`20on`20the`20TTY`20and`20a`20big`20win`20in
V`20performance.
X
X`09`09Fix`20warn()`20so`20that`20it`20will`20actually`20warn`20both`20the`20se
Vnder
X`09`09and`20the`20recipient.`20`20Add`20the`20delete`20date`20to`20the`20mail
V`20message
X`09`09sent`20to`20the`20sender`20and`20recipient.
X
X`09`09Add`20PHOTO_MODE`20so`20that`20users`20don't`20have`20to`20go`20through
V`20all`20of
X`09`09the`20hassle`20of`20INSTALLing`20JOBLOG,`20creating`20logicals/directori
Ves,
X`09`09etc.,`20if`20all`20they`20want`20to`20do`20is`20log`20files.`20`20The`20
Vlog`20file`20is
X`09`09called`20JOBLOG.LOG`20and`20is`20created`20in`20the`20user's`20current
V`20dir-
X`09`09ectory.
X
X`09`09Put`20in`20a`20fix`20for`20SMP.`20`20This`20was`20borrowed`20from`20the
V`20SMP`20version
X`09`09of`20PHOTO.
X
X`09`09Remove`20the`20code`20for`20exact`20logging,`20leaving`20comments`20in
V`20place
X`09`09in`20case`20some`20brave`20soul`20decides`20to`20implement`20it.
X
X`20`20`20Version=01`09Level=03`0909/20/91`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09Tighten`20down`20on`20use`20of`20privs`20to`20close`20a`20
Vsecurity`20hole.
X
X`20`20`20Version=01`09Level=04`0906/04/92`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09Port`20to`20use`20FT`20driver.
X
X`20`20`20Version=01`09Level=05`0903/22/95`09Leonard`20J.`20Peirce
X
X`20`20`20Purpose:`09Make`20/TIME_STAMP`20work`20right.
X
X`09`09Port`20to`20run`20on`20OpenVMS`20on`20an`20AXP`20using`20DECC.`20`20Whew
V....
X
X`09`09Be`20smarter`20about`20handling`20a`20user's`20default`20privs.`20`20Mak
Ve
X`09`09sure`20they`20are`20enabled`20whenever`20we`20SETMODE`20the`20TTY`20to
V`20prevent
X`09`09any`20problems`20with`20setting/unsetting`20HANGUP.
X
X`09`09USE`20SYS$QIO()`20for`20SETMODEs`20with`20event`20flags`20instead`20of
X`09`09SYS$QIOW()'s.
X
X`09`09Add`20a`20new`20extended`20characteristics`20longword`20for`20SENSEMODE
V`20and
X`09`09SETMODE`20per`20FK's`20recommendation.
X
X`09`09Fix`20mailing`20of`20log`20files.`20`20The`20filename`20to`20use`20in`20
Vthe
X`09`09staging`20directory`20was`20barfing`20with`20SYS$FAO()`20so`20I`20just
X`09`09used`20sprintf()`20instead.
X
X`09`09SYS$FIND_HELD()`20now`20requires`20SYSPRV`20so`20now`20isn't`20turned
X`09`09off`20until`20the`20end`20of`20valid_recip().
X
X`20`20`20Arguments:`09See`20JOBLOG.HLP
X
X`20`20`20External`20variables:
X
X`09`09joblog_cld`09`09.CLD`20file`20for`20parsing
X`09`09JLG_*`09`09`09for`20JOBLOGMSG.MSG
X`09`09LIB$M_CLI_CTRLY`09`09for`20trapping`20control-Y
X
X`20`20`20External`20functions:
X
X`20`20`20`20`20`20`20`20`20`20Defined:`09none
X
X`20`20`20`20`20`20`20`20`20`20Called:`09cat,strins,strlu,strmcpy,str_post_trim
V,str_pref_trim
X
X`20`20`20Files`20accessed:`09files`20in`20staging`20area`20and`20secure`20area
V
X
X`20`20`20Logical`20names`20accessed:`09JOBLOG$LOG
X`09`09`09`09JOBLOG$STAGE
X
X`20`20`20Return`20codes:`09none
X
X`20`20`20Compiling`20instructions:`09See`20DESCRIP.MMS
X
X`20`20`20Linking`20instructions:`09See`20DESCRIP.MMS
X
X`20`20`20Other`20information:`09Privileges`20needed`20when`20INSTALLed:`20`20S
VYSPRV`20and
X`09`09`09CMKRNL.
X
X`09`09`09This`20version`20uses`20the`20new`20FT`20pseudo-terminal
X`09`09`09driver`20from`20DEC.`20`20If`20you`20are`20using`20a`20version`20of
X`09`09`09VMS`20that`20doesn't`20support`20the`20FT`20drivers`20and`20you
X`09`09`09would`20like`20to`20use`20JOBLOG`20get`20version`201.3.
X
X`09`09`09This`20program`20borrows`20some`20code`20and`20ideas`20from`20PHOTO,
V
X`09`09`09written`20by`20Asbed`20Bedrossian`20at`20the`20University`20of
X`09`09`09Southern`20California.
X
X`09`09`09Thanks`20to`20FK`20for`20his`20immeasurable`20patience`20and
X`09`09`09knowledge.`20`20Sorry`20it`20took`20so`20long`20to`20port`20to`20the
V
X`09`09`09FT`20driver......
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
X/*****************************************************************************
V*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20#`20
VI`20N`20C`20L`20U`20D`20E`20`20`20F`20I`20L`20E`20S`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*****************************************************************************
V*/
X
X#include`20file
X#include`20stat
X#include`20descrip
X#include`20rms
X#include`20rmsdef
X#include`20limits
X#include`20ssdef
X#include`20climsgdef
X#include`20jpidef
X#include`20ttdef
X#include`20tt2def
X#include`20prvdef
X#include`20prcdef
X#include`20dvidef
X#include`20iodef
X#include`20uaidef
X#include`20lnmdef
X#include`20libdef
X#include`20syidef
X#include`20ctype
X#include`20time
X#include`20sjcdef
X#include`20stdlib
X#include`20string
X#include`20unixio
X
X/*****************************************************************************
V*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20#`20D`20E`20F`20I`20N`20E`20S`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*****************************************************************************
V*/
X
X#define`20DEFAULT_PRINT_QUEUE`20"SYS$PRINT"
X
X#define`20STATUS_STR_MAX`20255`09`09/*`20max.`20length`20of`20SNDJBC`20status
V`20mess.`20*/
X#define`20COMMAND_MAX`20512`09`09`09/*`20max.`20length`20of`20command`20line
V`09`20`20`20`20`20`20*/
X#define`20ACCOUNT_MAX`2012`09`09`09/*`20max.`20length`20of`20account`20string
V`20`20`20`20`20`20*/
X#define`20FT_NAME_MAX`2064`09`09`09/*`20max.`20length`20of`20FT`20device`20nam
Ve`20`20`20`20`20`20*/
X#define`20PNAME_MAX`2015`09`09`09/*`20max.`20length`20of`20a`20process`20name
V`20`20`20`20`20`20*/
X#define`20USERNAME_MAX`2015`09`09`09/*`20max.`20length`20of`20a`20username`09
V`20`20`20`20`20`20*/
X#define`20QUEUE_MAX`2039
X#define`20CARRIAGE_RETURN`2013
X#define`20LINE_FEED`2010
X#define`20CONTROL_Z`2026
X#define`20TOGGLE_LOG`2028`09`09`09/*`20toggle`20logging`09`09`20`20`20`20`20
V`20*/
X#define`20TOGGLE_STAMP`2030`09`09`09/*`20toggle`20time`20stamping`09`09`20`20
V`20`20`20`20*/
X#define`20TIME_MAX`2050`09`09`09/*`20for`20full`20time`20string`09`09`20`20`20
V`20`20`20*/
X#define`20MAX_REC`201024`09`09`09/*`20max.`20length`20of`20log`20file`20record
V`20`20`20`20`20*/
X#define`20TT_BUF_MAX`20512`09`09`09/*`20max.`20length`20of`20read`20from`20TTY
V`09`20`20`20`20`20`20*/
X#define`20IN_BUF_MAX`204096`09`09`09/*`20max.`20length`20of`20read/write`20to
V`20file`20`20*/
X#define`20TEMPBUF_MAX`20512`09`09`09/*`20for`20formatting`20messages`09`20`20
V`20`20`20`20*/
X#define`20FT_DATA_MAX`20508`09`09`09/*`20one`20page`20-`20status`20longword`09
V`20`20`20`20`20`20*/
X#define`20TT_DATA_MAX`20FT_DATA_MAX
X#define`20XOFF`200x13
X#define`20XON`200x11
X#define`20BELL`200x7
X#define`20ON`201
X#define`20OFF`200
X#define`20TRUE`201
X#define`20FALSE`200
X#define`20CANCEL`203
X#define`20NO_INPUT`202
X#define`20SUCCESS`201
X#define`20FAILURE`200
X#define`20SECONDS_IN_DAY`2086400
X#define`20INT_STR_MAX`2015
X#define`20NUM_IO_BUFFERS`203
X#define`20PAGE_SIZE`200x200
X
X#define`20PTD$C_SEND_XON`09`090`09/*`20Pseudo`20Terminal`20Driver`20event`20
V`20`20`20`20`20`20*/
X#define`20PTD$C_SEND_BELL`09`091`09/*`20types.`20When`20these`20are`20in`20`20
V`20`20`20`20`20`20`20`20`20*/
X#define`20PTD$C_SEND_XOFF`20`092`09/*`20SYS$LIBRARY:VAXCDEF.TLB`20they`20`20
V`20`20`20`20`20*/
X#define`20PTD$C_STOP_OUTPUT`093`09/*`20should`20be`20removed`20from`20here.`09
V`20`20`20`20`20`20*/
X#define`20PTD$C_RESUME_OUTPUT`20`094
X#define`20PTD$C_CHAR_CHANGED`20`095
X#define`20PTD$C_ABORT_OUTPUT`20`096
X#define`20PTD$C_START_READ`20`097
X#define`20PTD$C_MIDDLE_READ`20`098
X#define`20PTD$C_END_READ`20`09`099
X#define`20PTD$C_ENABLE_READ`20`0910
X#define`20PTD$C_DISABLE_READ`20`0911
X#define`20PTD$C_MAX_EVENTS`20`0912
X
X/*****************************************************************************
V*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*`20`20`20`20`20`20`20`20`20`20S`20T`20R`20U`20C`20T`20U`20R`20E`20S`20,`20
V`20`20U`20N`20I`20O`20N`20S`20,`20`20`20T`20Y`20P`20E`20D`20E`20F`20S`20`20`20
V`20`20`20`20`20`20`20`20*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*****************************************************************************
V*/
X
X#pragma`20nomember_alignment
X
Xtypedef`09`20unsigned`20`20int`20`20`20UINT;`09`09/*`20for`20unsigned`20intege
Vrs`09`20`20`20`20`20`20*/
Xtypedef`09`20unsigned`20`20long`20`20ULONG;`09`09/*`20for`20unsigned`20long`20
Vintegers`09`20`20`20`20`20`20*/
Xtypedef`09`20unsigned`20`20short`20USHORT;`09/*`20for`20unsigned`20short`20int
Vegers`09`20`20`20`20`20`20*/
Xtypedef`09`20unsigned`20`20char`20`20UCHAR;`09`09/*`20for`20unsigned`20charact
Vers`09`20`20`20`20`20`20*/
Xtypedef`09`20unsigned`20`20char`20`20TINY;`09`09/*`20more`20descriptive`20for
V`20using`20un-`20`20`20`20`20*/
X`09`09`09`09`09/*`20characters`20as`20integers`09`20`20`20`20`20`20*/
X
Xtypedef`09`20struct`09`20`20ITM_TYPE`20`7B
X`09`20USHORT`09`20`20buf_len,
X`09`09`20`20itm_code;
X`09`20char`20`09`20`20*buf_addr;
X`09`20USHORT`09`20`20*ret_len;
X`7D`20ITM_LST;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20run-time`20and`20computed`20flags
V`09`20`20`20`20`20`20*/
X`09`20UCHAR`09`20`20expert,`09`09/*`20no`20welcome`20message`09`09`20`20`20`20
V`20`20*/
X`09`09`20`20exact,`09`09/*`20do`20exact`20logging?`09`09`20`20`20`20`20`20*/
X`09`09`20`20delete,`09`09/*`20deleting`20a`20log`20file?`09`09`20`20`20`20`20
V`20*/
X`09`09`20`20time_stamp,`09`09/*`20start`20with`20time-stamping`20enabled?`20
V`20*/
X`09`09`20`20retrieve,`09`09/*`20someone`20retrieving`20a`20log`20file?`20`20
V`20`20`20*/
X`09`09`20`20skim,`09`09`09/*`20set`20if`20/SKIMming`20old`20logs`09`20`20`20
V`20`20`20*/
X`09`09`20`20mail,`09`09`09/*`20set`20if`20/MAILing`20a`20log`20file`09`20`20
V`20`20`20`20*/
X`09`09`20`20save,`09`09`09/*`20set`20if`20/SAVEing`20a`20log`20file`09`20`20
V`20`20`20`20*/
X`09`09`20`20print,`09`09/*`20set`20if`20/PRINT`20specified`09`20`20`20`20`20
V`20*/
X`09`09`20`20verified;`09`09/*`20set`20if`20/VERIFIED`20specified`09`20`20`20
V`20`20`20*/
X`7D`20ARG_DEF;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20program`20flags`09`09`20`20`20`20
V`20`20*/
X`09`20UCHAR`09`20`20hangups,`09`09/*`20hangups`20enabled?`09`09`20`20`20`20`20
V`20*/
X`09`09`20`20logging,`09`09/*`20are`20we`20logging?`09`09`20`20`20`20`20`20*/
X`09`09`20`20time_stamp,`09`09/*`20are`20we`20time-stamping?`09`20`20`20`20`20
V`20*/
X`09`09`20`20verify,`09`09/*`20are`20we`20still`20verified?`09`20`20`20`20`20
V`20*/
X`09`09`20`20command;`09`09/*`20set`20if`20input`20from`20TTY`20is`20a`20comman
Vd`20*/
X`09`20char`09`20`20filename`5BNAM$C_MAXRSS+1`5D;`20/*`20logfile`20name`20witho
Vut`20dev/dir.`20`20*/
X`7D`20FLAG_DEF;
X
Xtypedef`09`20struct`09`20`20SENSE_TYPE`20`7B`09`09/*`20SENSEMODE`20structure
V`20for`20terminals`20`20*/
X`09`20UCHAR`09`20`20class,`09`09/*`20device`20class`09`09`09`20`20`20`20`20`20
V*/
X`09`09`20`20type;`09`09`09/*`20device`20type`09`09`09`20`20`20`20`20`20*/
X`09`20USHORT`09`20`20buf_size;`09`09/*`20buffer`20size`09`09`09`20`20`20`20`20
V`20*/
X`09`20UINT`09`20`20characts`20:`2024;`09/*`20terminal`20characteristics`09`20
V`20`20`20`20`20*/
X`09`20UCHAR`09`20`20page_len;`09`09/*`20page`20length`09`09`09`20`20`20`20`20
V`20*/
X`09`20ULONG`09`20`20ext_char,`09`09/*`20extended`20characteristics`09`20`20`20
V`20`20`20*/
X`09`09`20`20ext_char2;`09`09/*`20even`20more`20extended`20characteristics`20*/
V
X`7D`20SENS_DEF;
X
Xtypedef`09`20struct`09`20`20IO2_TYPE`20`7B`09`09/*`20SENSEMODE`20I/O`20status
V`20block`09`20`20`20`20`20`20*/
X`09`20USHORT`09`20`20status;`09`09/*`20status`20value`09`09`09`20`20`20`20`20
V`20*/
X`09`20UCHAR`09`20`20t_speed,`09`09/*`20transmit`20baud`20rate`09`09`20`20`20
V`20`20`20*/
X`09`09`20`20r_speed,`09`09/*`20receive`20baud`20rate`09`09`20`20`20`20`20`20*/
V
X`09`09`20`20cr_fill,`09`09/*`20CR`20fill`20count`09`09`20`20`20`20`20`20*/
X`09`09`20`20lf_fill,`09`09/*`20LF`20fill`20count`09`09`20`20`20`20`20`20*/
X`09`09`20`20parity,`09`09/*`20parity`20flags`09`09`09`20`20`20`20`20`20*/
X`09`09`20`20dummy;`09`09/*`20dummy`20padding`20variable`09`20`20`20`20`20`20*/
V
X`7D`20IO2_DEF;
X
Xtypedef`09`20struct`09`20`20ITEM_TYPE`20`7B`09`09/*`20message`20item`20type`09
V`09`20`20`20`20`20`20*/
X`09`20short`09`20`20size,`09`09`09/*`20item`20size`09`09`09`20`20`20`20`20`20*
V/
X`09`09`20`20code;`09`09`09/*`20item`20code`09`09`09`20`20`20`20`20`20*/
X`09`20char`09`20`20*ptr;`09`09`09/*`20variable-length`20message`09`20`20`20`20
V`20`20*/
X`7D`20ITEM_DEF;
X
Xtypedef`09`20struct`09`20`20IOSB_TYPE`20`7B`09`20`20`20`20`20`20`09/*`20I/O`20
Vstatus`20block`20type`09`20`20`20`20`20`20*/
X`09`20USHORT`09`20`20status,`09`09/*`20completion`20status`09`09`20`20`20`20
V`20`20*/
X`09`20`09`20`20count,`09`09/*`20byte`20count`09`09`09`20`20`20`20`20`20*/
X`09`09`20`20terminator,`09`09/*`20terminator`20character`09`09`20`20`20`20`20
V`20*/
X`09`09`20`20term_count;`09`09/*`20number`20of`20characters`20in`20terminator
V`20*/
X`7D`20IOSB_DEF;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20exit`20handler`20block`09`09`20
V`20`20`20`20`20*/
X`09`20ULONG`09`20`20forward_link;`09`09/*`20used`20by`20VMS`09`09`09`20`20`20
V`20`20`20*/
X`09`20void`09`20`20(*routine)();`09`09/*`20address`20of`20exit`20handler`20rou
Vtine`20`20`20`20*/
X`09`20UCHAR`09`20`20arg_count,`09`09/*`20argument`20count`09`09`20`20`20`20`20
V`20*/
X`09`09`20`20dummy`5B3`5D;`09`09/*`20must`20be`20zeros!`09`09`20`20`20`20`20`20
V*/
X`09`20ULONG`09`20`20*condition;`09`09/*`20address`20of`20condition`20value`09
V`20`20`20`20`20`20*/
X`7D`20EXH_DEF;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20holds`20ASCII/longword`20id`20pai
Vrs`20`20`20`20`20`20*/
X`09`20char`09`20`20*id_string;`09`09/*`20ASCII`20identifer`09`09`20`20`20`20
V`20`20*/
X`09`20ULONG`09`20`20id;`09`09`09/*`20integer`20identifier`20value`09`20`20`20
V`20`20`20*/
X`7D`20ID_DEF;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20terminator`20character`20mask`09
V`20`20`20`20`20`20*/
X`09`20USHORT`09`20`20size,
X`09`09`20`20unused;
X`09`20USHORT`09`20`20*ptr;
X`7D`20TERM_DEF;
X
Xtypedef`09`20struct`09`20`20`7B`09`09`09/*`20address_range`09`09`20`20`20`20
V`20`20*/
X`09`20char`09`20`20*start,`09`09/*`20start`20of`20a`20page`09`09`20`20`20`20
V`20`20*/
X`09`09`20`20*end;`09`09`09/*`20end`20of`20a`20page`09`09`20`20`20`20`20`20*/
X`7D`20ADDR_RAN;
X
Xtypedef`09`20struct`20`20`20`7B`09`09`09/*`20FT`20device`20I/O`20buffer`09`09
V`20`20`20`20`20`20*/
X`09`20USHORT`09`20`20status,`09`09/*`20I/O`20completion`20status`09`20`20`20
V`20`20`20*/
X`09`09`20`20count;`09`09/*`20number`20of`20bytes`20read/written`09`20`20`20`20
V`20`20*/
X`09`20UCHAR`09`20`20data`5BFT_DATA_MAX`5D;`09/*`20actual`20data`09`09`09`20`20
V`20`20`20`20*/
X`7D`20FT_BUF;
X
X/*****************************************************************************
V*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*`20`20`20E`20X`20T`20E`20R`20N`20A`20L`20`20`20D`20E`20F`20I`20N`20I`20T`20I
V`20O`20N`20S`20`20`20`26`20`20`20D`20E`20C`20L`20A`20R`20A`20T`20I`20O`20N`20S
V`20`20`20`20*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*****************************************************************************
V*/
X
X#ifdef`20__DECC
Xextern`09`20ULONG`09`20`20joblog_cld;
X
X#pragma`20extern_model`20save
X#pragma`20extern_model`20globalvalue
X
Xextern`09`09`20`20CLI$M_NOWAIT,
X`09`09`20`20JLG_NO_LOGICAL,
X`09`09`20`20JLG_NO_LOGFILE,
X`09`09`20`20JLG_NO_EXH,
X`09`09`20`20JLG_CANT_QUEUE,
X`09`09`20`20JLG_CANT_WRITE,
X`09`09`20`20JLG_INUSE,
X`09`09`20`20JLG_NO_SPAWN,
X`09`09`20`20JLG_CANT_CANCEL_IO,
X`09`09`20`20JLG_CANT_DELETE,
X`09`09`20`20JLG_CANT_DASSGN,
X`09`09`20`20JLG_CANT_RESET,
X`09`09`20`20JLG_CANT_DELETE_LOG,
X`09`09`20`20LIB$M_CLI_CTRLY;
X
X#pragma`20extern_model`20restore
X
X#else
X
Xglobalref`09`20`20joblog_cld;
X
Xglobalvalue`09`20`20CLI$M_NOWAIT,
X`09`09`20`20JLG_NO_LOGICAL,
X`09`09`20`20JLG_NO_LOGFILE,
X`09`09`20`20JLG_NO_EXH,
X`09`09`20`20JLG_CANT_QUEUE,
X`09`09`20`20JLG_CANT_WRITE,
X`09`09`20`20JLG_INUSE,
X`09`09`20`20JLG_NO_SPAWN,
X`09`09`20`20JLG_CANT_CANCEL_IO,
X`09`09`20`20JLG_CANT_DELETE,
X`09`09`20`20JLG_CANT_DASSGN,
X`09`09`20`20JLG_CANT_RESET,
X`09`09`20`20JLG_CANT_DELETE_LOG,
X`09`09`20`20LIB$M_CLI_CTRLY;
X
X#endif
X
Xextern`09`20char`09`20`20*mktemp(),
X`09`09`20`20*cat(),
X`09`09`20`20*strmcpy(),
X`09`09`20`20*str_post_trim(),
X`09`09`20`20*str_pref_trim();
X
Xextern`09`20ULONG`09`20`20CLI$DCL_PARSE(),
X`09`09`20`20CLI$GET_VALUE(),
X`09`09`20`20CLI$PRESENT(),
X`09`09`20`20LIB$DISABLE_CTRL(),
X`09`09`20`20LIB$ENABLE_CTRL(),
X`09`09`20`20LIB$FIND_FILE(),
X`09`09`20`20LIB$FIND_FILE_END(),
X`09`09`20`20LIB$FREE_EF(),
X`09`09`20`20LIB$GET_EF(),
X`09`09`20`20LIB$GET_FOREIGN(),
X`09`09`20`20LIB$GET_INPUT(),
X`09`09`20`20LIB$GETJPI(),
X`09`09`20`20LIB$SIGNAL(),
X`09`09`20`20LIB$SPAWN(),
X`09`09`20`20LIB$STOP(),
X`09`09`20`20PTD$CANCEL(),
X`09`09`20`20PTD$CREATE(),
X`09`09`20`20PTD$DELETE(),
X`09`09`20`20PTD$READ(),
X`09`09`20`20PTD$SET_EVENT_NOTIFICATION(),
X`09`09`20`20PTD$WRITE(),
X`09`09`20`20SYS$ASCTIM(),
X`09`09`20`20SYS$ASCTOID(),
X`09`09`20`20SYS$ASSIGN(),
X`09`09`20`20SYS$CANCEL(),
X`09`09`20`20SYS$CANEXH(),
X`09`09`20`20SYS$CLOSE(),
X`09`09`20`20SYS$CONNECT(),
X`09`09`20`20SYS$CREATE(),
X`09`09`20`20SYS$DASSGN(),
X`09`09`20`20SYS$DCLEXH(),
X`09`09`20`20SYS$EXIT(),
X`09`09`20`20SYS$EXPREG(),
X`09`09`20`20SYS$FAO(),
X`09`09`20`20SYS$FAOL(),
X`09`09`20`20SYS$FINISH_RDB(),
X`09`09`20`20SYS$FIND_HELD(),
X`09`09`20`20SYS$GETDVI(),
X`09`09`20`20SYS$GETJPI(),
X`09`09`20`20SYS$GETUAI(),
X`09`09`20`20SYS$QIO(),
X`09`09`20`20SYS$QIOW(),
X`09`09`20`20SYS$OPEN(),
X`09`09`20`20SYS$PUT(),
X`09`09`20`20SYS$READ(),
X`09`09`20`20SYS$SETIMR(),
X`09`09`20`20SYS$SETPRV(),
X`09`09`20`20SYS$SNDJBCW(),
X`09`09`20`20SYS$WAITFR(),
X`09`09`20`20SYS$TRNLNM(),
X`09`09`20`20SYS$WRITE();
X
Xextern`09`20long`09`20`20atol();
X
Xextern`09`20int`09`20`20delete(),
X`09`09`20`20strins(),
X`09`09`20`20strcmp(),
X`09`09`20`20getpid();
X
Xextern`09`20void`09`20`20strlu(),
X`09`09`20`20exit();
X
X/*****************************************************************************
V*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*`20`20`20`20`20S`20T`20A`20T`20I`20C`20`20`20D`20E`20F`20I`20N`20I`20T`20I
V`20O`20N`20S`20`20`20`26`20`20`20D`20E`20C`20L`20A`20R`20A`20T`20I`20O`20N`20S
V`20`20`20`20`20`20*/
X/*`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20*/
V
X/*****************************************************************************
V*/
X
Xstatic`09`20ULONG`09`20`20write_tt(short,char`20*,ULONG),
X`09`09`20`20get_file(char`20*,char`20*,struct`20FAB`20*,struct`20RAB`20*,
X`09`09`09`20`20`20struct`20XABPRO`20*,ARG_DEF`20*,FLAG_DEF`20*),
X`09`09`20`20copy_file(char`20*,char`20*,USHORT),
X`09`09`20`20print_log(char`20*,USHORT,UCHAR),
X`09`09`20`20retrieve_log(char`20*,ARG_DEF`20*,USHORT`20*),
X`09`09`20`20delete_mlog(char`20*,USHORT`20*),
X`09`09`20`20class_retrieve(char`20*,char`20*),
X`09`09`20`20user_retrieve(char`20*,char`20*),
X`09`09`20`20ctrlc_trap(void),
X`09`09`20`20ctrly_trap(USHORT),
X`09`09`20`20write_ft(USHORT,FT_BUF`20*),
X`09`09`20`20save_log(char`20*,USHORT),
X`09`09`20`20my_gets(USHORT,char`20*,char`20*,USHORT`20*,USHORT),
X`09`09`20`20mail_log(char`20*,char`20*,USHORT,UCHAR),
X`09`09`20`20tt_r_efn,
X`09`09`20`20ft_efn,
X`09`09`20`20wait_efn;
X
Xstatic`09`20long`09`20`20bintim`5B2`5D`20=`20`7B-5*10*100*100,-1`7D;
X
Xstatic`09`20USHORT`09`20`20ft_chan,`09`09/*`20channel`20to`20FT`20device`09`09
V`20`20`20`20`20`20*/
X`09`09`20`20tt_chan,`09`09/*`20channel`20to`20TTY`09`09`20`20`20`20`20`20*/
X`09`09`20`20disp_failed`20=`20FALSE,`09/*`20set`20if`20disposition`20of`20log
V`20fails`20`20`20`20*/
X`09`09`20`20clean_exit`20=`20FALSE,`09/*`20set`20if`20good`20exit`20of`20subpr
Vocess`20`20`20`20`20*/
X`09`09`20`20term_mask`5B8`5D`20=`20`7B0,0,0,0,0,0,0,0`7D,
X`09`09`20`20valid_recip(char`20*),
X`09`09`20`20delete_log(char`20*);
X
Xstatic`09`20void`09`20`20get_args(ARG_DEF`20*),
X`09`09`20`20get_channels(USHORT`20*,USHORT`20*,ADDR_RAN`20*),
X`09`09`20`20ft_ast(void),
X`09`09`20`20log_session(USHORT,USHORT),
X`09`09`20`20write_log(char`20*,USHORT,struct`20RAB`20*,FLAG_DEF`20*),
X`09`09`20`20ask_disposition(char`20*,char`20*,FLAG_DEF`20*,ARG_DEF`20*),
X`09`09`20`20welcome(ARG_DEF`20*),
X`09`09`20`20ctrlc_ast(void),
X`09`09`20`20ctrly_ast(void),
X`09`09`20`20skim(char`20*),
X`09`09`20`20squeeze_str(register`20char`20*),
X`09`09`20`20quit(void),
X`09`09`20`20quit2(void),
X`09`09`20`20subprocess_exit(void),
X`09`09`20`20spawn(ULONG`20*),
X`09`09`20`20parse_filename(char`20*,char`20*,char`20*,USHORT`20*),
X`09`09`20`20warn(char`20*,UINT,int,int,int),
X`09`09`20`20dev_chg_ast(void),
X`09`09`20`20get_logicals(char`20*,char`20*),
X`09`09`20`20my_puts(char`20*),
X`09`09`20`20joblog_check(void),
X`09`09`20`20xon_ast(void),
X`09`09`20`20xoff_ast(void),
X`09`09`20`20bell_ast(void),
X`09`09`20`20kill_log(void);
X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
Xstatic`09`20char`09`20`20ftname`5BFT_NAME_MAX+1`5D,/*`20name`20of`20FT`20devic
Ve`09`09`20`20`20`20`20`20*/
X`09`09`20`20stamp_buf`5BTIME_MAX+3`5D,`20/*`20for`20holding`20time`20stamp`20s
Vtring`20`20`20`20`20*/
X`09`09`20`20logfile`5BNAM$C_MAXRSS`5D,`20/*`20log`20file`20name`09`09`20`20`20
V`20`20`20*/
X`09`09`20`20log_dir`5BNAM$C_MAXRSS`5D,`20/*`20where`20log`20files`20are`20crea
Vted`09`20`20`20`20`20`20*/
+-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-

0 new messages