From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CUNYVM.CUNY.EDU::VMSSERV%FHCRCVAX.BITNET"  9-OCT-1989 17:23
To:	MRGATE::"ARISIA::EVERHART"
Subj:	VMSSERV_ROOT:[FILES]VERB.2_OF_2;1

Message-Id:  <8910091719.AA18499@crdgw1.ge.com>
Received: from UWAVM.ACS.WASHINGTON.EDU by UWAVM.ACS.WASHINGTON.EDU (IBM VM SMTP R1.2) with BSMTP id 1408; Mon, 09 Oct 89 10:13:38 PDT
Received: from FHCRCVAX.BITNET (VMSSERV) by UWAVM.ACS.WASHINGTON.EDU (Mailer
 R2.03B) with BSMTP id 4572; Mon, 09 Oct 89 10:13:29 PDT
Date: Fri, 6 Oct 89 11:09 PST
From: VMSSERV%FHCRCVAX.BITNET@UWAVM.ACS.WASHINGTON.EDU
Subject: VMSSERV_ROOT:[FILES]VERB.2_OF_2;1
To: everhart@arisia.decnet
X-Vms-To: IN%"everhart%arisia.decnet@crdgw1.ge.com"

+-+-+-+ Beginning of part 2 +-+-+-+
X_verb:`009movzbl`009(r7),r2`009; save size of entire thing
X`009movzbl`0091(r7),r3`009; save size of verb name
X_verb1:`009incl`009r7`009; point to first ascic
X`009add_ascic_trunc`009r7,r3
X`009decl`009r2`009; subtract off extra byte for count byte
X
X`009movzbl`009(r7),r4`009; assume verb bigger than synonym
X`009cmpb`009(r7),r3`009; is synonym bigger than verb?
X`009bleq`009_verb2
X`009movzbl`009r3,r4`009; if so it got truncated by CDU
X`009add_string`009<' (synonym truncated)'>
X_verb2:`009subb`009r4,r2`009; subtract off printed portion.
X`009beql`009_verb3
X
X`009addl`009r4,r7
X`009tstb`0091(r7)
X`009beql`009_verb1`009; if zero length string , skip to next.
X`009add_string`009<' , '>
X`009brb`009_verb1
X_verb3:`009brb`009_continue
X
X_syntax:
X`009add_string`009<'(syntax) '>
X`009add_ascic`009r7
X
X_continue:
X`009calls`009#0,put_output
X
X`009ret
X
X`009.entry`009clex_get_verb_name,`094m<r2,r3,r4,r5,r6,r7>
X`009; 4(ap) = address of command block
X
X`009movl`0094(ap),r6
X`009movzwl`009cmd_w_name(r6),r7
X`009addl`009r6,r7
X`009case`009cmd_b_subtype(r6),type=b,limit=#1,<-
X`009`009_get_verb>
X`009movl`009#0,r0`009; invalid
X`009ret
X
X_get_verb:
X`009movzbl`009(r7),r2`009; save size of entire thing
X`009movzbl`0091(r7),r3`009; save size of verb name
X`009incl`009r7`009; point to first ascic
X`009add_ascic_trunc`009r7,r3
X
X`009pushaq`009_clex_desc
X`009pushl`0098(ap)
X`009calls`009#2,g`094str$copy_dx
X`009movl`009_clex_pos,@12(ap)
X`009clrl`009_clex_pos
X
X`009ret
X
X`009.end
$ GOSUB UNPACK_FILE

$ FILE_IS = "MAKEFILE."
$ CHECKSUM_IS = 1567253869
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
XFORTRAN =
XLINK =
XMACRO =
X
XMACROMOD1 = Buffer Evalentity Find Get_term
X# these modules have no dependency on clexlib.mlb
X
XMACROMOD2 = Command Disallows Entity Findentity Init List Type
X# these modules depend on clexlib.mlb
X
Xall : verb.hlp verb.exe
X
Xverb.hlp : verb.rnh
X`009runoff $*.rnh
X
Xverb.exe: verb.obj $(MACROMOD1).obj $(MACROMOD2).obj
V`009link/notrace$(LINK) $?, Sys\$system:sys.stb/sel,Sys\$system:dcldef.stb/se
Xl
X
Xclexlib.mlb: clexlib.mar
X`009Library/macro/create clexlib clexlib
X
Xverb.obj: $*.for
X`009fortran$(FORTRAN) verb
X
X$(MACROMOD1).obj: $*.mar
X`009macro$(MACRO) $*
X
X$(MACROMOD2).obj: $*.mar clexlib.mlb
X`009macro$(MACRO) $*
$ GOSUB UNPACK_FILE

