$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))' $! $! This archive created by VMS_SHARE Version 8.2A $! On 10-FEB-1993 18:17:41.61 By user UDAA055 $! $! The VMS_SHARE software that created this archive $! was written by Andy Harper, Kings College London UK $! -- December 1992 $! $! Credit is due to these people for their original ideas: $! James Gray, Michael Bednarek $! $!+ THIS PACKAGE DISTRIBUTED IN 3 PARTS, TO KEEP EACH PART $! BELOW 30 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. [.VMS-BACKUP]MAKEFILE.;1 $! 2. [.VMS-BACKUP]MATCH.C;1 $! 3. [.VMS-BACKUP]README.;1 $! 4. [.VMS-BACKUP]SHARFILE.HEADERS;1 $! 5. [.VMS-BACKUP]VMSBACKUP.1;1 $! 6. [.VMS-BACKUP]VMSBACKUP.C;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID")) $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=filename, P2=checksum, P3=attributes $ 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 file ", P1 $ 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 '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 LOOP EXITIF MARK(NONE)=END_OF(b);EXITIF INDEX(ERASE_LINE, "-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE COPY_PREVIOUS(b,n)LOCAL m, s,e;m:=MARK(NONE);MOVE_HORIZONTAL(-b);s:=MARK(NONE);MOVE_HORIZONTAL(n-1);e:= MARK(NONE);POSITION(m);COPY_TEXT(CREATE_RANGE(s,e));ENDPROCEDURE; PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;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 '`' ['\']: b:=GetHex(s,p); n:=GetHex(s,p+2); p:=p+4; COPY_PREVIOUS(b,n);['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1; [INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE; PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=END_OF(b); 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");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,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 &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# X# XREMOTE=-DREMOTE`09`09`09#`20-\0D07`20`20use`20remote`20tape XSWAP=`09\2507SWAP`20swap`20bytes XCFLAGS=`20$(SWAP)`20$(\4706) XLFLAGS= XLIBS=`20-lrmt`20`20`20\4705\5E07magtape`20library XOWNER=tar\2505user`20for`20\8C0B`20access XMODE=4755 XBINDIR=/usr/local/bin XMANSEC=l XMAN\1F09man/man$(\1E06) X X# Xvmsbackup:`20\0B09.o`20getopt.o`20match.o X`09cc`20$(\D306)`20-o\2E0A\380D\2F07\400A$(LIBS) Xinstall: X`09\0A07`20-m`20$(MODE\4F05$(OWNER)`20-s`20\5B0A$(\DF06)`09 X`09c\6A0C1`20$(MANDIR)/v\1609\DA0Aclean: X`09rm`20-f`20\510A*.o`20core Xshar: X`09shar`20-a`20README\610DMakefile\150Bc`20\E006c`20`5C X`09`20`20`20`20>\1D0Bshar $ call unpack [.VMS-BACKUP]MAKEFILE.;1 - 1277656802 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" $! $ create 'f' X#include`20 X#\130Ays/types.h> X X#define`20ASTERISK`20'*'`09`09/*`20The`20'*'`20metacharacter`20*/ X\3208QUESTION`20'?'\320A?'\321ALEFT_BRACKET`20'`5B'\3509`5B'\351ARIGH\360B`5D' V\3609`5D'\3612\3709IS_OCTAL(ch)`20(ch`20>=`20'0'`20`26`26`20ch`20<=`20'7') X Xtypedef`20int`20BOOLEAN; X\4408VOID`20void X\1208TRUE`201\0F09FALSE`200 X\1008EOS`20'`5C000' X Xstatic\5508`20do_list`20();\1B08char`20nextch`20\170B\7605list_parse\1B05 X`0C X/* X`20*`20`20FUNCTION X`20* X`20*`09match`09test`20string`20for`20wildcard`20match\2B06`20`20SYNOPSIS\3B07 V\9A08match`20(\3F06,`20pattern)\2304register\AB06*string; X\1A12\3507\1B04\6B05DESCRIPT\A90ATe\A30E\7606us\1004\3E07.`20`20The\0E08`20may V X\3903contain`20the`20normal`20shell`20metacharacters`20\5504\3B07\3704matching V\5507'*'`20\2D09\7D06es`20any\9407, X\3403includ\9204\6D05ull`20string\4508?'\4512\3904\4805ingle\200A\3403A`20li V\F603of\160As`20enclosed\7106`20'`5B'`20and`20'`5D'`20\970C\680A\FC07list. X\3503If\1005first`20\270Afollow\BD08beginn\0E04'`5B'\6B05s`20a`20'!'\1E04n`20 V\620Enot`20\660B`20is`20\8B06d. X`20* X`20*/ X X`0C X/\0A04`20`20PSEUDO`20CODE X\1D05`09Begin\3206\0F04`20`20`20`20Switch`20on`20type`20of`20pattern`20\7609 V\2B04`09Case`20ASTERISK: X\1304\3F04Attempt`20to\5706`20asterisk X\2208Brea\0E06\4305QUESTION`20MAR\481Cquestion`20mark\4D18EOS:\1C09Ma\3804is V`20result`20of`20EOS\DA04string`20test\4A18default\4E0AIf`20explicit`20\9206th Ven\1F05`09M\6A12submatch\4009Else\2E0FFALSE X\2109nd`20if X\9011\1C08swit\5006\1204Return\710B\9407\D307\3104\8008 X`20*/ X XBOOLEAN\2807(string,`20pattern) Xregister`20char`20*string; X\170F\2F07; X`7B X\8604\1E09\5E08ismatch; X\1F05\0E07`20=\EB06; X\1504\C806`20(\4C08)`20`7B X`09case`20ASTERISK: X\E305\2007++; X\1005do\2A04`09i\5509\CB17\2F07`7D`20while`20(!\3208`26`26\D808++`20!=`20EOS) V\2D07break;\8807QUESTION\8807if`20(*\3806\3608\8916++\8B08++\8D10\6713EOS V\6213==\6214TRUE\4B1BLEFT_BRACKET\B629do_list`20(s\B607\B41Edefault:\5F11++ V\B504*p\3E06++\6810\0806\6619`20else`20\330EFALS\F016\1206\0604return`20( V\3607); X`7D X X`0C X/* X`20*`20`20FUNCTION X`20* X`20*`09d\EC07\3803process`20a`20\1205and`20following`20sub\A806\3806`20`20SYNO VPSIS\4807static`20BOOLEAN`20d\5707\DD11\2C04register`20char`20*string; X`20\1A11\3507\1B04\7405DESCRIPT\BF0ACalled`20when`20\B807is`20found`20in`20the V\7A08.`20`20Returns\3804TRUE`20if`20\2104current`20charac\7E04matches`20\1E04 V\5405and X\3603\1004remaining`20sub\BB06\300D\200A\7908\AB07\7E07`20FALSE\7C04either`20 V\8316fails`20to X\3A03match\8D0Aor\0C0A\7A08but`20\7E0D\3804\A10Aand\AF04\9207's`20don't\9A07 V`20`20RESTRICTIONS\AE07The`20mechanism`20used`20to\6F06\A60As`20in`20an`20incl Vusive X\3A03pair`20(I.E.`20`5Ba-d`5D)`20may`20not`20be`20portable`20\4D05chines\3504 V\4803whic\E606native\670A`20set`20is`20\4404ASCII.\A50Brules`20implemented`20h Vere`20are: X\2606`09(1)\2B05backslas\C20B\9C05be\2705`09u\E607quote`20any`20special\300A V\7A04\2A03\DE05`20"`5C`5D"`20and`20"`5C-"\3004wh\7B04in`20list, X\2B05or\1F03!"`20at`20start`20of\1F05\C408`09(2)\9E05sequence`20`5Cnnn`20becom Ves`20the`20\7E09\5206given`20by`20\2804(in`20octal)\510A3)`09Any`20non-escaped V`20'`5D'`20mark\5106end`20\87114)`09A\1305`20beginning`20with\3205special`20 V\8B0F'!\5704tches`20any`20\1F09`20NOT`20in`20\6308\2C03\E404\3004\240Ais`20onl Vy`20\5D08if`20it X\2D05is`20\7704first`20\320Bn`20\1704\B90B/ X X`0C X/\0A04`20`20PSEUDO`20CODE X\D606Begin`20do_list\1104`20`20`20`20Default`20result`20is`20no\C606\2208Skip V`20over`20\6E04opening`20left`20bracke\4C09If\2305next`20pattern`20\E10Da`20 V\F404then X\D904List`20match`20gives`20FALSE\1B05\750E\3604\4909\6E08Else\4716TRUE\2609nd V`20if X\0E07While`20not`20at`20clos\CB04\C607`20or`20EOS X\5304Get`20lower`20and`20upper`20bounds\1F05If`20\D80Bn`20\1B06\D90A\6B04Resul Vt\F604same`20as`20sense`20flag.\2609\E80Arest`20of`20list\1F05\BA0E\0E04while V\1108If`20\F406found\7C0AIf`20\E007end`20of`20pattern`20\9E0DCall\4007with V\7E09\2D07\8117\0E0AReturn`20\4206result\1B04\2504do_l\C406 X`20*/ X Xstatic`20BOOLEAN`20\1F07`20(string,`20\7307) Xregister`20char`20*string; X\0E06\2607; X`7B X\8004\2C09\5708ismatch; X\1E16f_found;\1F19not_\230Bauto\8806lower;\150Fupper; X\1605\9A07++\2506if`20(\AE08`20==`20'!')`20`7B X`09\8308`20=`20FALSE; X\1304\7709\1703TRUE; X`09\500F`7D`20else\420F\2B07\410F\5807\3605\8C06smatch\1B03\E212while`20\AB0A! V=`20'`5D'`20`26`26`20\130CEOS)\7C04list_parse`20(`26\2007,`20`26lower\0803uppe Vr)\9205`20(*string`20>=`20lower\5405\1407<=`20upper)\5504\A311\9F07\1905\A02C V\1107++;`7D X`09\FB06\0606\8F05\1E09\4407\7C05fprintf`20(stderr,`20"warning`20-`20character V`20class`20error`5Cn"); X\5B05`20else`20\4503\5F04\C107\D113\0806(++string,`20\8907); X\A50Dreturn`20\4A09; X`7D X X`0C X/* X`20*`20`20FUNCTION X`20* X`20*`09list_parse`20\3B03\0906part`20of`20list`20into`20lower`20and`20upper V`20bounds\4306`20`20SYNOPSIS\5307static`20VOID`20\5F0B(patp,\4B04p,`20highp) V\2E04char`20**patp; X\1009lowp\0F0Bhighp\1004\7005DESCRIPT\C60AGiven`20pointer`20to`20a`20patter V\150A(patp),\250B\3904a`20place\3304store`20\EA06bound`20(lowp),`20\F804\5C0C V\3904\370Fuppe\3709\DD06,`20parses`20part`20of\3604the`20list,`20updating`20t V\1303\AC10in\1706rocess. X\E506For`20list`20characters`20which`20are`20not`20\6A07\FE03range,\7309\D505 V\C704\A80Bs`20\3704set`20to`20that\580A\7207/ X Xstatic`20VOID\7C05_parse`20(patp,\5804p,`20\EF06 Xchar`20**patp; X\0D06lowp\0C08highp; X`7B X`20`20`20`20*lowp`20=`20nextch`20(patp);\1B05if`20(\4606`20==`20'-')`20`7B X`09(*patp)++; X`09*highp\3E16`7D`20else`20\3203\2609\8607\1E05 X`7D X X`0C X/* X`20*`20`20FUNCTION\ED06`09nextch`09`20`20determine\6105`20character`20in`20a V`20pattern X\3505`20`20SYNOPSIS\4507static\3405\9F0E\1D04\1605\DC06; X`20\4006DESCRIPT\880AGiven`20poin\7404to\7404\0D0D\8106,`20uses`20the\930B`09p V\2A0A\C70A\2404\CB12\3A0B, X\BB04ubject\3B04translation`20of`20backslash-c\C204and`20\130Aoctal X\4004equences. X\C906The`20\720A\9A08is`20updated\6A04point`20at`20t\A408\CD0B\3D0Ato`20be`20p Vrocessed.\6206/ X Xstatic`20\9805nextch`20(patp) Xc\1304**patp; X`7B X`20`20`20`20register`20\1C05ch; X\1614sum;\190E\A304count; X X\1904ch`20=`20*(*patp)++;\1505if`20(\1904=`20'`5C`5C')`20`7B X`09ch\280F`09if`20(IS_OCTAL\2F04))\2804\5406sum\2F030;\1006for`20(count\1505 V\8006`20<`203`20`26`26`20\430D\1C07++\4C05`09ch\4904*=`208; X`09\0E07+=\B404-`20'0';\1505\9810\7204`7D X\0705\1707--\1707\2D05chsum; X`09`7D X\2A06\0604return\8306 X`7D $ call unpack [.VMS-BACKUP]MATCH.C;1 - 537488602 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" $! $ create 'f' XThis`20progam`20reads`20a`20VMS`20backuptape. X XThe`20tape\2905ram`20is`20orginally`20written`20by`20John`20Douglas`20Carey V`20and Xthe`20pattern`20matching`20routine`20by`20some`20unknown`20on`20\3004net.`20 X\7B05remote\8206option`20use`20t\1B04mtlib`20from`20mod.sources. X XA`20good`20way`20to`20archive\4B07\4A05access`20for`20users`20with`20only Xa`20local\2304ount\EF04to`20create`20a`20"netwide"`20user`20tar`20and`20let V\EA05\AF0Cprograms`20do`20suid\4804\3508. X X\DE04\2307\6505ested`20on`20vax`20\5404sun. X X XSven-Ove`20Westberg`20 XLulea`20University`20of`20Technology XS-951`2087`20`20Lulea,`20`20Sweden XUUCP:`20`20sow@luthcad.UUCP\1808`7Bdecvax,philabs,seismo`7D!mcvax!enea!\3707!s Vow $ call unpack [.VMS-BACKUP]README.;1 - 1595883241 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" $! $ create 'f' X===`20vms-backup.shar`20======\0606\0C0C= XArticle`20329`20of`20comp.sources.unix: XRelay-Version:`20version`20B`202.10.3`204.3bds`20beta`206/6/85;`20site`20j.cc. Vpurdue.edu XPath:\1610!pur-ee!inuxc!ihnp4!cuae2!mirror!s\8D06-request XFrom:`20s\160E@mirror.TMC.COM XNewsgroups:\D312 XSubject:`20v07i099:`20`20Read`20VMS`20backup`20tapes XMessage-ID:`20<1319\680F> XDate:`2020`20Jan`2087`2016:20:42`20GMT XDate-Received:`2021`20\260703:46:07\2605Sender:`20rs\C610Lines:`201394 XAppro\4705\2506!rs X XSubmitted`20by:`20seismo!enea!luthcad!sow`20(Sven-Ove`20Westberg) XMod.sourc\6104Volume`207,`20Issue`2099 XArchive-name:`20read-vms-backs X XThis`20program\1D05s`20a`20VMS`20backup`20tape,`20it`20can`20use`20the`20rmtli Vb`20for`20remote\2705 Xaccess. X`09\A611 X X`5B`20`20I`20do`20not`20have`20any`20\680Fs`20with`20which`20to`20test`20this. V`20`20--r$`20`20`5D X $ call unpack [.VMS-BACKUP]SHARFILE.HEADERS;1 - 788545603 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" $! $ create 'f' X.TH`20VMSBACKUP`201`20 X.SH`20NAME Xvmsbackup`20`5C-`20read`20a`20VMS`20b\1506tape\2D05SYNOPSIS X.B`20\3409\0D04`5C-`7Btx`7D`5Bcdevw`5D`5Bs`20setnumber`5D`5Bf\3F05file`5D`20 X`5B`20name`20...`20`5D X\5204DESCRIPTION X.I\550A`20 Xreads`20\8806generated`20\920B,`20converting`20the`20files Xto`20Unix`20format`20and`20wri\250E`20to`20disc. XThe`20default`20operation`20of\2C05program`20is\3104go`20through`20an`20entire V X\8906extrac\6405every`20file\7B0Dit\740Cis`20may`20be`20modified`20by`20\9F05o Vllowing`20options. X.TP`208 X.B`20c XUse`20complete\6405names,`20includi\E307version`20number. XA`20colon`20\9004\2004octal`20\260E`20will`20be`20appended`20to`20all`20\6609 V\4809,`20rather`20than`20a`20semic\1906is`20used`20since`20\6C04Unix`20Shell Xuses`20\1404\3109`20a\1106line`20separator. XUs\CB04a`20\2506prevents\2B05user`20from`20hav\F105o`20escape\5B0E Xwhen`20referenc\2905he`20\CD08. XThis`20option`20\B606ful`20only`20w\3A04multiple`20versions`20of`20\6205ame V\4805 Xare`20on\A703single`20tape`20or\4006a`20file\350Dname`20already Xexists`20in\2005destinat\8E04directory. XTh\1B04fault\A504to`20ignore`20\9507`20numbers. X.TP`208 X.B`20d Xuse\5406\4808`20structure`20from`20VMS,`20\7606\5B06value`20is`20off.\4B0Ae XProcess`20all`20file\C205extensions. XSinc\6E04is`20program`20is`20mainly`20intended`20to`20move`20source`20code`20a Vnd`20possibly Xdata\9C06a`20DEC`20system\3804a`20Unix\1107\B60Eis`20to`20ignore Xa\A207s`20whose`20f\AE11`20specifies`20\5F07dependent`20data. XTh\3806`20typ\4905ich`20will`20be\6807d,`20unless`20the X.B`20e Xoption`20is`20\6108d,`20are X.IP`20""`2010 Xexe`20`20`20`20`20VMS`20executable`20file X.br Xlib\2009object`20library\240Aobj\2405RSX`20\2407\1C0Adl\1C0Averlay`20descri +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-