home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / M / MacPerl 4.13 source.sit / Perl Source ƒ / Perl / usersub.c < prev    next >
MacBinary  |  1993-10-23  |  4.9 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: usersub.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Oct 23 01:38:50 1993, modified Sat Oct 23 01:38:50 1993, creator 'MPS ', type ASCII, 4272 bytes "usersub.c" , at 0x1130 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 75 73 65 72 73 75 | 62 2e 63 00 00 00 00 00 |..usersu|b.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 10 b0 00 | 00 01 ac a8 ee 73 ea a8 |........|.....s..|
|00000060| ee 73 ea 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.s......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 71 00 00 00 |........|....q...|
|00000080| 2f 2a 20 24 52 43 53 66 | 69 6c 65 3a 20 75 73 65 |/* $RCSf|ile: use|
|00000090| 72 73 75 62 2e 63 2c 76 | 20 24 24 52 65 76 69 73 |rsub.c,v| $$Revis|
|000000a0| 69 6f 6e 3a 20 34 2e 30 | 2e 31 2e 32 20 24 24 44 |ion: 4.0|.1.2 $$D|
|000000b0| 61 74 65 3a 20 39 32 2f | 30 36 2f 30 38 20 31 36 |ate: 92/|06/08 16|
|000000c0| 3a 30 34 3a 32 34 20 24 | 0d 20 2a 0d 20 2a 20 20 |:04:24 $|. *. * |
|000000d0| 54 68 69 73 20 66 69 6c | 65 20 63 6f 6e 74 61 69 |This fil|e contai|
|000000e0| 6e 73 20 73 74 75 62 73 | 20 66 6f 72 20 72 6f 75 |ns stubs| for rou|
|000000f0| 74 69 6e 65 73 20 74 68 | 61 74 20 74 68 65 20 75 |tines th|at the u|
|00000100| 73 65 72 20 6d 61 79 20 | 64 65 66 69 6e 65 20 74 |ser may |define t|
|00000110| 6f 0d 20 2a 20 20 73 65 | 74 20 75 70 20 67 6c 75 |o. * se|t up glu|
|00000120| 65 20 72 6f 75 74 69 6e | 65 73 20 66 6f 72 20 43 |e routin|es for C|
|00000130| 20 6c 69 62 72 61 72 69 | 65 73 20 6f 72 20 74 6f | librari|es or to|
|00000140| 20 64 65 63 72 79 70 74 | 20 65 6e 63 72 79 70 74 | decrypt| encrypt|
|00000150| 65 64 20 73 63 72 69 70 | 74 73 0d 20 2a 20 20 66 |ed scrip|ts. * f|
|00000160| 6f 72 20 65 78 65 63 75 | 74 69 6f 6e 2e 0d 20 2a |or execu|tion.. *|
|00000170| 0d 20 2a 20 24 4c 6f 67 | 3a 09 75 73 65 72 73 75 |. * $Log|:.usersu|
|00000180| 62 2e 63 2c 76 20 24 0d | 20 2a 20 52 65 76 69 73 |b.c,v $.| * Revis|
|00000190| 69 6f 6e 20 34 2e 30 2e | 31 2e 32 20 20 39 32 2f |ion 4.0.|1.2 92/|
|000001a0| 30 36 2f 30 38 20 20 31 | 36 3a 30 34 3a 32 34 20 |06/08 1|6:04:24 |
|000001b0| 20 6c 77 61 6c 6c 0d 20 | 2a 20 70 61 74 63 68 32 | lwall. |* patch2|
|000001c0| 30 3a 20 72 65 6d 6f 76 | 65 64 20 69 6d 70 6c 69 |0: remov|ed impli|
|000001d0| 63 69 74 20 69 6e 74 20 | 64 65 63 6c 61 72 61 74 |cit int |declarat|
|000001e0| 69 6f 6e 73 20 6f 6e 20 | 66 75 6e 63 74 69 6f 6e |ions on |function|
|000001f0| 73 0d 20 2a 20 0d 20 2a | 20 52 65 76 69 73 69 6f |s. * . *| Revisio|
|00000200| 6e 20 34 2e 30 2e 31 2e | 31 20 20 39 31 2f 31 31 |n 4.0.1.|1 91/11|
|00000210| 2f 31 31 20 20 31 36 3a | 34 37 3a 31 37 20 20 6c |/11 16:|47:17 l|
|00000220| 77 61 6c 6c 0d 20 2a 20 | 70 61 74 63 68 31 39 3a |wall. * |patch19:|
|00000230| 20 64 65 6c 65 74 65 64 | 20 73 6f 6d 65 20 75 6e | deleted| some un|
|00000240| 75 73 65 64 20 66 75 6e | 63 74 69 6f 6e 73 20 66 |used fun|ctions f|
|00000250| 72 6f 6d 20 75 73 65 72 | 73 75 62 2e 63 0d 20 2a |rom user|sub.c. *|
|00000260| 20 0d 20 2a 20 52 65 76 | 69 73 69 6f 6e 20 34 2e | . * Rev|ision 4.|
|00000270| 30 20 20 39 31 2f 30 33 | 2f 32 30 20 20 30 31 3a |0 91/03|/20 01:|
|00000280| 35 35 3a 35 36 20 20 6c | 77 61 6c 6c 0d 20 2a 20 |55:56 l|wall. * |
|00000290| 34 2e 30 20 62 61 73 65 | 6c 69 6e 65 2e 0d 20 2a |4.0 base|line.. *|
|000002a0| 20 0d 20 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 | . */..#|include |
|000002b0| 22 45 58 54 45 52 4e 2e | 68 22 0d 23 69 6e 63 6c |"EXTERN.|h".#incl|
|000002c0| 75 64 65 20 22 70 65 72 | 6c 2e 68 22 0d 0d 73 74 |ude "per|l.h"..st|
|000002d0| 61 74 69 63 20 69 6e 74 | 20 75 73 65 72 73 75 62 |atic int| usersub|
|000002e0| 28 29 3b 0d 0d 69 6e 74 | 0d 75 73 65 72 69 6e 69 |();..int|.userini|
|000002f0| 74 28 29 0d 7b 0d 20 20 | 20 20 72 65 74 75 72 6e |t().{. | return|
|00000300| 20 30 3b 0d 7d 0d 0d 2f | 2a 20 42 65 20 73 75 72 | 0;.}../|* Be sur|
|00000310| 65 20 74 6f 20 72 65 66 | 65 74 63 68 20 74 68 65 |e to ref|etch the|
|00000320| 20 73 74 61 63 6b 20 70 | 6f 69 6e 74 65 72 20 61 | stack p|ointer a|
|00000330| 66 74 65 72 20 63 61 6c | 6c 69 6e 67 20 74 68 65 |fter cal|ling the|
|00000340| 73 65 20 72 6f 75 74 69 | 6e 65 73 2e 20 2a 2f 0d |se routi|nes. */.|
|00000350| 0d 69 6e 74 0d 63 61 6c | 6c 62 61 63 6b 28 73 75 |.int.cal|lback(su|
|00000360| 62 6e 61 6d 65 2c 20 73 | 70 2c 20 67 69 6d 6d 65 |bname, s|p, gimme|
|00000370| 2c 20 68 61 73 61 72 67 | 73 2c 20 6e 75 6d 61 72 |, hasarg|s, numar|
|00000380| 67 73 29 0d 63 68 61 72 | 20 2a 73 75 62 6e 61 6d |gs).char| *subnam|
|00000390| 65 3b 0d 69 6e 74 20 73 | 70 3b 09 09 09 2f 2a 20 |e;.int s|p;.../* |
|000003a0| 73 74 61 63 6b 20 70 6f | 69 6e 74 65 72 20 61 66 |stack po|inter af|
|000003b0| 74 65 72 20 61 72 67 73 | 20 61 72 65 20 70 75 73 |ter args| are pus|
|000003c0| 68 65 64 20 2a 2f 0d 69 | 6e 74 20 67 69 6d 6d 65 |hed */.i|nt gimme|
|000003d0| 3b 09 09 2f 2a 20 63 61 | 6c 6c 65 64 20 69 6e 20 |;../* ca|lled in |
|000003e0| 61 72 72 61 79 20 6f 72 | 20 73 63 61 6c 61 72 20 |array or| scalar |
|000003f0| 63 6f 6e 74 65 78 74 20 | 2a 2f 0d 69 6e 74 20 68 |context |*/.int h|
|00000400| 61 73 61 72 67 73 3b 09 | 09 2f 2a 20 77 68 65 74 |asargs;.|./* whet|
|00000410| 68 65 72 20 74 6f 20 63 | 72 65 61 74 65 20 61 20 |her to c|reate a |
|00000420| 40 5f 20 61 72 72 61 79 | 20 66 6f 72 20 72 6f 75 |@_ array| for rou|
|00000430| 74 69 6e 65 20 2a 2f 0d | 69 6e 74 20 6e 75 6d 61 |tine */.|int numa|
|00000440| 72 67 73 3b 09 09 2f 2a | 20 68 6f 77 20 6d 61 6e |rgs;../*| how man|
|00000450| 79 20 61 72 67 73 20 61 | 72 65 20 70 75 73 68 65 |y args a|re pushe|
|00000460| 64 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 20 2a |d on the| stack *|
|00000470| 2f 0d 7b 0d 20 20 20 20 | 73 74 61 74 69 63 20 41 |/.{. |static A|
|00000480| 52 47 20 6d 79 61 72 67 | 5b 33 5d 3b 09 2f 2a 20 |RG myarg|[3];./* |
|00000490| 66 61 6b 65 20 73 79 6e | 74 61 78 20 74 72 65 65 |fake syn|tax tree|
|000004a0| 20 6e 6f 64 65 20 2a 2f | 0d 20 20 20 20 69 6e 74 | node */|. int|
|000004b0| 20 61 72 67 6c 61 73 74 | 5b 33 5d 3b 0d 0d 20 20 | arglast|[3];.. |
|000004c0| 20 20 61 72 67 6c 61 73 | 74 5b 32 5d 20 3d 20 73 | arglas|t[2] = s|
|000004d0| 70 3b 0d 20 20 20 20 73 | 70 20 2d 3d 20 6e 75 6d |p;. s|p -= num|
|000004e0| 61 72 67 73 3b 0d 20 20 | 20 20 61 72 67 6c 61 73 |args;. | arglas|
|000004f0| 74 5b 31 5d 20 3d 20 73 | 70 2d 2d 3b 0d 20 20 20 |t[1] = s|p--;. |
|00000500| 20 61 72 67 6c 61 73 74 | 5b 30 5d 20 3d 20 73 70 | arglast|[0] = sp|
|00000510| 3b 0d 0d 20 20 20 20 69 | 66 20 28 21 6d 79 61 72 |;.. i|f (!myar|
|00000520| 67 5b 30 5d 2e 61 72 67 | 5f 70 74 72 2e 61 72 67 |g[0].arg|_ptr.arg|
|00000530| 5f 73 74 72 29 0d 09 6d | 79 61 72 67 5b 30 5d 2e |_str)..m|yarg[0].|
|00000540| 61 72 67 5f 70 74 72 2e | 61 72 67 5f 73 74 72 20 |arg_ptr.|arg_str |
|00000550| 3d 20 73 74 72 5f 6d 61 | 6b 65 28 22 22 2c 30 29 |= str_ma|ke("",0)|
|00000560| 3b 0d 0d 20 20 20 20 6d | 79 61 72 67 5b 31 5d 2e |;.. m|yarg[1].|
|00000570| 61 72 67 5f 74 79 70 65 | 20 3d 20 41 5f 57 4f 52 |arg_type| = A_WOR|
|00000580| 44 3b 0d 20 20 20 20 6d | 79 61 72 67 5b 31 5d 2e |D;. m|yarg[1].|
|00000590| 61 72 67 5f 70 74 72 2e | 61 72 67 5f 73 74 61 62 |arg_ptr.|arg_stab|
|000005a0| 20 3d 20 73 74 61 62 65 | 6e 74 28 73 75 62 6e 61 | = stabe|nt(subna|
|000005b0| 6d 65 2c 20 46 41 4c 53 | 45 29 3b 0d 0d 20 20 20 |me, FALS|E);.. |
|000005c0| 20 6d 79 61 72 67 5b 32 | 5d 2e 61 72 67 5f 74 79 | myarg[2|].arg_ty|
|000005d0| 70 65 20 3d 20 68 61 73 | 61 72 67 73 20 3f 20 41 |pe = has|args ? A|
|000005e0| 5f 45 58 50 52 20 3a 20 | 41 5f 4e 55 4c 4c 3b 0d |_EXPR : |A_NULL;.|
|000005f0| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 64 6f 5f 73 |. ret|urn do_s|
|00000600| 75 62 72 28 6d 79 61 72 | 67 2c 20 67 69 6d 6d 65 |ubr(myar|g, gimme|
|00000610| 2c 20 61 72 67 6c 61 73 | 74 29 3b 0d 7d 0d 0d 69 |, arglas|t);.}..i|
|00000620| 6e 74 0d 63 61 6c 6c 76 | 28 73 75 62 6e 61 6d 65 |nt.callv|(subname|
|00000630| 2c 20 73 70 2c 20 67 69 | 6d 6d 65 2c 20 61 72 67 |, sp, gi|mme, arg|
|00000640| 76 29 0d 63 68 61 72 20 | 2a 73 75 62 6e 61 6d 65 |v).char |*subname|
|00000650| 3b 0d 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 73 |;.regist|er int s|
|00000660| 70 3b 09 2f 2a 20 63 75 | 72 72 65 6e 74 20 73 74 |p;./* cu|rrent st|
|00000670| 61 63 6b 20 70 6f 69 6e | 74 65 72 20 2a 2f 0d 69 |ack poin|ter */.i|
|00000680| 6e 74 20 67 69 6d 6d 65 | 3b 09 09 2f 2a 20 63 61 |nt gimme|;../* ca|
|00000690| 6c 6c 65 64 20 69 6e 20 | 61 72 72 61 79 20 6f 72 |lled in |array or|
|000006a0| 20 73 63 61 6c 61 72 20 | 63 6f 6e 74 65 78 74 20 | scalar |context |
|000006b0| 2a 2f 0d 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |*/.regis|ter char|
|000006c0| 20 2a 2a 61 72 67 76 3b | 09 2f 2a 20 6e 75 6c 6c | **argv;|./* null|
|000006d0| 20 74 65 72 6d 69 6e 61 | 74 65 64 20 61 72 67 20 | termina|ted arg |
|000006e0| 6c 69 73 74 2c 20 4e 55 | 4c 4c 20 66 6f 72 20 6e |list, NU|LL for n|
|000006f0| 6f 20 61 72 67 6c 69 73 | 74 20 2a 2f 0d 7b 0d 20 |o arglis|t */.{. |
|00000700| 20 20 20 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 | regis|ter int |
|00000710| 69 74 65 6d 73 20 3d 20 | 30 3b 0d 20 20 20 20 69 |items = |0;. i|
|00000720| 6e 74 20 68 61 73 61 72 | 67 73 20 3d 20 28 61 72 |nt hasar|gs = (ar|
|00000730| 67 76 20 21 3d 20 30 29 | 3b 0d 0d 20 20 20 20 61 |gv != 0)|;.. a|
|00000740| 73 74 6f 72 65 28 73 74 | 61 63 6b 2c 20 2b 2b 73 |store(st|ack, ++s|
|00000750| 70 2c 20 4e 75 6c 6c 73 | 74 72 29 3b 09 2f 2a 20 |p, Nulls|tr);./* |
|00000760| 72 65 73 65 72 76 65 20 | 73 70 6f 74 20 66 6f 72 |reserve |spot for|
|00000770| 20 31 73 74 20 72 65 74 | 75 72 6e 20 61 72 67 20 | 1st ret|urn arg |
|00000780| 2a 2f 0d 20 20 20 20 69 | 66 20 28 68 61 73 61 72 |*/. i|f (hasar|
|00000790| 67 73 29 20 7b 0d 09 77 | 68 69 6c 65 20 28 2a 61 |gs) {..w|hile (*a|
|000007a0| 72 67 76 29 20 7b 0d 09 | 20 20 20 20 61 73 74 6f |rgv) {..| asto|
|000007b0| 72 65 28 73 74 61 63 6b | 2c 20 2b 2b 73 70 2c 20 |re(stack|, ++sp, |
|000007c0| 73 74 72 5f 32 6d 6f 72 | 74 61 6c 28 73 74 72 5f |str_2mor|tal(str_|
|000007d0| 6d 61 6b 65 28 2a 61 72 | 67 76 2c 30 29 29 29 3b |make(*ar|gv,0)));|
|000007e0| 0d 09 20 20 20 20 69 74 | 65 6d 73 2b 2b 3b 0d 09 |.. it|ems++;..|
|000007f0| 20 20 20 20 61 72 67 76 | 2b 2b 3b 0d 09 7d 0d 20 | argv|++;..}. |
|00000800| 20 20 20 7d 0d 20 20 20 | 20 72 65 74 75 72 6e 20 | }. | return |
|00000810| 63 61 6c 6c 62 61 63 6b | 28 73 75 62 6e 61 6d 65 |callback|(subname|
|00000820| 2c 20 73 70 2c 20 67 69 | 6d 6d 65 2c 20 68 61 73 |, sp, gi|mme, has|
|00000830| 61 72 67 73 2c 20 69 74 | 65 6d 73 29 3b 0d 7d 0d |args, it|ems);.}.|
|00000840| 0d 2f 2a 0d 20 2a 20 54 | 68 65 20 66 6f 6c 6c 6f |./*. * T|he follo|
|00000850| 77 69 6e 67 20 69 73 20 | 73 75 70 70 6c 69 65 64 |wing is |supplied|
|00000860| 20 62 79 20 4a 6f 68 6e | 20 4d 61 63 64 6f 6e 61 | by John| Macdona|
|00000870| 6c 64 20 61 73 20 61 20 | 6d 65 61 6e 73 20 6f 66 |ld as a |means of|
|00000880| 20 64 65 63 72 79 70 74 | 69 6e 67 0d 20 2a 20 61 | decrypt|ing. * a|
|00000890| 6e 64 20 65 78 65 63 75 | 74 69 6e 67 20 28 70 72 |nd execu|ting (pr|
|000008a0| 65 73 75 6d 61 62 6c 79 | 20 70 72 6f 70 72 69 65 |esumably| proprie|
|000008b0| 74 61 72 79 29 20 73 63 | 72 69 70 74 73 20 74 68 |tary) sc|ripts th|
|000008c0| 61 74 20 68 61 76 65 20 | 62 65 65 6e 20 65 6e 63 |at have |been enc|
|000008d0| 72 79 70 74 65 64 0d 20 | 2a 20 62 79 20 61 20 28 |rypted. |* by a (|
|000008e0| 70 72 65 73 75 6d 61 62 | 6c 79 20 73 65 63 72 65 |presumab|ly secre|
|000008f0| 74 29 20 6d 65 74 68 6f | 64 2e 20 20 54 68 65 20 |t) metho|d. The |
|00000900| 69 64 65 61 20 69 73 20 | 74 68 61 74 20 79 6f 75 |idea is |that you|
|00000910| 20 73 75 70 70 6c 79 20 | 79 6f 75 72 20 6f 77 6e | supply |your own|
|00000920| 0d 20 2a 20 72 6f 75 74 | 69 6e 65 20 69 6e 20 70 |. * rout|ine in p|
|00000930| 6c 61 63 65 20 6f 66 20 | 63 72 79 70 74 66 69 6c |lace of |cryptfil|
|00000940| 74 65 72 20 28 77 68 69 | 63 68 20 69 73 20 70 75 |ter (whi|ch is pu|
|00000950| 72 70 6f 73 65 66 75 6c | 6c 79 20 61 20 76 65 72 |rposeful|ly a ver|
|00000960| 79 20 77 65 61 6b 0d 20 | 2a 20 65 6e 63 72 79 70 |y weak. |* encryp|
|00000970| 74 69 6f 6e 29 2e 20 20 | 49 66 20 61 6e 20 65 6e |tion). |If an en|
|00000980| 63 72 79 70 74 65 64 20 | 73 63 72 69 70 74 20 69 |crypted |script i|
|00000990| 73 20 64 65 74 65 63 74 | 65 64 2c 20 61 20 70 72 |s detect|ed, a pr|
|000009a0| 6f 63 65 73 73 20 69 73 | 20 66 6f 72 6b 65 64 0d |ocess is| forked.|
|000009b0| 20 2a 20 6f 66 66 20 74 | 6f 20 72 75 6e 20 74 68 | * off t|o run th|
|000009c0| 65 20 63 72 79 70 74 66 | 69 6c 74 65 72 20 72 6f |e cryptf|ilter ro|
|000009d0| 75 74 69 6e 65 20 61 73 | 20 69 6e 70 75 74 20 74 |utine as| input t|
|000009e0| 6f 20 70 65 72 6c 2e 0d | 20 2a 2f 0d 0d 23 69 66 |o perl..| */..#if|
|000009f0| 64 65 66 20 43 52 59 50 | 54 53 43 52 49 50 54 0d |def CRYP|TSCRIPT.|
|00000a00| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 73 69 67 6e 61 |.#includ|e <signa|
|00000a10| 6c 2e 68 3e 0d 23 69 66 | 64 65 66 20 49 5f 56 46 |l.h>.#if|def I_VF|
|00000a20| 4f 52 4b 0d 23 69 6e 63 | 6c 75 64 65 20 3c 76 66 |ORK.#inc|lude <vf|
|00000a30| 6f 72 6b 2e 68 3e 0d 23 | 65 6e 64 69 66 0d 0d 23 |ork.h>.#|endif..#|
|00000a40| 69 66 64 65 66 20 43 52 | 59 50 54 4c 4f 43 41 4c |ifdef CR|YPTLOCAL|
|00000a50| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 63 72 79 70 |..#inclu|de "cryp|
|00000a60| 74 6c 6f 63 61 6c 2e 68 | 22 0d 0d 23 65 6c 73 65 |tlocal.h|"..#else|
|00000a70| 09 2f 2a 20 6e 64 65 66 | 20 43 52 59 50 54 4c 4f |./* ndef| CRYPTLO|
|00000a80| 43 41 4c 20 2a 2f 0d 0d | 23 64 65 66 69 6e 65 09 |CAL */..|#define.|
|00000a90| 43 52 59 50 54 5f 4d 41 | 47 49 43 5f 31 09 30 78 |CRYPT_MA|GIC_1.0x|
|00000aa0| 66 62 0d 23 64 65 66 69 | 6e 65 09 43 52 59 50 54 |fb.#defi|ne.CRYPT|
|00000ab0| 5f 4d 41 47 49 43 5f 32 | 09 30 78 66 31 0d 0d 76 |_MAGIC_2|.0xf1..v|
|00000ac0| 6f 69 64 0d 63 72 79 70 | 74 66 69 6c 74 65 72 28 |oid.cryp|tfilter(|
|00000ad0| 20 66 69 6c 20 29 0d 46 | 49 4c 45 20 2a 09 66 69 | fil ).F|ILE *.fi|
|00000ae0| 6c 3b 0d 7b 0d 20 20 20 | 20 69 6e 74 20 20 20 20 |l;.{. | int |
|00000af0| 63 68 3b 0d 0d 20 20 20 | 20 77 68 69 6c 65 28 20 |ch;.. | while( |
|00000b00| 28 63 68 20 3d 20 67 65 | 74 63 28 20 66 69 6c 20 |(ch = ge|tc( fil |
|00000b10| 29 29 20 21 3d 20 45 4f | 46 20 29 20 7b 0d 09 70 |)) != EO|F ) {..p|
|00000b20| 75 74 63 68 61 72 28 20 | 28 63 68 20 5e 20 30 78 |utchar( |(ch ^ 0x|
|00000b30| 38 30 29 20 29 3b 0d 20 | 20 20 20 7d 0d 7d 0d 0d |80) );. | }.}..|
|00000b40| 23 65 6e 64 69 66 09 2f | 2a 20 43 52 59 50 54 4c |#endif./|* CRYPTL|
|00000b50| 4f 43 41 4c 20 2a 2f 0d | 0d 23 69 66 6e 64 65 66 |OCAL */.|.#ifndef|
|00000b60| 20 4d 53 44 4f 53 0d 73 | 74 61 74 69 63 20 46 49 | MSDOS.s|tatic FI|
|00000b70| 4c 45 09 2a 6c 61 73 74 | 70 69 70 65 66 69 6c 65 |LE.*last|pipefile|
|00000b80| 3b 0d 73 74 61 74 69 63 | 20 69 6e 74 09 70 69 70 |;.static| int.pip|
|00000b90| 65 70 69 64 3b 0d 0d 23 | 69 66 64 65 66 20 56 4f |epid;..#|ifdef VO|
|00000ba0| 49 44 53 49 47 0d 23 20 | 20 64 65 66 69 6e 65 09 |IDSIG.# | define.|
|00000bb0| 56 4f 49 44 09 76 6f 69 | 64 0d 23 65 6c 73 65 0d |VOID.voi|d.#else.|
|00000bc0| 23 20 20 64 65 66 69 6e | 65 09 56 4f 49 44 09 69 |# defin|e.VOID.i|
|00000bd0| 6e 74 0d 23 65 6e 64 69 | 66 0d 0d 46 49 4c 45 20 |nt.#endi|f..FILE |
|00000be0| 2a 0d 6d 79 70 66 69 6f | 70 65 6e 28 66 69 6c 2c |*.mypfio|pen(fil,|
|00000bf0| 66 75 6e 63 29 09 09 2f | 2a 20 6f 70 65 6e 20 61 |func)../|* open a|
|00000c00| 20 70 69 70 65 20 74 6f | 20 66 75 6e 63 74 69 6f | pipe to| functio|
|00000c10| 6e 20 63 61 6c 6c 20 66 | 6f 72 20 69 6e 70 75 74 |n call f|or input|
|00000c20| 20 2a 2f 0d 46 49 4c 45 | 09 2a 66 69 6c 3b 0d 56 | */.FILE|.*fil;.V|
|00000c30| 4f 49 44 09 28 2a 66 75 | 6e 63 29 28 29 3b 0d 7b |OID.(*fu|nc)();.{|
|00000c40| 0d 20 20 20 20 69 6e 74 | 20 70 5b 32 5d 3b 0d 20 |. int| p[2];. |
|00000c50| 20 20 20 53 54 52 20 2a | 73 74 72 3b 0d 0d 20 20 | STR *|str;.. |
|00000c60| 20 20 69 66 20 28 70 69 | 70 65 28 70 29 20 3c 20 | if (pi|pe(p) < |
|00000c70| 30 29 20 7b 0d 09 66 63 | 6c 6f 73 65 28 20 66 69 |0) {..fc|lose( fi|
|00000c80| 6c 20 29 3b 0d 09 66 61 | 74 61 6c 28 22 43 61 6e |l );..fa|tal("Can|
|00000c90| 27 74 20 67 65 74 20 70 | 69 70 65 20 66 6f 72 20 |'t get p|ipe for |
|00000ca0| 64 65 63 72 79 70 74 22 | 29 3b 0d 20 20 20 20 7d |decrypt"|);. }|
|00000cb0| 0d 0d 20 20 20 20 2f 2a | 20 6d 61 6b 65 20 73 75 |.. /*| make su|
|00000cc0| 72 65 20 74 68 61 74 20 | 74 68 65 20 63 68 69 6c |re that |the chil|
|00000cd0| 64 20 64 6f 65 73 6e 27 | 74 20 67 65 74 20 61 6e |d doesn'|t get an|
|00000ce0| 79 74 68 69 6e 67 20 65 | 78 74 72 61 20 2a 2f 0d |ything e|xtra */.|
|00000cf0| 20 20 20 20 66 66 6c 75 | 73 68 28 73 74 64 6f 75 | fflu|sh(stdou|
|00000d00| 74 29 3b 0d 20 20 20 20 | 66 66 6c 75 73 68 28 73 |t);. |fflush(s|
|00000d10| 74 64 65 72 72 29 3b 0d | 0d 20 20 20 20 77 68 69 |tderr);.|. whi|
|00000d20| 6c 65 20 28 28 70 69 70 | 65 70 69 64 20 3d 20 66 |le ((pip|epid = f|
|00000d30| 6f 72 6b 28 29 29 20 3c | 20 30 29 20 7b 0d 09 69 |ork()) <| 0) {..i|
|00000d40| 66 20 28 65 72 72 6e 6f | 20 21 3d 20 45 41 47 41 |f (errno| != EAGA|
|00000d50| 49 4e 29 20 7b 0d 09 20 | 20 20 20 63 6c 6f 73 65 |IN) {.. | close|
|00000d60| 28 70 5b 30 5d 29 3b 0d | 09 20 20 20 20 63 6c 6f |(p[0]);.|. clo|
|00000d70| 73 65 28 70 5b 31 5d 29 | 3b 0d 09 20 20 20 20 66 |se(p[1])|;.. f|
|00000d80| 63 6c 6f 73 65 28 20 66 | 69 6c 20 29 3b 0d 09 20 |close( f|il );.. |
|00000d90| 20 20 20 66 61 74 61 6c | 28 22 43 61 6e 27 74 20 | fatal|("Can't |
|00000da0| 66 6f 72 6b 20 66 6f 72 | 20 64 65 63 72 79 70 74 |fork for| decrypt|
|00000db0| 22 29 3b 0d 09 7d 0d 09 | 73 6c 65 65 70 28 35 29 |");..}..|sleep(5)|
|00000dc0| 3b 0d 20 20 20 20 7d 0d | 20 20 20 20 69 66 20 28 |;. }.| if (|
|00000dd0| 70 69 70 65 70 69 64 20 | 3d 3d 20 30 29 20 7b 0d |pipepid |== 0) {.|
|00000de0| 09 63 6c 6f 73 65 28 70 | 5b 30 5d 29 3b 0d 09 69 |.close(p|[0]);..i|
|00000df0| 66 20 28 70 5b 31 5d 20 | 21 3d 20 31 29 20 7b 0d |f (p[1] |!= 1) {.|
|00000e00| 09 20 20 20 20 64 75 70 | 32 28 70 5b 31 5d 2c 20 |. dup|2(p[1], |
|00000e10| 31 29 3b 0d 09 20 20 20 | 20 63 6c 6f 73 65 28 70 |1);.. | close(p|
|00000e20| 5b 31 5d 29 3b 0d 09 7d | 0d 09 28 2a 66 75 6e 63 |[1]);..}|..(*func|
|00000e30| 29 28 66 69 6c 29 3b 0d | 09 66 66 6c 75 73 68 28 |)(fil);.|.fflush(|
|00000e40| 73 74 64 6f 75 74 29 3b | 0d 09 66 66 6c 75 73 68 |stdout);|..fflush|
|00000e50| 28 73 74 64 65 72 72 29 | 3b 0d 09 5f 65 78 69 74 |(stderr)|;.._exit|
|00000e60| 28 30 29 3b 0d 20 20 20 | 20 7d 0d 20 20 20 20 63 |(0);. | }. c|
|00000e70| 6c 6f 73 65 28 70 5b 31 | 5d 29 3b 0d 20 20 20 20 |lose(p[1|]);. |
|00000e80| 63 6c 6f 73 65 28 66 69 | 6c 65 6e 6f 28 66 69 6c |close(fi|leno(fil|
|00000e90| 29 29 3b 0d 20 20 20 20 | 66 63 6c 6f 73 65 28 66 |));. |fclose(f|
|00000ea0| 69 6c 29 3b 0d 20 20 20 | 20 73 74 72 20 3d 20 61 |il);. | str = a|
|00000eb0| 66 65 74 63 68 28 66 64 | 70 69 64 2c 70 5b 30 5d |fetch(fd|pid,p[0]|
|00000ec0| 2c 54 52 55 45 29 3b 0d | 20 20 20 20 73 74 72 2d |,TRUE);.| str-|
|00000ed0| 3e 73 74 72 5f 75 2e 73 | 74 72 5f 75 73 65 66 75 |>str_u.s|tr_usefu|
|00000ee0| 6c 20 3d 20 70 69 70 65 | 70 69 64 3b 0d 20 20 20 |l = pipe|pid;. |
|00000ef0| 20 72 65 74 75 72 6e 20 | 66 64 6f 70 65 6e 28 70 | return |fdopen(p|
|00000f00| 5b 30 5d 2c 20 22 72 22 | 29 3b 0d 7d 0d 0d 76 6f |[0], "r"|);.}..vo|
|00000f10| 69 64 0d 63 72 79 70 74 | 73 77 69 74 63 68 28 29 |id.crypt|switch()|
|00000f20| 0d 7b 0d 20 20 20 20 69 | 6e 74 20 63 68 3b 0d 23 |.{. i|nt ch;.#|
|00000f30| 69 66 64 65 66 20 53 54 | 44 53 54 44 49 4f 0d 20 |ifdef ST|DSTDIO. |
|00000f40| 20 20 20 2f 2a 20 63 68 | 65 61 74 20 6f 6e 20 73 | /* ch|eat on s|
|00000f50| 74 64 69 6f 20 69 66 20 | 70 6f 73 73 69 62 6c 65 |tdio if |possible|
|00000f60| 20 2a 2f 0d 20 20 20 20 | 69 66 20 28 72 73 66 70 | */. |if (rsfp|
|00000f70| 2d 3e 5f 63 6e 74 20 3e | 20 30 20 26 26 20 28 2a |->_cnt >| 0 && (*|
|00000f80| 72 73 66 70 2d 3e 5f 70 | 74 72 20 26 20 30 78 66 |rsfp->_p|tr & 0xf|
|00000f90| 66 29 20 21 3d 20 43 52 | 59 50 54 5f 4d 41 47 49 |f) != CR|YPT_MAGI|
|00000fa0| 43 5f 31 29 0d 09 72 65 | 74 75 72 6e 3b 0d 23 65 |C_1)..re|turn;.#e|
|00000fb0| 6e 64 69 66 0d 20 20 20 | 20 63 68 20 3d 20 67 65 |ndif. | ch = ge|
|00000fc0| 74 63 28 72 73 66 70 29 | 3b 0d 20 20 20 20 69 66 |tc(rsfp)|;. if|
|00000fd0| 20 28 63 68 20 3d 3d 20 | 43 52 59 50 54 5f 4d 41 | (ch == |CRYPT_MA|
|00000fe0| 47 49 43 5f 31 29 20 7b | 0d 09 69 66 20 28 67 65 |GIC_1) {|..if (ge|
|00000ff0| 74 63 28 72 73 66 70 29 | 20 3d 3d 20 43 52 59 50 |tc(rsfp)| == CRYP|
|00001000| 54 5f 4d 41 47 49 43 5f | 32 29 20 7b 0d 09 20 20 |T_MAGIC_|2) {.. |
|00001010| 20 20 69 66 28 20 70 65 | 72 6c 64 62 20 29 20 66 | if( pe|rldb ) f|
|00001020| 61 74 61 6c 28 22 63 61 | 6e 27 74 20 64 65 62 75 |atal("ca|n't debu|
|00001030| 67 20 61 6e 20 65 6e 63 | 72 79 70 74 65 64 20 73 |g an enc|rypted s|
|00001040| 63 72 69 70 74 22 29 3b | 0d 09 20 20 20 20 72 73 |cript");|.. rs|
|00001050| 66 70 20 3d 20 6d 79 70 | 66 69 6f 70 65 6e 28 20 |fp = myp|fiopen( |
|00001060| 72 73 66 70 2c 20 63 72 | 79 70 74 66 69 6c 74 65 |rsfp, cr|yptfilte|
|00001070| 72 20 29 3b 0d 09 20 20 | 20 20 70 72 65 70 72 6f |r );.. | prepro|
|00001080| 63 65 73 73 20 3d 20 31 | 3b 09 2f 2a 20 66 6f 72 |cess = 1|;./* for|
|00001090| 63 65 20 63 61 6c 6c 20 | 74 6f 20 70 63 6c 6f 73 |ce call |to pclos|
|000010a0| 65 20 77 68 65 6e 20 64 | 6f 6e 65 20 2a 2f 0d 09 |e when d|one */..|
|000010b0| 7d 0d 09 65 6c 73 65 0d | 09 20 20 20 20 66 61 74 |}..else.|. fat|
|000010c0| 61 6c 28 20 22 62 61 64 | 20 65 6e 63 72 79 70 74 |al( "bad| encrypt|
|000010d0| 69 6f 6e 20 66 6f 72 6d | 61 74 22 20 29 3b 0d 20 |ion form|at" );. |
|000010e0| 20 20 20 7d 0d 20 20 20 | 20 65 6c 73 65 0d 09 75 | }. | else..u|
|000010f0| 6e 67 65 74 63 28 63 68 | 2c 72 73 66 70 29 3b 0d |ngetc(ch|,rsfp);.|
|00001100| 7d 0d 23 65 6e 64 69 66 | 20 2f 2a 20 21 4d 53 44 |}.#endif| /* !MSD|
|00001110| 4f 53 20 2a 2f 0d 0d 23 | 65 6e 64 69 66 20 2f 2a |OS */..#|endif /*|
|00001120| 20 43 52 59 50 54 53 43 | 52 49 50 54 20 2a 2f 0d | CRYPTSC|RIPT */.|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001190| 69 6e 65 73 74 72 29 3b | 0d 20 20 20 20 79 79 65 |inestr);|. yye|
|000011a0| 72 72 6f 72 28 22 46 6f | 72 6d 61 74 20 6e 6f 74 |rror("Fo|rmat not|
|000011b0| 09 75 73 65 72 73 75 62 | 2e 63 02 00 02 00 54 45 |.usersub|.c....TE|
|000011c0| 58 54 4d 50 53 20 01 00 | ff ff ff ff 00 00 00 00 |XTMPS ..|........|
|000011d0| 02 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 a8 ee 28 c4 00 00 | 10 b0 00 00 01 ac 20 20 |....(...|...... |
|00001200| 20 20 69 66 20 28 21 63 | 73 68 6c 65 6e 29 0d 09 | if (!c|shlen)..|
|00001210| 63 73 68 6c 65 6e 20 3d | 20 73 74 72 6c 65 6e 28 |cshlen =| strlen(|
|00001220| 63 73 68 6e 61 6d 65 29 | 3b 0d 23 65 6e 64 69 66 |cshname)|;.#endif|
|00001230| 0d 7d 0d 0d 76 6f 69 64 | 20 69 6e 69 74 5f 74 6f |.}..void| init_to|
|00001240| 6b 65 28 29 0d 7b 0d 20 | 20 20 20 72 65 70 61 72 |ke().{. | repar|
|00001250| 73 65 20 3d 20 4e 55 4c | 4c 3b 0d 20 20 20 20 6c |se = NUL|L;. l|
|00001260| 61 73 74 5f 75 6e 69 3d | 20 4e 55 4c 4c 3b 0d 7d |ast_uni=| NULL;.}|
|00001270| 20 20 65 6c 73 65 20 69 | 66 20 28 73 74 72 45 51 | else i|f (strEQ|
|00001280| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 39 32 2f |...H..Mo|naco.92/|
|00001290| 30 36 2f 30 38 20 31 36 | 3a 30 34 3a 32 34 20 24 |06/08 16|:04:24 $|
|000012a0| 0d 20 2a 0d 20 2a 00 06 | 00 08 00 64 00 1c 01 dd |. *. *..|...d....|
|000012b0| 02 3d 00 64 00 1c 01 dd | 02 3d a8 ee 2d 9a 00 00 |.=.d....|.=..-...|
|000012c0| 00 d7 00 00 00 d7 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000012d0| 00 64 00 1c 01 dd 02 3d | 00 64 00 1c 01 dd 02 3d |.d.....=|.d.....=|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 3c |.....n..|.n...>.<|
|00001300| 16 80 1b 8c 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |........|.>..MPSR|
|00001310| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 03 f0 ff ff 00 00 00 4c | 00 3e 6d 74 00 00 00 00 |.......L|.>mt....|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+