$ FILE_IS = "TEST.BAS"
$ CHECKSUM_IS = 1093037651
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X10`009external long function smg$$ab_defkey_cld
X`009end
$ GOSUB UNPACK_FILE

$ FILE_IS = "TEST.COM"
$ CHECKSUM_IS = 190603144
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X$ !basic test
X$ link/share test/opt
X$ define test$image sys$disk:[]test
X$ verb/image=test$image/symbol=smg$$ab_defkey_cld *
$ GOSUB UNPACK_FILE

$ FILE_IS = "TEST.OPT"
$ CHECKSUM_IS = 1563514906
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
Xtest.obj
XUNIVERSAL=SMG$$AB_DEFKEY_CLD
$ GOSUB UNPACK_FILE

$ FILE_IS = "TYPE.MAR"
$ CHECKSUM_IS = 875250241
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X`009.title print type block
X
X; VERB Version 1.0 June 1st, 1985
X; Written  by Joe Meadows Jr.,  with thanks  to the
X; Fred Hutchinson Cancer Research Center for kindly
X; allowing  me to  use  their  computing  resources.
X;
X; If  you  have any  questions, comments, ideas, or
X; whatever, feel free to contact me via US Mail :
X;`009Joe Meadows Jr.
X;`0094841 268th Ave. N.E.
X;`009Redmond Wa. 98052
X; or via phone : (206) 827-7296
X
X`009.library 'clexlib'
X
X`009.entry`009clex_print_type,`094m<r2,r3>
X`009; 4(ap) = address of type block
X
X`009movl`0094(ap),r2
X
X`009movzwl`009type_w_name(r2),r3
X`009addl`009r2,r3
X`009add_string`009<'define type '>
X`009add_ascic`009r3
X`009calls`009#0,g`094put_output
X
X`009movzwl`009type_w_prefix(r2),r3
X`009beql`009type_1
X
X`009addl`009r2,r3
X`009add_string`009<'   prefix '>
X`009add_ascic`009r3
X`009calls`009#0,g`094put_output
X
Xtype_1:`009addl3`009clex_table,type_l_keywords(r2),-(sp)
X`009calls`009#1,clex_print_entity
X
X`009ret
X`009.end
$ GOSUB UNPACK_FILE

$ FILE_IS = "VERB.CLD"
$ CHECKSUM_IS = 1997370466
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
V!*************************************VERB***********************************
X***
Xdefine verb VERB
X   image EXE$DIR:VERB
X   parameter P1 , label=VERB , prompt="Verb"
X      value (list)
X   qualifier ALL
X      nonnegatable
X   qualifier PROCESS
X      nonnegatable
X   qualifier TABLE
X      nonnegatable
X      value (default="SYS$SHARE:DCLTABLES",type=$infile)
X   qualifier OUTPUT
X      nonnegatable
X      value (type=$outfile)
X   qualifier WIDTH
X      nonnegatable
X      value (required,type=$number)
X   qualifier IMAGE
X      nonnegatable
X      value (required,type=$infile)
X   qualifier SYMBOL
X      nonnegatable
X      value (required)
X   qualifier LIST
X      nonnegatable
X   disallow TABLE and PROCESS
X   disallow TABLE and IMAGE
X   disallow PROCESS and IMAGE
$ GOSUB UNPACK_FILE

