home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / unix / uudecode / uudecode.shr
SHell self-extracting ARchive  |  1988-09-14  |  3.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
66% dexvert PC-Shrink Archive (archive/pcShrink) ext Supported
66% dexvert Apple IIGS SH3/SHR (image/a2gsSHStar) ext Supported
66% dexvert Magic Draw (image/magicDraw) ext Supported
66% dexvert Apple IIGS Preferred Format (image/a2gsPreferred) ext Supported
1% dexvert Text File (text/txt) fallback Supported
100% file POSIX shell script text executable default
99% file C source text default
98% file a /bin/sh script, ASCII text executable default (weak)
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% gt2 Shell Skript: '/bin/sh' default (weak)
100% detectItEasy Format: plain text[LF] default (weak)
100% binwalkID Executable script, shebang: "/bin/sh" default (weak)
100% xdgMime application/x-shellscript default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 21 20 2f 62 69 6e 2f | 73 68 0a 23 20 54 68 69 |#! /bin/|sh.# Thi|
|00000010| 73 20 69 73 20 61 20 73 | 68 65 6c 6c 20 61 72 63 |s is a s|hell arc|
|00000020| 68 69 76 65 2c 20 6d 65 | 61 6e 69 6e 67 3a 0a 23 |hive, me|aning:.#|
|00000030| 20 31 2e 20 52 65 6d 6f | 76 65 20 65 76 65 72 79 | 1. Remo|ve every|
|00000040| 74 68 69 6e 67 20 61 62 | 6f 76 65 20 74 68 65 20 |thing ab|ove the |
|00000050| 23 21 20 2f 62 69 6e 2f | 73 68 20 6c 69 6e 65 2e |#! /bin/|sh line.|
|00000060| 0a 23 20 32 2e 20 53 61 | 76 65 20 74 68 65 20 72 |.# 2. Sa|ve the r|
|00000070| 65 73 75 6c 74 69 6e 67 | 20 74 65 78 74 20 69 6e |esulting| text in|
|00000080| 20 61 20 66 69 6c 65 2e | 0a 23 20 33 2e 20 45 78 | a file.|.# 3. Ex|
|00000090| 65 63 75 74 65 20 74 68 | 65 20 66 69 6c 65 20 77 |ecute th|e file w|
|000000a0| 69 74 68 20 2f 62 69 6e | 2f 73 68 20 28 6e 6f 74 |ith /bin|/sh (not|
|000000b0| 20 63 73 68 29 20 74 6f | 20 63 72 65 61 74 65 3a | csh) to| create:|
|000000c0| 0a 23 09 75 75 64 65 63 | 6f 64 65 2e 63 0a 23 09 |.#.uudec|ode.c.#.|
|000000d0| 75 75 65 6e 63 6f 64 65 | 2e 63 0a 23 20 54 68 69 |uuencode|.c.# Thi|
|000000e0| 73 20 61 72 63 68 69 76 | 65 20 63 72 65 61 74 65 |s archiv|e create|
|000000f0| 64 3a 20 54 75 65 20 4a | 75 6c 20 32 31 20 31 31 |d: Tue J|ul 21 11|
|00000100| 3a 35 39 3a 30 34 20 31 | 39 38 37 0a 65 78 70 6f |:59:04 1|987.expo|
|00000110| 72 74 20 50 41 54 48 3b | 20 50 41 54 48 3d 2f 62 |rt PATH;| PATH=/b|
|00000120| 69 6e 3a 2f 75 73 72 2f | 62 69 6e 3a 24 50 41 54 |in:/usr/|bin:$PAT|
|00000130| 48 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 75 75 |H.if tes|t -f 'uu|
|00000140| 64 65 63 6f 64 65 2e 63 | 27 0a 74 68 65 6e 0a 09 |decode.c|'.then..|
|00000150| 65 63 68 6f 20 73 68 61 | 72 3a 20 22 77 69 6c 6c |echo sha|r: "will|
|00000160| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|00000170| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 27 75 |existing| file 'u|
|00000180| 75 64 65 63 6f 64 65 2e | 63 27 22 0a 65 6c 73 65 |udecode.|c'".else|
|00000190| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|000001a0| 46 20 3e 20 27 75 75 64 | 65 63 6f 64 65 2e 63 27 |F > 'uud|ecode.c'|
|000001b0| 0a 2f 2a 20 75 75 64 65 | 63 6f 64 65 2e 63 20 2d |./* uude|code.c -|
|000001c0| 20 63 6f 6e 76 65 72 74 | 20 61 73 63 69 69 2d 65 | convert| ascii-e|
|000001d0| 6e 63 6f 64 65 64 20 66 | 69 6c 65 73 20 62 61 63 |ncoded f|iles bac|
|000001e0| 6b 20 74 6f 20 74 68 65 | 69 72 20 6f 72 69 67 69 |k to the|ir origi|
|000001f0| 6e 61 6c 20 66 6f 72 6d | 0a 20 2a 20 55 73 61 67 |nal form|. * Usag|
|00000200| 65 3a 20 75 75 64 65 63 | 6f 64 65 20 5b 69 6e 66 |e: uudec|ode [inf|
|00000210| 69 6c 65 5d 0a 20 2a 0a | 20 2a 20 54 68 69 73 20 |ile]. *.| * This |
|00000220| 63 6f 6d 6d 61 6e 64 20 | 64 69 66 66 65 72 73 20 |command |differs |
|00000230| 66 72 6f 6d 20 74 68 65 | 20 72 65 67 75 6c 61 72 |from the| regular|
|00000240| 20 55 4e 49 58 20 6f 6e | 65 20 69 6e 20 74 68 61 | UNIX on|e in tha|
|00000250| 74 20 74 68 65 20 65 6d | 62 65 64 64 65 64 0a 20 |t the em|bedded. |
|00000260| 2a 20 66 69 6c 65 20 6e | 61 6d 65 20 22 2f 64 65 |* file n|ame "/de|
|00000270| 76 2f 73 74 64 6f 75 74 | 22 20 69 73 20 72 65 63 |v/stdout|" is rec|
|00000280| 6f 67 6e 69 7a 65 64 2c | 20 61 6c 6c 6f 77 69 6e |ognized,| allowin|
|00000290| 67 20 69 74 20 74 6f 20 | 62 65 20 75 73 65 64 20 |g it to |be used |
|000002a0| 69 6e 20 61 20 70 69 70 | 65 6c 69 6e 65 0a 20 2a |in a pip|eline. *|
|000002b0| 0a 20 2a 20 57 72 69 74 | 74 65 6e 20 61 6e 64 20 |. * Writ|ten and |
|000002c0| 70 6c 61 63 65 64 20 69 | 6e 20 74 68 65 20 70 75 |placed i|n the pu|
|000002d0| 62 6c 69 63 20 64 6f 6d | 61 69 6e 20 62 79 20 50 |blic dom|ain by P|
|000002e0| 68 69 6c 20 4b 61 72 6e | 2c 20 4b 41 39 51 20 33 |hil Karn|, KA9Q 3|
|000002f0| 31 20 4d 61 72 63 68 20 | 31 39 38 37 0a 20 2a 2f |1 March |1987. */|
|00000300| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00000310| 2e 68 3e 0a 23 64 65 66 | 69 6e 65 09 4c 49 4e 45 |.h>.#def|ine.LINE|
|00000320| 4c 45 4e 09 38 30 0a 6d | 61 69 6e 28 61 72 67 63 |LEN.80.m|ain(argc|
|00000330| 2c 61 72 67 76 29 0a 69 | 6e 74 20 61 72 67 63 3b |,argv).i|nt argc;|
|00000340| 0a 63 68 61 72 20 2a 61 | 72 67 76 5b 5d 3b 0a 7b |.char *a|rgv[];.{|
|00000350| 0a 09 63 68 61 72 20 6c | 69 6e 65 62 75 66 5b 4c |..char l|inebuf[L|
|00000360| 49 4e 45 4c 45 4e 5d 2c | 2a 69 6e 64 65 78 28 29 |INELEN],|*index()|
|00000370| 2c 2a 66 67 65 74 73 28 | 29 3b 0a 09 72 65 67 69 |,*fgets(|);..regi|
|00000380| 73 74 65 72 20 63 68 61 | 72 20 2a 63 70 3b 0a 09 |ster cha|r *cp;..|
|00000390| 69 6e 74 20 6c 69 6e 65 | 6c 65 6e 2c 69 3b 0a 09 |int line|len,i;..|
|000003a0| 46 49 4c 45 20 2a 69 6e | 2c 2a 6f 75 74 3b 0a 09 |FILE *in|,*out;..|
|000003b0| 0a 09 69 66 28 61 72 67 | 63 20 3e 20 31 29 7b 0a |..if(arg|c > 1){.|
|000003c0| 09 09 69 66 28 28 69 6e | 20 3d 20 66 6f 70 65 6e |..if((in| = fopen|
|000003d0| 28 61 72 67 76 5b 31 5d | 2c 22 72 22 29 29 20 3d |(argv[1]|,"r")) =|
|000003e0| 3d 20 4e 55 4c 4c 29 7b | 0a 09 09 09 66 70 72 69 |= NULL){|....fpri|
|000003f0| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 43 61 6e 27 |ntf(stde|rr,"Can'|
|00000400| 74 20 72 65 61 64 20 25 | 73 5c 6e 22 2c 61 72 67 |t read %|s\n",arg|
|00000410| 76 5b 31 5d 29 3b 0a 09 | 09 09 65 78 69 74 28 31 |v[1]);..|..exit(1|
|00000420| 29 3b 0a 09 09 7d 0a 09 | 7d 20 65 6c 73 65 0a 09 |);...}..|} else..|
|00000430| 09 69 6e 20 3d 20 73 74 | 64 69 6e 3b 0a 0a 09 2f |.in = st|din;.../|
|00000440| 2a 20 46 69 6e 64 20 62 | 65 67 69 6e 20 6c 69 6e |* Find b|egin lin|
|00000450| 65 20 2a 2f 0a 09 77 68 | 69 6c 65 28 66 67 65 74 |e */..wh|ile(fget|
|00000460| 73 28 6c 69 6e 65 62 75 | 66 2c 4c 49 4e 45 4c 45 |s(linebu|f,LINELE|
|00000470| 4e 2c 69 6e 29 20 21 3d | 20 4e 55 4c 4c 29 7b 0a |N,in) !=| NULL){.|
|00000480| 09 09 69 66 28 28 63 70 | 20 3d 20 69 6e 64 65 78 |..if((cp| = index|
|00000490| 28 6c 69 6e 65 62 75 66 | 2c 27 5c 6e 27 29 29 20 |(linebuf|,'\n')) |
|000004a0| 21 3d 20 4e 55 4c 4c 29 | 0a 09 09 09 2a 63 70 20 |!= NULL)|....*cp |
|000004b0| 3d 20 27 5c 30 27 3b 0a | 09 09 69 66 28 73 74 72 |= '\0';.|..if(str|
|000004c0| 6e 63 6d 70 28 6c 69 6e | 65 62 75 66 2c 22 62 65 |ncmp(lin|ebuf,"be|
|000004d0| 67 69 6e 22 2c 35 29 20 | 3d 3d 20 30 29 0a 09 09 |gin",5) |== 0)...|
|000004e0| 09 62 72 65 61 6b 3b 0a | 09 7d 0a 09 69 66 28 66 |.break;.|.}..if(f|
|000004f0| 65 6f 66 28 69 6e 29 29 | 7b 0a 09 09 66 70 72 69 |eof(in))|{...fpri|
|00000500| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 4e 6f 20 62 |ntf(stde|rr,"No b|
|00000510| 65 67 69 6e 20 66 6f 75 | 6e 64 5c 6e 22 29 3b 0a |egin fou|nd\n");.|
|00000520| 09 09 65 78 69 74 28 31 | 29 3b 0a 09 7d 0a 09 2f |..exit(1|);..}../|
|00000530| 2a 20 46 69 6e 64 20 62 | 65 67 69 6e 6e 69 6e 67 |* Find b|eginning|
|00000540| 20 6f 66 20 66 69 6c 65 | 20 6e 61 6d 65 20 2a 2f | of file| name */|
|00000550| 0a 09 63 70 20 3d 20 26 | 6c 69 6e 65 62 75 66 5b |..cp = &|linebuf[|
|00000560| 36 5d 3b 0a 09 69 66 28 | 28 63 70 20 3d 20 69 6e |6];..if(|(cp = in|
|00000570| 64 65 78 28 63 70 2c 27 | 20 27 29 29 20 21 3d 20 |dex(cp,'| ')) != |
|00000580| 4e 55 4c 4c 29 0a 09 09 | 63 70 2b 2b 3b 0a 09 2f |NULL)...|cp++;../|
|00000590| 2a 20 53 65 74 20 75 70 | 20 6f 75 74 70 75 74 20 |* Set up| output |
|000005a0| 73 74 72 65 61 6d 20 2a | 2f 0a 09 69 66 28 63 70 |stream *|/..if(cp|
|000005b0| 20 3d 3d 20 4e 55 4c 4c | 20 7c 7c 20 73 74 72 63 | == NULL| || strc|
|000005c0| 6d 70 28 63 70 2c 22 2f | 64 65 76 2f 73 74 64 6f |mp(cp,"/|dev/stdo|
|000005d0| 75 74 22 29 20 3d 3d 20 | 30 29 7b 0a 09 09 6f 75 |ut") == |0){...ou|
|000005e0| 74 20 3d 20 73 74 64 6f | 75 74 3b 0a 09 7d 20 65 |t = stdo|ut;..} e|
|000005f0| 6c 73 65 20 69 66 28 28 | 6f 75 74 20 3d 20 66 6f |lse if((|out = fo|
|00000600| 70 65 6e 28 63 70 2c 22 | 77 22 29 29 20 3d 3d 20 |pen(cp,"|w")) == |
|00000610| 4e 55 4c 4c 29 7b 0a 09 | 09 09 66 70 72 69 6e 74 |NULL){..|..fprint|
|00000620| 66 28 73 74 64 65 72 72 | 2c 22 43 61 6e 27 74 20 |f(stderr|,"Can't |
|00000630| 6f 70 65 6e 20 25 73 5c | 6e 22 2c 63 70 29 3b 0a |open %s\|n",cp);.|
|00000640| 09 09 09 65 78 69 74 28 | 31 29 3b 0a 09 7d 0a 09 |...exit(|1);..}..|
|00000650| 2f 2a 20 4e 6f 77 20 63 | 72 75 6e 63 68 20 74 68 |/* Now c|runch th|
|00000660| 65 20 69 6e 70 75 74 20 | 66 69 6c 65 20 2a 2f 0a |e input |file */.|
|00000670| 09 77 68 69 6c 65 28 66 | 67 65 74 73 28 6c 69 6e |.while(f|gets(lin|
|00000680| 65 62 75 66 2c 4c 49 4e | 45 4c 45 4e 2c 69 6e 29 |ebuf,LIN|ELEN,in)|
|00000690| 20 21 3d 20 4e 55 4c 4c | 29 7b 0a 09 09 6c 69 6e | != NULL|){...lin|
|000006a0| 65 6c 65 6e 20 3d 20 6c | 69 6e 65 62 75 66 5b 30 |elen = l|inebuf[0|
|000006b0| 5d 20 2d 20 27 20 27 3b | 0a 09 09 69 66 28 6c 69 |] - ' ';|...if(li|
|000006c0| 6e 65 6c 65 6e 20 3d 3d | 20 30 20 7c 7c 20 73 74 |nelen ==| 0 || st|
|000006d0| 72 6e 63 6d 70 28 6c 69 | 6e 65 62 75 66 2c 22 65 |rncmp(li|nebuf,"e|
|000006e0| 6e 64 22 2c 33 29 20 3d | 3d 20 30 29 0a 09 09 09 |nd",3) =|= 0)....|
|000006f0| 62 72 65 61 6b 3b 0a 09 | 09 66 6f 72 28 63 70 20 |break;..|.for(cp |
|00000700| 3d 20 26 6c 69 6e 65 62 | 75 66 5b 31 5d 3b 6c 69 |= &lineb|uf[1];li|
|00000710| 6e 65 6c 65 6e 20 3e 20 | 30 3b 63 70 20 2b 3d 20 |nelen > |0;cp += |
|00000720| 34 29 7b 0a 09 09 09 66 | 6f 72 28 69 3d 30 3b 69 |4){....f|or(i=0;i|
|00000730| 3c 34 3b 69 2b 2b 29 0a | 09 09 09 09 63 70 5b 69 |<4;i++).|....cp[i|
|00000740| 5d 20 2d 3d 20 27 20 27 | 3b 0a 09 09 09 70 75 74 |] -= ' '|;....put|
|00000750| 63 28 28 63 70 5b 30 5d | 20 3c 3c 20 32 29 20 7c |c((cp[0]| << 2) ||
|00000760| 20 28 28 63 70 5b 31 5d | 20 3e 3e 20 34 29 20 26 | ((cp[1]| >> 4) &|
|00000770| 20 30 78 33 29 2c 6f 75 | 74 29 3b 0a 09 09 09 69 | 0x3),ou|t);....i|
|00000780| 66 28 2d 2d 6c 69 6e 65 | 6c 65 6e 20 3e 20 30 29 |f(--line|len > 0)|
|00000790| 0a 09 09 09 09 70 75 74 | 63 28 28 63 70 5b 31 5d |.....put|c((cp[1]|
|000007a0| 20 3c 3c 20 34 29 20 7c | 20 28 28 63 70 5b 32 5d | << 4) || ((cp[2]|
|000007b0| 20 3e 3e 20 32 29 20 26 | 20 30 78 66 29 2c 6f 75 | >> 2) &| 0xf),ou|
|000007c0| 74 29 3b 0a 09 09 09 69 | 66 28 2d 2d 6c 69 6e 65 |t);....i|f(--line|
|000007d0| 6c 65 6e 20 3e 20 30 29 | 0a 09 09 09 09 70 75 74 |len > 0)|.....put|
|000007e0| 63 28 28 63 70 5b 32 5d | 20 3c 3c 20 36 29 20 7c |c((cp[2]| << 6) ||
|000007f0| 20 63 70 5b 33 5d 2c 6f | 75 74 29 3b 0a 09 09 09 | cp[3],o|ut);....|
|00000800| 6c 69 6e 65 6c 65 6e 2d | 2d 3b 0a 09 09 7d 0a 09 |linelen-|-;...}..|
|00000810| 7d 0a 09 66 63 6c 6f 73 | 65 28 6f 75 74 29 3b 0a |}..fclos|e(out);.|
|00000820| 7d 0a 0a 53 48 41 52 5f | 45 4f 46 0a 66 69 0a 69 |}..SHAR_|EOF.fi.i|
|00000830| 66 20 74 65 73 74 20 2d | 66 20 27 75 75 65 6e 63 |f test -|f 'uuenc|
|00000840| 6f 64 65 2e 63 27 0a 74 | 68 65 6e 0a 09 65 63 68 |ode.c'.t|hen..ech|
|00000850| 6f 20 73 68 61 72 3a 20 | 22 77 69 6c 6c 20 6e 6f |o shar: |"will no|
|00000860| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|00000870| 73 74 69 6e 67 20 66 69 | 6c 65 20 27 75 75 65 6e |sting fi|le 'uuen|
|00000880| 63 6f 64 65 2e 63 27 22 | 0a 65 6c 73 65 0a 63 61 |code.c'"|.else.ca|
|00000890| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|000008a0| 20 27 75 75 65 6e 63 6f | 64 65 2e 63 27 0a 2f 2a | 'uuenco|de.c'./*|
|000008b0| 20 75 75 65 6e 63 6f 64 | 65 2e 63 20 2d 20 63 6f | uuencod|e.c - co|
|000008c0| 6e 76 65 72 74 20 66 69 | 6c 65 73 20 74 6f 20 61 |nvert fi|les to a|
|000008d0| 73 63 69 69 2d 65 6e 63 | 6f 64 65 64 20 66 6f 72 |scii-enc|oded for|
|000008e0| 6d 0a 20 2a 20 55 73 61 | 67 65 3a 20 75 75 65 6e |m. * Usa|ge: uuen|
|000008f0| 63 6f 64 65 20 5b 66 69 | 6c 65 6e 61 6d 65 5d 20 |code [fi|lename] |
|00000900| 3c 20 69 6e 66 69 6c 65 | 0a 20 2a 0a 20 2a 20 49 |< infile|. *. * I|
|00000910| 66 20 5b 66 69 6c 65 6e | 61 6d 65 5d 20 69 73 6e |f [filen|ame] isn|
|00000920| 27 74 20 73 70 65 63 69 | 66 69 65 64 2c 20 22 2f |'t speci|fied, "/|
|00000930| 64 65 76 2f 73 74 64 6f | 75 74 22 20 69 73 20 74 |dev/stdo|ut" is t|
|00000940| 68 65 20 64 65 66 61 75 | 6c 74 2e 20 20 54 68 69 |he defau|lt. Thi|
|00000950| 73 20 61 6c 6c 6f 77 73 | 0a 20 2a 20 75 73 65 20 |s allows|. * use |
|00000960| 6f 66 20 6d 79 20 75 75 | 64 65 63 6f 64 65 20 61 |of my uu|decode a|
|00000970| 73 20 61 20 70 69 70 65 | 6c 69 6e 65 20 66 69 6c |s a pipe|line fil|
|00000980| 74 65 72 2e 0a 20 2a 0a | 20 2a 20 57 72 69 74 74 |ter.. *.| * Writt|
|00000990| 65 6e 20 61 6e 64 20 70 | 6c 61 63 65 64 20 69 6e |en and p|laced in|
|000009a0| 20 74 68 65 20 70 75 62 | 6c 69 63 20 64 6f 6d 61 | the pub|lic doma|
|000009b0| 69 6e 20 62 79 20 50 68 | 69 6c 20 4b 61 72 6e 2c |in by Ph|il Karn,|
|000009c0| 20 4b 41 39 51 0a 20 2a | 20 33 31 20 4d 61 72 63 | KA9Q. *| 31 Marc|
|000009d0| 68 20 31 39 38 37 0a 20 | 2a 2f 0a 23 69 6e 63 6c |h 1987. |*/.#incl|
|000009e0| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 23 64 |ude <std|io.h>.#d|
|000009f0| 65 66 69 6e 65 09 4c 49 | 4e 45 4c 45 4e 09 34 35 |efine.LI|NELEN.45|
|00000a00| 0a 6d 61 69 6e 28 61 72 | 67 63 2c 61 72 67 76 29 |.main(ar|gc,argv)|
|00000a10| 0a 69 6e 74 20 61 72 67 | 63 3b 0a 63 68 61 72 20 |.int arg|c;.char |
|00000a20| 2a 61 72 67 76 5b 5d 3b | 0a 7b 0a 09 63 68 61 72 |*argv[];|.{..char|
|00000a30| 20 6c 69 6e 65 62 75 66 | 5b 4c 49 4e 45 4c 45 4e | linebuf|[LINELEN|
|00000a40| 5d 3b 0a 09 72 65 67 69 | 73 74 65 72 20 63 68 61 |];..regi|ster cha|
|00000a50| 72 20 2a 63 70 3b 0a 09 | 69 6e 74 20 6c 69 6e 65 |r *cp;..|int line|
|00000a60| 6c 65 6e 3b 0a 0a 09 69 | 66 28 61 72 67 63 20 3e |len;...i|f(argc >|
|00000a70| 20 31 29 0a 09 09 70 72 | 69 6e 74 66 28 22 62 65 | 1)...pr|intf("be|
|00000a80| 67 69 6e 20 30 36 36 36 | 20 25 73 5c 6e 22 2c 61 |gin 0666| %s\n",a|
|00000a90| 72 67 76 5b 31 5d 29 3b | 0a 09 65 6c 73 65 0a 09 |rgv[1]);|..else..|
|00000aa0| 09 70 72 69 6e 74 66 28 | 22 62 65 67 69 6e 20 30 |.printf(|"begin 0|
|00000ab0| 36 36 36 20 2f 64 65 76 | 2f 73 74 64 6f 75 74 5c |666 /dev|/stdout\|
|00000ac0| 6e 22 29 3b 0a 09 66 6f | 72 28 3b 3b 29 7b 0a 09 |n");..fo|r(;;){..|
|00000ad0| 09 6c 69 6e 65 6c 65 6e | 20 3d 20 66 72 65 61 64 |.linelen| = fread|
|00000ae0| 28 6c 69 6e 65 62 75 66 | 2c 31 2c 4c 49 4e 45 4c |(linebuf|,1,LINEL|
|00000af0| 45 4e 2c 73 74 64 69 6e | 29 3b 0a 09 09 69 66 28 |EN,stdin|);...if(|
|00000b00| 6c 69 6e 65 6c 65 6e 20 | 3c 3d 20 30 29 0a 09 09 |linelen |<= 0)...|
|00000b10| 09 62 72 65 61 6b 3b 0a | 09 09 70 75 74 63 68 61 |.break;.|..putcha|
|00000b20| 72 28 27 20 27 20 2b 20 | 6c 69 6e 65 6c 65 6e 29 |r(' ' + |linelen)|
|00000b30| 3b 09 2f 2a 20 52 65 63 | 6f 72 64 20 6c 65 6e 67 |;./* Rec|ord leng|
|00000b40| 74 68 20 2a 2f 0a 09 09 | 66 6f 72 28 63 70 20 3d |th */...|for(cp =|
|00000b50| 20 6c 69 6e 65 62 75 66 | 3b 20 63 70 20 3c 20 26 | linebuf|; cp < &|
|00000b60| 6c 69 6e 65 62 75 66 5b | 6c 69 6e 65 6c 65 6e 5d |linebuf[|linelen]|
|00000b70| 3b 20 63 70 20 2b 3d 20 | 33 29 7b 0a 09 09 20 20 |; cp += |3){... |
|00000b80| 20 20 20 20 20 20 70 75 | 74 63 68 61 72 28 27 20 | pu|tchar(' |
|00000b90| 27 20 2b 20 28 28 63 70 | 5b 30 5d 20 3e 3e 20 32 |' + ((cp|[0] >> 2|
|00000ba0| 29 20 26 20 30 78 33 66 | 29 29 3b 0a 09 09 09 70 |) & 0x3f|));....p|
|00000bb0| 75 74 63 68 61 72 28 27 | 20 27 20 2b 20 28 28 28 |utchar('| ' + (((|
|00000bc0| 63 70 5b 30 5d 20 3c 3c | 20 34 29 20 26 20 30 78 |cp[0] <<| 4) & 0x|
|00000bd0| 33 30 29 20 7c 20 28 28 | 63 70 5b 31 5d 20 3e 3e |30) | ((|cp[1] >>|
|00000be0| 20 34 29 20 26 20 30 78 | 66 29 29 29 3b 0a 09 09 | 4) & 0x|f)));...|
|00000bf0| 09 70 75 74 63 68 61 72 | 28 27 20 27 20 2b 20 28 |.putchar|(' ' + (|
|00000c00| 28 28 63 70 5b 31 5d 20 | 3c 3c 20 32 29 20 26 20 |((cp[1] |<< 2) & |
|00000c10| 30 78 33 63 29 20 7c 20 | 28 28 63 70 5b 32 5d 20 |0x3c) | |((cp[2] |
|00000c20| 3e 3e 20 36 29 20 26 20 | 30 78 33 29 29 29 3b 0a |>> 6) & |0x3)));.|
|00000c30| 09 09 09 70 75 74 63 68 | 61 72 28 27 20 27 20 2b |...putch|ar(' ' +|
|00000c40| 20 28 63 70 5b 32 5d 20 | 26 20 30 78 33 66 29 29 | (cp[2] |& 0x3f))|
|00000c50| 3b 0a 09 09 7d 0a 09 09 | 70 75 74 63 68 61 72 28 |;...}...|putchar(|
|00000c60| 27 5c 6e 27 29 3b 0a 09 | 7d 0a 09 70 72 69 6e 74 |'\n');..|}..print|
|00000c70| 66 28 22 20 5c 6e 22 29 | 3b 09 2f 2a 20 30 2d 6c |f(" \n")|;./* 0-l|
|00000c80| 65 6e 67 74 68 20 6e 75 | 6c 6c 20 72 65 63 6f 72 |ength nu|ll recor|
|00000c90| 64 20 2a 2f 0a 09 70 72 | 69 6e 74 66 28 22 65 6e |d */..pr|intf("en|
|00000ca0| 64 5c 6e 22 29 3b 0a 7d | 0a 0a 53 48 41 52 5f 45 |d\n");.}|..SHAR_E|
|00000cb0| 4f 46 0a 66 69 0a 65 78 | 69 74 20 30 0a 23 09 45 |OF.fi.ex|it 0.#.E|
|00000cc0| 6e 64 20 6f 66 20 73 68 | 65 6c 6c 20 61 72 63 68 |nd of sh|ell arch|
|00000cd0| 69 76 65 0a 0a | |ive.. | |
+--------+-------------------------+-------------------------+--------+--------+