$ FILE_IS = "VERB.FOR"
$ CHECKSUM_IS = 1262006485
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X`009program verb_extractor
X
X`009! VERB Version 1.0 June 1st, 1985
X`009! Written  by Joe Meadows Jr.,  with thanks  to the
X`009! Fred Hutchinson Cancer Research Center for kindly
X`009! allowing  me to  use  their  computing  resources.
X`009!
X`009! If  you  have any  questions, comments, ideas, or
X`009! whatever, feel free to contact me via US Mail :
X`009!`009Joe Meadows Jr.
X`009!`0094841 268th Ave. N.E.
X`009!`009Redmond Wa. 98052
X`009! or via phone : (206) 827-7296
X
X`009implicit integer (a-z)
X`009character buffer*80,comment*132,verb*32,symbol*80
X`009logical all,out,list, found, anyfound, openfile
X`009external lib$put_output,output,lib$find_image_symbol
X`009byte term_char(8)
X`009integer*2 term_width
X`009equivalence (term_char(3),term_width)
X
X`009integer cli$_entnf/'38934'x/
X
X`009comment=
X`0091  '!***************************************'
X`0091//'****************************************'
X`0091//'****************************************'
X`0091//'************'`009! I just love a huge comment...
X
X`009! let user specifywidth of output stream (for the heck of it, okay?)
X`009if (cli$present('width')) then
X`009 call error(cli$get_value('width',buffer,buff_len))
X`009 call error(ots$cvt_ti_l(buffer(:buff_len),width))
X`009else
X`009 i=get_terminal_characteristics('SYS$INPUT',term_char)
X`009 if (.not.i) term_width=132
X`009 width=term_width`009! default to screen width for the heck of it
X`009end if
X
X`009! just want a listng of the verbs?
X`009list=cli$present('list')
X
X`009! use file or actual process mapped version?
X`009if (cli$present('table')) then
X`009 call error(cli$get_value('Table',buffer,buff_len))
X`009 call error(clex_use_command_table(buffer(:buff_len)))
X`009elseif (cli$present('image')) then
X`009 ! is there an image spec?
X`009 call error(cli$get_value('Image',buffer,buff_len))
X`009 call error(cli$get_value('Symbol',symbol,symb_len))
X`009 call error(lib$find_image_symbol(buffer(:buff_len)
X`0091`009`009`009`009 ,symbol(:symb_len)
X`0092`009`009`009`009 ,tableaddr))
X`009 call clex_use_image(tableaddr)
X`009else
X`009 call clex_use_process_table
X`009end if
X
X
X`009! is output going to a file?
X`009if (cli$present('output')) then
X`009 call cli$get_value('output',buffer,buff_len)
X`009 openfile=.true. ! wait till we've found a verb before opening file
X`009 call clex_init_output(output,width)
X`009 out=.true.
X`009else
X`009 call clex_init_output(lib$put_output,width)
X`009end if
X
X`009anyfound=.false.
X
X`009! they want all the verbs?
X`009if (cli$present('all')) then
X`009 verb='*'
X`009 verb_len=1
X`009 goto 15
X`009end if
X
X`009! get the next verb down the line
X10`009i=cli$get_value('Verb',verb,verb_len)`009
X`009if (.not.i) then
X`009 if (anyfound) then
X`009  call exit
X`009 else
X`009  call exit(cli$_entnf)
X`009 end if
X`009end if
X
X`009call str$upcase(verb(:verb_len),verb(:verb_len))
X15`009j=0
X
X`009! locate the little bugger
X`009found = .false.
X20`009i=clex_find_verb(verb(:verb_len),j,cmd_block)
X`009if (.not.i) then
X`009 if (found) then
X`009  goto 10
X`009 else
X`009  call lib$signal(%val(cli$_entnf-4))
X`009  goto 10
X`009 end if
X`009end if
X`009anyfound=.true.
X`009found=.true.
X`009if (openfile) then ! we need to open the output file
X`009 if (buff_len.eq.0)
X`0091  call clex_get_verb_name(%val(cmd_block),buffer,buff_len)
X`009 open(file=buffer(:buff_len),err=30,unit=1,status='new'
X`0091`009,defaultfile='.CLD',carriagecontrol='list')
X`009 openfile=.false.
X`009end if
X
X`009! get ready to output the verb
X`009if (list) then
X`009 i=clex_print_verb(%val(cmd_block))
X`009else
X`009 call clex_get_verb_name(%val(cmd_block),buffer,buff_len)
X`009 i=min(width,132)
X`009 k=i/2-buff_len/2
X`009 if (k.lt.1) k=1
X`009 i=max(i-buff_len,0)`009! center verb name in middle of comment
X`009 if (out) then
X`009  call output
X`0091`009(comment(:k)//buffer(:buff_len)//comment(k+1:i))
X`009 else
X`009  call lib$put_output
X`0091`009(comment(:k)//buffer(:buff_len)//comment(k+1:i))
X`009 end if
X
X`009 ! okay, here it is
X`009 i=clex_print_command(%val(cmd_block))
X`009end if
X
X`009j=j+1`009! continue search with next verb
X`009goto 20
X
X30`009end
X
X`009subroutine error(i)
X`009if (.not.i) call exit(i)
X`009return
X`009end
X
X`009integer function output (a)
X`009character*(*) a
X`009output=0
X`009write(1,'(a)',err=10) a
X`009output=1
X10`009return
X`009end
$ GOSUB UNPACK_FILE

$ FILE_IS = "VERB.RNH"
$ CHECKSUM_IS = 1124200914
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X.rm 75
X.lm 0
X1 VERB
X.lm 1
XVERB is a program to extract verb definitions from either
Xyour process space or a command table file (such as SYS$SHARE:DCLTABLES.EXE).
XThese verb definitions can then be changed and recompiled via the command
Xdefinition utility, SET COMMAND. This program is similar to the 3.n program
XCLEX, except that it works with version 4.n command tables. This program
Xis a must if you need to change verb definitions, or if you just hate the
XDEC defaults (getting tired of HELP/PAGE, or LINK creating maps when
Xexecuted from a batch job?).
X.blank
X.! Note, you will probably want to edit the following lines to
X.! reflect local conditions....
XTo use VERB, type SET COMMAND VERB or add this command to your
Xlogin.com file.
X.break
X.lm 0
X2 Parameters
X.lm 1
XVERB allows you to do wildcard searches for verbs (commands)
Xand lists of verbs, such as VERB A*,B*,%%% (which would return all the verb
Vdefinitions for commands that start with A, B, and all three letter commands)
X.
X.break
X.lm 0
X2 /ALL
X.lm 1
XVERB /ALL will list the entire CLD for every command in your process table.
X.break
X.lm 0
X2 /LIST
X.lm 1
X VERB also can list available verbs (commands), without
Xthe verb definition, as in VERB /LIST /ALL, and note the /ALL qualifier.
X.break
X.lm 0
X2 /OUTPUT
X.lm 1
XVERB allows you to put the output in a file, as in
XVERB /OUTPUT=filename.
X.break
X.lm 0
X2 /PROCESS
X.lm 1
XVERB /PROCESS 'command' defaults to searching your process space.
X.break
X.lm 0
X2 /WIDTH
X.lm 1
XThis qualifier tell VERB how wide your terminal screen is.  /WIDTH=80 is
Xthe default.
X.break
X.lm 0
X2 /TABLE
X.lm 1
XYou can specify a table to search for the verb, or even to search your
Vprocess space. The command defaults to searching your process space, but if y
Xou
Xenter VERB /TABLE it will default to using the system command table
XSYS$SHARE:DCLTABLES, you can of course specify a table other than that, as in
XVERB /TABLE=MY__OWN__TABLE, note that it uses SYS$SHARE:DCLTABLES.EXE as the
Xdefault file name in an RMS $OPEN call.
X.break
X.lm 0
X2 /IMAGE
X.lm 1
XYou can specify an image to load, to search command tables defined
Xwithin a shareable image. You must use the /SYMBOL qualifier
Xwith this qualifier. The image wil be loaded via LIB$FIND__IMAGE__SYMBOL
Xso all restrictions for that routine apply.
X.break
X.lm 0
X2 /SYMBOL
X.lm 1
XYou can specify a symbol name which points to a command table within
Xa shareable image. An example using a basic program follows:
X.lit
X`00910`009external long function smg$$ab_defkey_cld
X`009`009! This simply defines the symbol smg$$ab_defkey_cld
X`009`009! which is used internally, if you had your own
X`009`009! command tables internal to the program, you
X`009`009! could use it here.. But then, you probably wouldn't
X`009`009! need to. This feature obviously has limited use...
X`009`009end
X.end lit
Xto be compiled like:
X.lit
X`009$ basic test
X`009$ link/share sys$input/opt
X`009`009test.obj
X`009`009UNIVERSAL=SMG$$AB_DEFKEY_CLD
X`009$ define test$image sys$disk:[]test
X`009$ verb/image=test$image/symbol=smg$$ab_defkey_cld *
X.end lit
X.break
X.lm 0
X2 restrictions
X.lm 1
XWell, it hasn't been tested with MCR tables.I wouldn't be surprised if
Xit didn't like them.
X.blank
XWhen extracting several verbs at a time the verbs may reference common
VTYPE defnitions, in these cases only one is output, this only becomes a probl
Xem
Xif you cut up the output file into several smaller files.
X.blank
XWhen extracting several verbs (such as BASIC,MACRO,FORTRAN) they
Xmay each reference a TYPE defnition that is different for each verb, but has
Vthe same name. Since the TYPE definitions are actually different each one wil
Xl
Xbe included in the file, but the CDU will not appreciate having similarly
Xnamed TYPE definitions. In such cases simply extact the verbs into seperate
Xfiles.
X.break
X.lm 0
X2 author
X.lm 1
XIf  you  have any  questions, comments, ideas, or
Xwhatever, feel free to contact me.
X.blank
X.i+5;Joe Meadows Jr.
X.i+5;VAX/VMS System Manager / guru in training
X.i+5;Fred Hutchinson Cancer Research Center
X.i+5;1124 Columbia St.
X.i+5;Seattle Wa. 98104
X.i+5;bitnet - JOE@FHCRCVAX
X.i+5;arpa   - JOE%FHCRCVAX.BITNET@OLY.ACS.WASHINGTON.EDU
X.i+5;voice  - (206) 467-4970
X.break
$ GOSUB UNPACK_FILE
$ EXIT
-+-+-+-+-+ End of part 2 +-+-+-+-+-
