home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / oraperl-v2 / part05 < prev    next >
SHell self-extracting ARchive  |  1992-07-06  |  16.3 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

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

You can browse this item here: part05

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 4b 65 76 69 | 6e 20 53 74 6f 63 6b 20 |om: Kevi|n Stock |
|00000030| 3c 6b 73 74 6f 63 6b 40 | 65 6e 63 6f 72 65 2e 63 |<kstock@|encore.c|
|00000040| 6f 6d 3e 0a 53 75 62 6a | 65 63 74 3a 20 20 76 33 |om>.Subj|ect: v3|
|00000050| 30 69 30 39 31 3a 20 20 | 6f 72 61 70 65 72 6c 2d |0i091: |oraperl-|
|00000060| 76 32 20 2d 20 45 78 74 | 65 6e 73 69 6f 6e 73 20 |v2 - Ext|ensions |
|00000070| 74 6f 20 50 65 72 6c 20 | 74 6f 20 61 63 63 65 73 |to Perl |to acces|
|00000080| 73 20 4f 72 61 63 6c 65 | 20 64 61 74 61 62 61 73 |s Oracle| databas|
|00000090| 65 2c 20 50 61 72 74 30 | 35 2f 30 35 0a 4d 65 73 |e, Part0|5/05.Mes|
|000000a0| 73 61 67 65 2d 49 44 3a | 20 3c 31 39 39 32 4a 75 |sage-ID:| <1992Ju|
|000000b0| 6e 32 39 2e 31 38 34 33 | 34 38 2e 31 31 39 36 35 |n29.1843|48.11965|
|000000c0| 40 73 70 61 72 6b 79 2e | 69 6d 64 2e 73 74 65 72 |@sparky.|imd.ster|
|000000d0| 6c 69 6e 67 2e 63 6f 6d | 3e 0a 58 2d 4d 64 34 2d |ling.com|>.X-Md4-|
|000000e0| 53 69 67 6e 61 74 75 72 | 65 3a 20 34 63 32 33 36 |Signatur|e: 4c236|
|000000f0| 33 37 38 32 62 61 34 36 | 33 63 61 34 30 64 37 33 |3782ba46|3ca40d73|
|00000100| 64 39 30 62 32 38 63 64 | 66 62 35 0a 44 61 74 65 |d90b28cd|fb5.Date|
|00000110| 3a 20 4d 6f 6e 2c 20 32 | 39 20 4a 75 6e 20 31 39 |: Mon, 2|9 Jun 19|
|00000120| 39 32 20 31 38 3a 34 33 | 3a 34 38 20 47 4d 54 0a |92 18:43|:48 GMT.|
|00000130| 41 70 70 72 6f 76 65 64 | 3a 20 6b 65 6e 74 40 73 |Approved|: kent@s|
|00000140| 70 61 72 6b 79 2e 69 6d | 64 2e 73 74 65 72 6c 69 |parky.im|d.sterli|
|00000150| 6e 67 2e 63 6f 6d 0a 0a | 53 75 62 6d 69 74 74 65 |ng.com..|Submitte|
|00000160| 64 2d 62 79 3a 20 4b 65 | 76 69 6e 20 53 74 6f 63 |d-by: Ke|vin Stoc|
|00000170| 6b 20 3c 6b 73 74 6f 63 | 6b 40 65 6e 63 6f 72 65 |k <kstoc|k@encore|
|00000180| 2e 63 6f 6d 3e 0a 50 6f | 73 74 69 6e 67 2d 6e 75 |.com>.Po|sting-nu|
|00000190| 6d 62 65 72 3a 20 56 6f | 6c 75 6d 65 20 33 30 2c |mber: Vo|lume 30,|
|000001a0| 20 49 73 73 75 65 20 39 | 31 0a 41 72 63 68 69 76 | Issue 9|1.Archiv|
|000001b0| 65 2d 6e 61 6d 65 3a 20 | 6f 72 61 70 65 72 6c 2d |e-name: |oraperl-|
|000001c0| 76 32 2f 70 61 72 74 30 | 35 0a 45 6e 76 69 72 6f |v2/part0|5.Enviro|
|000001d0| 6e 6d 65 6e 74 3a 20 50 | 65 72 6c 2c 20 4f 72 61 |nment: P|erl, Ora|
|000001e0| 63 6c 65 20 77 69 74 68 | 20 4f 43 49 2c 20 6f 70 |cle with| OCI, op|
|000001f0| 74 69 6f 6e 61 6c 6c 79 | 20 43 75 72 73 65 73 0a |tionally| Curses.|
|00000200| 53 75 70 65 72 73 65 64 | 65 73 3a 20 6f 72 61 70 |Supersed|es: orap|
|00000210| 65 72 6c 3a 20 56 6f 6c | 75 6d 65 20 31 38 2c 20 |erl: Vol|ume 18, |
|00000220| 49 73 73 75 65 20 31 30 | 0a 0a 23 21 20 2f 62 69 |Issue 10|..#! /bi|
|00000230| 6e 2f 73 68 0a 23 20 54 | 68 69 73 20 69 73 20 61 |n/sh.# T|his is a|
|00000240| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 2e 20 | shell a|rchive. |
|00000250| 20 52 65 6d 6f 76 65 20 | 61 6e 79 74 68 69 6e 67 | Remove |anything|
|00000260| 20 62 65 66 6f 72 65 20 | 74 68 69 73 20 6c 69 6e | before |this lin|
|00000270| 65 2c 20 74 68 65 6e 20 | 66 65 65 64 20 69 74 0a |e, then |feed it.|
|00000280| 23 20 69 6e 74 6f 20 61 | 20 73 68 65 6c 6c 20 76 |# into a| shell v|
|00000290| 69 61 20 22 73 68 20 66 | 69 6c 65 22 20 6f 72 20 |ia "sh f|ile" or |
|000002a0| 73 69 6d 69 6c 61 72 2e | 20 20 54 6f 20 6f 76 65 |similar.| To ove|
|000002b0| 72 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |rwrite e|xisting |
|000002c0| 66 69 6c 65 73 2c 0a 23 | 20 74 79 70 65 20 22 73 |files,.#| type "s|
|000002d0| 68 20 66 69 6c 65 20 2d | 63 22 2e 0a 23 20 54 68 |h file -|c"..# Th|
|000002e0| 65 20 74 6f 6f 6c 20 74 | 68 61 74 20 67 65 6e 65 |e tool t|hat gene|
|000002f0| 72 61 74 65 64 20 74 68 | 69 73 20 61 70 70 65 61 |rated th|is appea|
|00000300| 72 65 64 20 69 6e 20 74 | 68 65 20 63 6f 6d 70 2e |red in t|he comp.|
|00000310| 73 6f 75 72 63 65 73 2e | 75 6e 69 78 20 6e 65 77 |sources.|unix new|
|00000320| 73 67 72 6f 75 70 3b 0a | 23 20 73 65 6e 64 20 6d |sgroup;.|# send m|
|00000330| 61 69 6c 20 74 6f 20 63 | 6f 6d 70 2d 73 6f 75 72 |ail to c|omp-sour|
|00000340| 63 65 73 2d 75 6e 69 78 | 40 75 75 6e 65 74 2e 75 |ces-unix|@uunet.u|
|00000350| 75 2e 6e 65 74 20 69 66 | 20 79 6f 75 20 77 61 6e |u.net if| you wan|
|00000360| 74 20 74 68 61 74 20 74 | 6f 6f 6c 2e 0a 23 20 43 |t that t|ool..# C|
|00000370| 6f 6e 74 65 6e 74 73 3a | 20 20 4c 6f 6e 67 20 63 |ontents:| Long c|
|00000380| 6f 6c 6f 6e 73 2e 63 20 | 64 62 75 67 2f 4d 61 6b |olons.c |dbug/Mak|
|00000390| 65 66 69 6c 65 20 64 62 | 75 67 2f 52 65 61 64 6d |efile db|ug/Readm|
|000003a0| 65 20 64 62 75 67 2f 66 | 61 63 74 2e 63 0a 23 20 |e dbug/f|act.c.# |
|000003b0| 20 20 64 6f 63 2f 4d 61 | 6b 65 66 69 6c 65 20 65 | doc/Ma|kefile e|
|000003c0| 78 61 6d 70 6c 65 73 2f | 52 65 61 64 6d 65 20 65 |xamples/|Readme e|
|000003d0| 78 61 6d 70 6c 65 73 2f | 62 69 6e 64 2e 70 6c 20 |xamples/|bind.pl |
|000003e0| 65 78 61 6d 70 6c 65 73 | 2f 63 6b 64 65 62 75 67 |examples|/ckdebug|
|000003f0| 2e 70 6c 0a 23 20 20 20 | 65 78 61 6d 70 6c 65 73 |.pl.# |examples|
|00000400| 2f 65 78 2e 70 6c 20 6f | 72 61 70 65 72 6c 2e 70 |/ex.pl o|raperl.p|
|00000410| 68 20 70 61 74 63 68 6c | 65 76 65 6c 2e 68 20 74 |h patchl|evel.h t|
|00000420| 65 73 74 64 69 72 2f 52 | 65 61 64 6d 65 0a 23 20 |estdir/R|eadme.# |
|00000430| 20 20 74 65 73 74 64 69 | 72 2f 53 74 61 6e 64 61 | testdi|r/Standa|
|00000440| 72 64 2d 52 65 73 75 6c | 74 73 0a 23 20 57 72 61 |rd-Resul|ts.# Wra|
|00000450| 70 70 65 64 20 62 79 20 | 6b 65 6e 74 40 73 70 61 |pped by |kent@spa|
|00000460| 72 6b 79 20 6f 6e 20 4d | 6f 6e 20 4a 75 6e 20 32 |rky on M|on Jun 2|
|00000470| 39 20 31 33 3a 32 33 3a | 33 39 20 31 39 39 32 0a |9 13:23:|39 1992.|
|00000480| 50 41 54 48 3d 2f 62 69 | 6e 3a 2f 75 73 72 2f 62 |PATH=/bi|n:/usr/b|
|00000490| 69 6e 3a 2f 75 73 72 2f | 75 63 62 20 3b 20 65 78 |in:/usr/|ucb ; ex|
|000004a0| 70 6f 72 74 20 50 41 54 | 48 0a 65 63 68 6f 20 49 |port PAT|H.echo I|
|000004b0| 66 20 74 68 69 73 20 61 | 72 63 68 69 76 65 20 69 |f this a|rchive i|
|000004c0| 73 20 63 6f 6d 70 6c 65 | 74 65 2c 20 79 6f 75 20 |s comple|te, you |
|000004d0| 77 69 6c 6c 20 73 65 65 | 20 74 68 65 20 66 6f 6c |will see| the fol|
|000004e0| 6c 6f 77 69 6e 67 20 6d | 65 73 73 61 67 65 3a 0a |lowing m|essage:.|
|000004f0| 65 63 68 6f 20 27 20 20 | 20 20 20 20 20 20 20 20 |echo ' | |
|00000500| 22 73 68 61 72 3a 20 45 | 6e 64 20 6f 66 20 61 72 |"shar: E|nd of ar|
|00000510| 63 68 69 76 65 20 35 20 | 28 6f 66 20 35 29 2e 22 |chive 5 |(of 5)."|
|00000520| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 4c 6f |'.if tes|t -f 'Lo|
|00000530| 6e 67 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |ng' -a "|${1}" !=|
|00000540| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00000550| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00000560| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00000570| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4c 6f 6e |ting fil|e \"'Lon|
|00000580| 67 27 5c 22 0a 65 6c 73 | 65 0a 20 20 65 63 68 6f |g'\".els|e. echo|
|00000590| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|000005a0| 67 20 5c 22 27 4c 6f 6e | 67 27 5c 22 20 5c 28 31 |g \"'Lon|g'\" \(1|
|000005b0| 31 33 39 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |139 char|acters\)|
|000005c0| 0a 20 20 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |. sed "|s/^X//" |
|000005d0| 3e 27 4c 6f 6e 67 27 20 | 3c 3c 27 45 4e 44 5f 4f |>'Long' |<<'END_O|
|000005e0| 46 5f 46 49 4c 45 27 0a | 58 0a 58 50 72 69 6f 72 |F_FILE'.|X.XPrior|
|000005f0| 20 74 6f 20 76 65 72 73 | 69 6f 6e 20 32 2c 20 4f | to vers|ion 2, O|
|00000600| 72 61 70 65 72 6c 20 63 | 6f 75 6c 64 20 6e 6f 74 |raperl c|ould not|
|00000610| 20 68 61 6e 64 6c 65 20 | 74 61 62 6c 65 73 20 77 | handle |tables w|
|00000620| 68 69 63 68 20 63 6f 6e | 74 61 69 6e 65 64 0a 58 |hich con|tained.X|
|00000630| 4c 4f 4e 47 20 6f 72 20 | 4c 4f 4e 47 52 41 57 20 |LONG or |LONGRAW |
|00000640| 64 61 74 61 74 79 70 65 | 73 2e 0a 58 0a 58 54 68 |datatype|s..X.XTh|
|00000650| 65 20 72 65 61 73 6f 6e | 20 66 6f 72 20 74 68 69 |e reason| for thi|
|00000660| 73 20 69 73 20 74 68 61 | 74 20 74 68 65 20 4f 43 |s is tha|t the OC|
|00000670| 49 20 6f 64 73 63 20 66 | 75 6e 63 74 69 6f 6e 2c |I odsc f|unction,|
|00000680| 20 77 68 69 63 68 20 4f | 72 61 70 65 72 6c 20 75 | which O|raperl u|
|00000690| 73 65 73 0a 58 74 6f 20 | 64 65 74 65 72 6d 69 6e |ses.Xto |determin|
|000006a0| 65 20 74 68 65 20 61 6d | 6f 75 6e 74 20 6f 66 20 |e the am|ount of |
|000006b0| 62 75 66 66 65 72 20 73 | 70 61 63 65 20 74 6f 20 |buffer s|pace to |
|000006c0| 61 6c 6c 6f 63 61 74 65 | 20 66 6f 72 20 65 61 63 |allocate| for eac|
|000006d0| 68 20 66 69 65 6c 64 2c | 0a 58 64 6f 65 73 20 6e |h field,|.Xdoes n|
|000006e0| 6f 74 20 72 65 74 75 72 | 6e 20 61 20 6d 65 61 6e |ot retur|n a mean|
|000006f0| 69 6e 67 66 75 6c 20 72 | 65 73 70 6f 6e 73 65 20 |ingful r|esponse |
|00000700| 69 6e 20 74 68 65 73 65 | 20 63 61 73 65 73 2e 20 |in these| cases. |
|00000710| 41 73 20 61 20 72 65 73 | 75 6c 74 2c 20 61 0a 58 |As a res|ult, a.X|
|00000720| 73 6d 61 6c 6c 20 62 75 | 66 66 65 72 20 77 61 73 |small bu|ffer was|
|00000730| 20 61 6c 6c 6f 63 61 74 | 65 64 20 61 6e 64 20 74 | allocat|ed and t|
|00000740| 68 65 20 64 61 74 61 20 | 77 61 73 20 74 72 75 6e |he data |was trun|
|00000750| 63 61 74 65 64 20 64 75 | 72 69 6e 67 20 74 68 65 |cated du|ring the|
|00000760| 20 66 65 74 63 68 2c 0a | 58 77 68 69 63 68 20 4f | fetch,.|Xwhich O|
|00000770| 72 61 70 65 72 6c 20 74 | 72 65 61 74 65 64 20 61 |raperl t|reated a|
|00000780| 73 20 61 6e 20 65 72 72 | 6f 72 2e 0a 58 0a 58 54 |s an err|or..X.XT|
|00000790| 6f 20 64 65 61 6c 20 77 | 69 74 68 20 4c 4f 4e 47 |o deal w|ith LONG|
|000007a0| 20 64 61 74 61 74 79 70 | 65 73 2c 20 74 77 6f 20 | datatyp|es, two |
|000007b0| 76 61 72 69 61 62 6c 65 | 73 20 68 61 76 65 20 62 |variable|s have b|
|000007c0| 65 65 6e 20 61 64 64 65 | 64 2e 0a 58 0a 58 09 24 |een adde|d..X.X.$|
|000007d0| 6f 72 61 5f 6c 6f 6e 67 | 20 6d 61 79 20 62 65 20 |ora_long| may be |
|000007e0| 73 65 74 20 62 79 20 61 | 20 70 72 6f 67 72 61 6d |set by a| program|
|000007f0| 20 74 6f 20 74 68 65 20 | 6c 65 6e 67 74 68 20 6f | to the |length o|
|00000800| 66 20 62 75 66 66 65 72 | 20 74 6f 0a 58 09 62 65 |f buffer| to.X.be|
|00000810| 20 61 6c 6c 6f 63 61 74 | 65 64 20 66 6f 72 20 61 | allocat|ed for a|
|00000820| 6e 79 20 4c 4f 4e 47 20 | 6f 72 20 4c 4f 4e 47 52 |ny LONG |or LONGR|
|00000830| 41 57 20 66 69 65 6c 64 | 73 20 65 6e 63 6f 75 6e |AW field|s encoun|
|00000840| 74 65 72 65 64 2e 20 49 | 74 0a 58 09 69 73 20 69 |tered. I|t.X.is i|
|00000850| 6e 69 74 69 61 6c 69 73 | 65 64 20 74 6f 20 38 30 |nitialis|ed to 80|
|00000860| 2c 20 61 73 20 74 68 61 | 74 20 69 73 20 74 68 65 |, as tha|t is the|
|00000870| 20 76 61 6c 75 65 20 75 | 73 65 64 20 62 79 20 76 | value u|sed by v|
|00000880| 61 72 69 6f 75 73 0a 58 | 09 4f 72 61 63 6c 65 20 |arious.X|.Oracle |
|00000890| 74 6f 6f 6c 73 2e 0a 58 | 0a 58 09 24 6f 72 61 5f |tools..X|.X.$ora_|
|000008a0| 74 72 75 6e 63 20 69 73 | 20 61 20 66 6c 61 67 20 |trunc is| a flag |
|000008b0| 77 68 69 63 68 20 69 6e | 64 69 63 61 74 65 73 20 |which in|dicates |
|000008c0| 77 68 65 74 68 65 72 20 | 74 72 75 6e 63 61 74 69 |whether |truncati|
|000008d0| 6f 6e 20 6f 66 20 61 0a | 58 09 4c 4f 4e 47 20 69 |on of a.|X.LONG i|
|000008e0| 73 20 74 6f 20 62 65 20 | 63 6f 6e 73 69 64 65 72 |s to be |consider|
|000008f0| 65 64 20 61 6e 20 65 72 | 72 6f 72 20 6f 72 20 70 |ed an er|ror or p|
|00000900| 65 72 6d 69 74 74 65 64 | 2e 20 49 66 20 24 6f 72 |ermitted|. If $or|
|00000910| 61 5f 74 72 75 6e 63 0a | 58 09 69 73 20 7a 65 72 |a_trunc.|X.is zer|
|00000920| 6f 2c 20 74 68 65 6e 20 | 74 72 75 6e 63 61 74 69 |o, then |truncati|
|00000930| 6f 6e 20 6f 66 20 61 20 | 4c 4f 4e 47 20 66 69 65 |on of a |LONG fie|
|00000940| 6c 64 20 63 61 75 73 65 | 73 20 26 6f 72 61 5f 66 |ld cause|s &ora_f|
|00000950| 65 74 63 68 20 74 6f 0a | 58 09 66 61 69 6c 2e 20 |etch to.|X.fail. |
|00000960| 4f 74 68 65 72 77 69 73 | 65 2c 20 74 68 65 20 66 |Otherwis|e, the f|
|00000970| 65 74 63 68 20 63 6f 6d | 70 6c 65 74 65 73 20 73 |etch com|pletes s|
|00000980| 75 63 63 65 73 73 66 75 | 6c 6c 79 2c 20 62 75 74 |uccessfu|lly, but|
|00000990| 20 24 6f 72 61 5f 65 72 | 72 6e 6f 0a 58 09 69 73 | $ora_er|rno.X.is|
|000009a0| 20 73 74 69 6c 6c 20 73 | 65 74 20 28 74 6f 20 31 | still s|et (to 1|
|000009b0| 34 30 36 29 20 74 6f 20 | 77 61 72 6e 20 6f 66 20 |406) to |warn of |
|000009c0| 74 68 65 20 74 72 75 6e | 63 61 74 69 6f 6e 2e 0a |the trun|cation..|
|000009d0| 58 0a 58 26 6f 72 61 5f | 66 65 74 63 68 28 29 20 |X.X&ora_|fetch() |
|000009e0| 61 63 63 65 70 74 73 20 | 61 6e 20 6f 70 74 69 6f |accepts |an optio|
|000009f0| 6e 61 6c 20 73 65 63 6f | 6e 64 20 70 61 72 61 6d |nal seco|nd param|
|00000a00| 65 74 65 72 20 77 68 69 | 63 68 20 6f 76 65 72 72 |eter whi|ch overr|
|00000a10| 69 64 65 73 20 74 68 65 | 0a 58 73 65 74 74 69 6e |ides the|.Xsettin|
|00000a20| 67 20 6f 66 20 24 6f 72 | 61 5f 74 72 75 6e 63 20 |g of $or|a_trunc |
|00000a30| 66 6f 72 20 74 68 61 74 | 20 63 61 6c 6c 2e 0a 58 |for that| call..X|
|00000a40| 0a 58 54 72 75 6e 63 61 | 74 69 6f 6e 20 6f 66 20 |.XTrunca|tion of |
|00000a50| 61 6c 6c 20 6f 74 68 65 | 72 20 64 61 74 61 74 79 |all othe|r dataty|
|00000a60| 70 65 73 20 72 65 6d 61 | 69 6e 73 20 61 6e 20 65 |pes rema|ins an e|
|00000a70| 72 72 6f 72 2e 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |rror..EN|D_OF_FIL|
|00000a80| 45 0a 20 20 69 66 20 74 | 65 73 74 20 31 31 33 39 |E. if t|est 1139|
|00000a90| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 4c 6f | -ne `wc| -c <'Lo|
|00000aa0| 6e 67 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |ng'`; th|en. e|
|00000ab0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 4c 6f 6e |cho shar|: \"'Lon|
|00000ac0| 67 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |g'\" unp|acked wi|
|00000ad0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 20 |th wrong| size!. |
|00000ae0| 20 66 69 0a 20 20 23 20 | 65 6e 64 20 6f 66 20 27 | fi. # |end of '|
|00000af0| 4c 6f 6e 67 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |Long'.fi|.if test|
|00000b00| 20 2d 66 20 27 63 6f 6c | 6f 6e 73 2e 63 27 20 2d | -f 'col|ons.c' -|
|00000b10| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00000b20| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00000b30| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00000b40| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00000b50| 66 69 6c 65 20 5c 22 27 | 63 6f 6c 6f 6e 73 2e 63 |file \"'|colons.c|
|00000b60| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|00000b70| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00000b80| 20 5c 22 27 63 6f 6c 6f | 6e 73 2e 63 27 5c 22 20 | \"'colo|ns.c'\" |
|00000b90| 5c 28 31 31 32 38 20 63 | 68 61 72 61 63 74 65 72 |\(1128 c|haracter|
|00000ba0| 73 5c 29 0a 20 20 73 65 | 64 20 22 73 2f 5e 58 2f |s\). se|d "s/^X/|
|00000bb0| 2f 22 20 3e 27 63 6f 6c | 6f 6e 73 2e 63 27 20 3c |/" >'col|ons.c' <|
|00000bc0| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00000bd0| 2f 2a 20 63 6f 6c 6f 6e | 73 2e 63 0a 58 20 2a 0a |/* colon|s.c.X *.|
|00000be0| 58 20 2a 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |X * Retu|rns the |
|00000bf0| 6e 75 6d 62 65 72 20 6f | 66 20 73 75 62 73 74 69 |number o|f substi|
|00000c00| 74 75 74 69 6f 6e 20 76 | 61 72 69 61 62 6c 65 73 |tution v|ariables|
|00000c10| 20 69 6e 20 61 6e 20 53 | 51 4c 20 71 75 65 72 79 | in an S|QL query|
|00000c20| 2e 0a 58 20 2a 2f 0a 58 | 2f 2a 20 43 6f 70 79 72 |..X */.X|/* Copyr|
|00000c30| 69 67 68 74 20 31 39 39 | 31 2c 20 31 39 39 32 20 |ight 199|1, 1992 |
|00000c40| 4b 65 76 69 6e 20 53 74 | 6f 63 6b 2e 0a 58 20 2a |Kevin St|ock..X *|
|00000c50| 0a 58 20 2a 20 59 6f 75 | 20 6d 61 79 20 63 6f 70 |.X * You| may cop|
|00000c60| 79 20 74 68 69 73 20 75 | 6e 64 65 72 20 74 68 65 |y this u|nder the|
|00000c70| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 47 4e | terms o|f the GN|
|00000c80| 55 20 47 65 6e 65 72 61 | 6c 20 50 75 62 6c 69 63 |U Genera|l Public|
|00000c90| 20 4c 69 63 65 6e 73 65 | 2c 0a 58 20 2a 20 6f 72 | License|,.X * or|
|00000ca0| 20 74 68 65 20 41 72 74 | 69 73 74 69 63 20 4c 69 | the Art|istic Li|
|00000cb0| 63 65 6e 73 65 2c 20 63 | 6f 70 69 65 73 20 6f 66 |cense, c|opies of|
|00000cc0| 20 77 68 69 63 68 20 73 | 68 6f 75 6c 64 20 68 61 | which s|hould ha|
|00000cd0| 76 65 20 61 63 63 6f 6d | 70 61 6e 69 65 64 20 79 |ve accom|panied y|
|00000ce0| 6f 75 72 0a 58 20 2a 20 | 50 65 72 6c 20 6b 69 74 |our.X * |Perl kit|
|00000cf0| 2e 0a 58 20 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |..X */.X|.X#inclu|
|00000d00| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 58 23 69 |de <stdi|o.h>.X#i|
|00000d10| 6e 63 6c 75 64 65 20 22 | 45 58 54 45 52 4e 2e 68 |nclude "|EXTERN.h|
|00000d20| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 22 6f 72 61 |".X#incl|ude "ora|
|00000d30| 66 6e 73 2e 68 22 0a 58 | 0a 58 0a 58 69 6e 74 20 |fns.h".X|.X.Xint |
|00000d40| 63 6f 75 6e 74 5f 63 6f | 6c 6f 6e 73 28 73 29 0a |count_co|lons(s).|
|00000d50| 58 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a |Xregiste|r char *|
|00000d60| 73 3b 0a 58 7b 0a 58 09 | 72 65 67 69 73 74 65 72 |s;.X{.X.|register|
|00000d70| 20 69 6e 74 20 6e 20 3d | 20 30 2c 20 63 3b 0a 58 | int n =| 0, c;.X|
|00000d80| 0a 58 09 44 42 55 47 5f | 45 4e 54 45 52 28 22 63 |.X.DBUG_|ENTER("c|
|00000d90| 6f 75 6e 74 5f 63 6f 6c | 6f 6e 73 22 29 3b 0a 58 |ount_col|ons");.X|
|00000da0| 09 44 42 55 47 5f 50 52 | 49 4e 54 28 22 65 6e 74 |.DBUG_PR|INT("ent|
|00000db0| 72 79 22 2c 20 28 22 63 | 6f 75 6e 74 5f 63 6f 6c |ry", ("c|ount_col|
|00000dc0| 6f 6e 73 28 5c 22 25 73 | 5c 22 29 22 2c 20 73 29 |ons(\"%s|\")", s)|
|00000dd0| 29 3b 0a 58 0a 58 09 77 | 68 69 6c 65 20 28 2a 73 |);.X.X.w|hile (*s|
|00000de0| 20 21 3d 20 27 5c 30 27 | 29 0a 58 09 7b 0a 58 09 | != '\0'|).X.{.X.|
|00000df0| 09 69 66 20 28 2a 73 20 | 3d 3d 20 27 3a 27 29 0a |.if (*s |== ':').|
|00000e00| 58 09 09 7b 0a 58 09 09 | 09 2f 2a 20 6e 75 6d 62 |X..{.X..|./* numb|
|00000e10| 65 72 73 20 6d 75 73 74 | 20 62 65 20 75 73 65 64 |ers must| be used|
|00000e20| 20 69 6e 20 73 65 71 75 | 65 6e 63 65 2c 0a 58 09 | in sequ|ence,.X.|
|00000e30| 09 09 20 2a 20 62 75 74 | 20 74 68 65 79 20 6d 61 |.. * but| they ma|
|00000e40| 79 20 62 65 20 72 65 70 | 65 61 74 65 64 20 69 66 |y be rep|eated if|
|00000e50| 20 61 20 70 61 72 61 6d | 65 74 65 72 20 69 73 20 | a param|eter is |
|00000e60| 72 65 75 73 65 64 0a 58 | 09 09 09 20 2a 2f 0a 58 |reused.X|... */.X|
|00000e70| 09 09 09 69 66 20 28 28 | 28 63 20 3d 20 61 74 6f |...if ((|(c = ato|
|00000e80| 69 28 2b 2b 73 29 29 20 | 3c 3d 20 30 29 20 7c 7c |i(++s)) |<= 0) |||
|00000e90| 20 28 63 20 3e 20 6e 2b | 31 29 29 0a 58 09 09 09 | (c > n+|1)).X...|
|00000ea0| 7b 0a 58 09 09 09 20 20 | 20 20 2f 2a 20 6e 75 6d |{.X... | /* num|
|00000eb0| 62 65 72 20 74 6f 6f 20 | 6c 6f 77 20 6f 72 20 6f |ber too |low or o|
|00000ec0| 75 74 20 6f 66 20 73 65 | 71 75 65 6e 63 65 20 2a |ut of se|quence *|
|00000ed0| 2f 0a 58 09 09 09 20 20 | 20 20 44 42 55 47 5f 50 |/.X... | DBUG_P|
|00000ee0| 52 49 4e 54 28 22 65 78 | 69 74 22 2c 0a 58 09 09 |RINT("ex|it",.X..|
|00000ef0| 09 09 28 22 63 6f 75 6e | 74 5f 63 6f 6c 6f 6e 73 |..("coun|t_colons|
|00000f00| 3a 20 67 6f 74 20 25 64 | 2c 20 65 78 70 65 63 74 |: got %d|, expect|
|00000f10| 65 64 20 25 64 22 2c 20 | 63 2c 20 6e 2b 31 29 29 |ed %d", |c, n+1))|
|00000f20| 3b 0a 58 09 09 09 20 20 | 20 20 44 42 55 47 5f 52 |;.X... | DBUG_R|
|00000f30| 45 54 55 52 4e 28 2d 31 | 29 3b 0a 58 09 09 09 7d |ETURN(-1|);.X...}|
|00000f40| 0a 58 09 09 09 65 6c 73 | 65 20 69 66 20 28 63 20 |.X...els|e if (c |
|00000f50| 3d 3d 20 6e 20 2b 20 31 | 29 0a 58 09 09 09 7b 0a |== n + 1|).X...{.|
|00000f60| 58 09 09 09 09 2b 2b 6e | 3b 0a 58 09 09 09 7d 0a |X....++n|;.X...}.|
|00000f70| 58 09 09 09 2f 2a 20 65 | 6c 73 65 20 72 65 70 65 |X.../* e|lse repe|
|00000f80| 61 74 69 6e 67 20 61 20 | 70 72 65 76 69 6f 75 73 |ating a |previous|
|00000f90| 20 70 61 72 61 6d 65 74 | 65 72 20 2a 2f 0a 58 09 | paramet|er */.X.|
|00000fa0| 09 7d 0a 58 09 09 65 6c | 73 65 20 69 66 20 28 2a |.}.X..el|se if (*|
|00000fb0| 73 20 3d 3d 20 27 5c 27 | 27 29 0a 58 09 09 7b 0a |s == '\'|').X..{.|
|00000fc0| 58 09 09 09 77 68 69 6c | 65 20 28 28 2a 2b 2b 73 |X...whil|e ((*++s|
|00000fd0| 20 21 3d 20 27 5c 27 27 | 29 20 26 26 20 28 2a 73 | != '\''|) && (*s|
|00000fe0| 20 21 3d 20 27 5c 30 27 | 29 29 0a 58 09 09 09 09 | != '\0'|)).X....|
|00000ff0| 3b 0a 58 09 09 7d 0a 58 | 09 09 69 66 20 28 2a 73 |;.X..}.X|..if (*s|
|00001000| 20 21 3d 20 27 5c 30 27 | 29 0a 58 09 09 7b 0a 58 | != '\0'|).X..{.X|
|00001010| 09 09 09 2b 2b 73 3b 0a | 58 09 09 7d 0a 58 09 7d |...++s;.|X..}.X.}|
|00001020| 0a 58 0a 58 09 44 42 55 | 47 5f 50 52 49 4e 54 28 |.X.X.DBU|G_PRINT(|
|00001030| 22 65 78 69 74 22 2c 20 | 28 22 63 6f 75 6e 74 5f |"exit", |("count_|
|00001040| 63 6f 6c 6f 6e 73 3a 20 | 72 65 74 75 72 6e 69 6e |colons: |returnin|
|00001050| 67 20 25 64 22 2c 20 6e | 29 29 3b 0a 58 09 44 42 |g %d", n|));.X.DB|
|00001060| 55 47 5f 52 45 54 55 52 | 4e 28 6e 29 3b 0a 58 7d |UG_RETUR|N(n);.X}|
|00001070| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 20 20 69 |.END_OF_|FILE. i|
|00001080| 66 20 74 65 73 74 20 31 | 31 32 38 20 2d 6e 65 20 |f test 1|128 -ne |
|00001090| 60 77 63 20 2d 63 20 3c | 27 63 6f 6c 6f 6e 73 2e |`wc -c <|'colons.|
|000010a0| 63 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |c'`; the|n. ec|
|000010b0| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 63 6f 6c 6f |ho shar:| \"'colo|
|000010c0| 6e 73 2e 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |ns.c'\" |unpacked|
|000010d0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|000010e0| 21 0a 20 20 66 69 0a 20 | 20 23 20 65 6e 64 20 6f |!. fi. | # end o|
|000010f0| 66 20 27 63 6f 6c 6f 6e | 73 2e 63 27 0a 66 69 0a |f 'colon|s.c'.fi.|
|00001100| 69 66 20 74 65 73 74 20 | 2d 66 20 27 64 62 75 67 |if test |-f 'dbug|
|00001110| 2f 4d 61 6b 65 66 69 6c | 65 27 20 2d 61 20 22 24 |/Makefil|e' -a "$|
|00001120| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00001130| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00001140| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00001150| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00001160| 20 5c 22 27 64 62 75 67 | 2f 4d 61 6b 65 66 69 6c | \"'dbug|/Makefil|
|00001170| 65 27 5c 22 0a 65 6c 73 | 65 0a 20 20 65 63 68 6f |e'\".els|e. echo|
|00001180| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00001190| 67 20 5c 22 27 64 62 75 | 67 2f 4d 61 6b 65 66 69 |g \"'dbu|g/Makefi|
|000011a0| 6c 65 27 5c 22 20 5c 28 | 32 38 38 20 63 68 61 72 |le'\" \(|288 char|
|000011b0| 61 63 74 65 72 73 5c 29 | 0a 20 20 73 65 64 20 22 |acters\)|. sed "|
|000011c0| 73 2f 5e 58 2f 2f 22 20 | 3e 27 64 62 75 67 2f 4d |s/^X//" |>'dbug/M|
|000011d0| 61 6b 65 66 69 6c 65 27 | 20 3c 3c 27 45 4e 44 5f |akefile'| <<'END_|
|000011e0| 4f 46 5f 46 49 4c 45 27 | 0a 58 23 20 4d 61 6b 65 |OF_FILE'|.X# Make|
|000011f0| 66 69 6c 65 20 66 6f 72 | 20 46 72 65 64 20 46 69 |file for| Fred Fi|
|00001200| 73 68 27 20 44 42 55 47 | 20 70 61 63 6b 61 67 65 |sh' DBUG| package|
|00001210| 2e 0a 58 23 20 54 68 69 | 73 20 66 69 6c 65 20 69 |..X# Thi|s file i|
|00001220| 73 20 6e 6f 74 20 70 61 | 72 74 20 6f 66 20 74 68 |s not pa|rt of th|
|00001230| 65 20 6f 72 69 67 69 6e | 61 6c 20 70 61 63 6b 61 |e origin|al packa|
|00001240| 67 65 2e 0a 58 23 20 49 | 74 20 69 73 20 69 6e 20 |ge..X# I|t is in |
|00001250| 74 68 65 20 70 75 62 6c | 69 63 20 64 6f 6d 61 69 |the publ|ic domai|
|00001260| 6e 0a 58 0a 58 4c 49 42 | 09 3d 20 64 62 75 67 2e |n.X.XLIB|.= dbug.|
|00001270| 6f 0a 58 0a 58 61 6c 6c | 3a 09 24 28 4c 49 42 29 |o.X.Xall|:.$(LIB)|
|00001280| 20 66 61 63 74 0a 58 0a | 58 66 61 63 74 3a 09 24 | fact.X.|Xfact:.$|
|00001290| 28 4c 49 42 29 20 66 61 | 63 74 2e 6f 0a 58 09 63 |(LIB) fa|ct.o.X.c|
|000012a0| 63 20 2d 6f 20 66 61 63 | 74 20 2d 4f 20 66 61 63 |c -o fac|t -O fac|
|000012b0| 74 2e 6f 20 24 28 4c 49 | 42 29 0a 58 0a 58 66 61 |t.o $(LI|B).X.Xfa|
|000012c0| 63 74 2e 6f 3a 09 64 62 | 75 67 2e 68 0a 58 0a 58 |ct.o:.db|ug.h.X.X|
|000012d0| 63 6c 65 61 6e 3a 0a 58 | 09 72 6d 20 2d 66 20 66 |clean:.X|.rm -f f|
|000012e0| 61 63 74 2e 6f 20 6e 6f | 68 75 70 2e 6f 75 74 20 |act.o no|hup.out |
|000012f0| 63 6f 72 65 0a 58 0a 58 | 63 6c 6f 62 62 65 72 3a |core.X.X|clobber:|
|00001300| 20 63 6c 65 61 6e 0a 58 | 09 72 6d 20 2d 66 20 24 | clean.X|.rm -f $|
|00001310| 28 4c 49 42 29 20 66 61 | 63 74 0a 45 4e 44 5f 4f |(LIB) fa|ct.END_O|
|00001320| 46 5f 46 49 4c 45 0a 20 | 20 69 66 20 74 65 73 74 |F_FILE. | if test|
|00001330| 20 32 38 38 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 288 -ne| `wc -c |
|00001340| 3c 27 64 62 75 67 2f 4d | 61 6b 65 66 69 6c 65 27 |<'dbug/M|akefile'|
|00001350| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00001360| 20 73 68 61 72 3a 20 5c | 22 27 64 62 75 67 2f 4d | shar: \|"'dbug/M|
|00001370| 61 6b 65 66 69 6c 65 27 | 5c 22 20 75 6e 70 61 63 |akefile'|\" unpac|
|00001380| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00001390| 69 7a 65 21 0a 20 20 66 | 69 0a 20 20 23 20 65 6e |ize!. f|i. # en|
|000013a0| 64 20 6f 66 20 27 64 62 | 75 67 2f 4d 61 6b 65 66 |d of 'db|ug/Makef|
|000013b0| 69 6c 65 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |ile'.fi.|if test |
|000013c0| 2d 66 20 27 64 62 75 67 | 2f 52 65 61 64 6d 65 27 |-f 'dbug|/Readme'|
|000013d0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000013e0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000013f0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00001400| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00001410| 67 20 66 69 6c 65 20 5c | 22 27 64 62 75 67 2f 52 |g file \|"'dbug/R|
|00001420| 65 61 64 6d 65 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |eadme'\"|.else. |
|00001430| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00001440| 63 74 69 6e 67 20 5c 22 | 27 64 62 75 67 2f 52 65 |cting \"|'dbug/Re|
|00001450| 61 64 6d 65 27 5c 22 20 | 5c 28 39 31 34 20 63 68 |adme'\" |\(914 ch|
|00001460| 61 72 61 63 74 65 72 73 | 5c 29 0a 20 20 73 65 64 |aracters|\). sed|
|00001470| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 64 62 75 67 | "s/^X//|" >'dbug|
|00001480| 2f 52 65 61 64 6d 65 27 | 20 3c 3c 27 45 4e 44 5f |/Readme'| <<'END_|
|00001490| 4f 46 5f 46 49 4c 45 27 | 0a 58 54 68 69 73 20 64 |OF_FILE'|.XThis d|
|000014a0| 69 72 65 63 74 6f 72 79 | 20 63 6f 6e 74 61 69 6e |irectory| contain|
|000014b0| 73 20 46 72 65 64 20 46 | 69 73 68 27 20 69 6e 74 |s Fred F|ish' int|
|000014c0| 65 72 6e 61 6c 20 64 65 | 62 75 67 67 69 6e 67 20 |ernal de|bugging |
|000014d0| 70 61 63 6b 61 67 65 20 | 44 42 55 47 2e 0a 58 0a |package |DBUG..X.|
|000014e0| 58 54 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 66 69 |XThe ori|ginal fi|
|000014f0| 6c 65 73 20 61 72 65 0a | 58 0a 58 09 64 62 75 67 |les are.|X.X.dbug|
|00001500| 2e 63 09 09 63 6f 64 65 | 20 66 6f 72 20 74 68 65 |.c..code| for the|
|00001510| 20 64 65 62 75 67 67 69 | 6e 67 20 6c 69 62 72 61 | debuggi|ng libra|
|00001520| 72 79 0a 58 09 64 62 75 | 67 2e 68 09 09 68 65 61 |ry.X.dbu|g.h..hea|
|00001530| 64 65 72 20 66 69 6c 65 | 20 66 6f 72 20 64 65 62 |der file| for deb|
|00001540| 75 67 67 65 64 20 70 72 | 6f 67 72 61 6d 73 0a 58 |ugged pr|ograms.X|
|00001550| 09 64 62 75 67 2e 70 09 | 09 64 6f 63 75 6d 65 6e |.dbug.p.|.documen|
|00001560| 74 61 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 6c |tation f|or the l|
|00001570| 69 62 72 61 72 79 0a 58 | 0a 58 54 6f 20 74 68 65 |ibrary.X|.XTo the|
|00001580| 73 65 20 49 20 68 61 76 | 65 20 61 64 64 65 64 0a |se I hav|e added.|
|00001590| 58 0a 58 09 4d 61 6b 65 | 66 69 6c 65 09 62 75 69 |X.X.Make|file.bui|
|000015a0| 6c 64 73 20 64 62 75 67 | 2e 6f 20 61 6e 64 20 74 |lds dbug|.o and t|
|000015b0| 68 65 20 73 61 6d 70 6c | 65 20 70 72 6f 67 72 61 |he sampl|e progra|
|000015c0| 6d 0a 58 09 52 65 61 64 | 6d 65 09 09 74 68 69 73 |m.X.Read|me..this|
|000015d0| 20 66 69 6c 65 21 0a 58 | 09 64 62 75 67 2e 71 72 | file!.X|.dbug.qr|
|000015e0| 09 09 61 20 71 75 69 63 | 6b 20 72 65 66 65 72 65 |..a quic|k refere|
|000015f0| 6e 63 65 20 73 68 65 65 | 74 20 66 6f 72 20 74 68 |nce shee|t for th|
|00001600| 65 20 6c 69 62 72 61 72 | 79 0a 58 09 66 61 63 74 |e librar|y.X.fact|
|00001610| 2e 63 09 09 74 68 65 20 | 73 61 6d 70 6c 65 20 70 |.c..the |sample p|
|00001620| 72 6f 67 72 61 6d 20 66 | 72 6f 6d 20 74 68 65 20 |rogram f|rom the |
|00001630| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 0a 58 0a |document|ation.X.|
|00001640| 58 74 68 65 20 6d 61 6b | 65 20 74 61 72 67 65 74 |Xthe mak|e target|
|00001650| 73 20 61 72 65 0a 58 0a | 58 09 61 6c 6c 20 28 64 |s are.X.|X.all (d|
|00001660| 65 66 61 75 6c 74 29 09 | 64 62 75 67 2e 6f 20 61 |efault).|dbug.o a|
|00001670| 6e 64 20 66 61 63 74 0a | 58 09 64 62 75 67 2e 6f |nd fact.|X.dbug.o|
|00001680| 09 09 74 68 65 20 64 65 | 62 75 67 67 69 6e 67 20 |..the de|bugging |
|00001690| 6c 69 62 72 61 72 79 2c | 20 72 65 61 64 79 20 66 |library,| ready f|
|000016a0| 6f 72 20 6c 69 6e 6b 69 | 6e 67 0a 58 09 66 61 63 |or linki|ng.X.fac|
|000016b0| 74 09 09 74 68 65 20 73 | 61 6d 70 6c 65 20 70 72 |t..the s|ample pr|
|000016c0| 6f 67 72 61 6d 2c 20 6c | 69 6e 6b 65 64 20 61 6e |ogram, l|inked an|
|000016d0| 64 20 72 65 61 64 79 20 | 74 6f 20 74 65 73 74 2d |d ready |to test-|
|000016e0| 64 72 69 76 65 0a 58 0a | 58 49 20 68 69 67 68 6c |drive.X.|XI highl|
|000016f0| 79 20 72 65 63 6f 6d 6d | 65 6e 64 20 74 68 69 73 |y recomm|end this|
|00001700| 20 70 61 63 6b 61 67 65 | 2e 20 49 74 20 69 73 20 | package|. It is |
|00001710| 63 6f 6e 66 69 67 75 72 | 61 62 6c 65 20 61 74 20 |configur|able at |
|00001720| 72 75 6e 20 74 69 6d 65 | 2c 20 61 6c 6c 6f 77 69 |run time|, allowi|
|00001730| 6e 67 0a 58 74 68 65 20 | 64 65 62 75 67 67 69 6e |ng.Xthe |debuggin|
|00001740| 67 20 74 72 61 63 65 20 | 74 6f 20 62 65 20 6c 69 |g trace |to be li|
|00001750| 6d 69 74 65 64 2c 20 66 | 6f 72 20 65 78 61 6d 70 |mited, f|or examp|
|00001760| 6c 65 2c 20 74 6f 20 73 | 65 6c 65 63 74 65 64 20 |le, to s|elected |
|00001770| 66 75 6e 63 74 69 6f 6e | 73 20 61 6e 64 2f 6f 72 |function|s and/or|
|00001780| 0a 58 74 79 70 65 73 20 | 6f 66 20 6f 70 65 72 61 |.Xtypes |of opera|
|00001790| 74 69 6f 6e 2e 20 49 66 | 20 75 73 65 64 20 77 69 |tion. If| used wi|
|000017a0| 64 65 6c 79 2c 20 69 74 | 20 61 6c 73 6f 20 67 75 |dely, it| also gu|
|000017b0| 61 72 61 6e 74 65 65 73 | 20 61 20 63 6f 6e 73 69 |arantees| a consi|
|000017c0| 73 74 65 6e 74 20 64 65 | 62 75 67 67 69 6e 67 0a |stent de|bugging.|
|000017d0| 58 69 6e 74 65 72 66 61 | 63 65 20 61 63 72 6f 73 |Xinterfa|ce acros|
|000017e0| 73 20 64 69 66 66 65 72 | 65 6e 74 20 70 72 6f 67 |s differ|ent prog|
|000017f0| 72 61 6d 73 2e 20 49 74 | 20 69 73 20 69 6e 20 74 |rams. It| is in t|
|00001800| 68 65 20 70 75 62 6c 69 | 63 20 64 6f 6d 61 69 6e |he publi|c domain|
|00001810| 20 28 73 65 65 20 74 68 | 65 0a 58 68 65 61 64 65 | (see th|e.Xheade|
|00001820| 72 20 63 6f 6d 6d 65 6e | 74 20 69 6e 20 64 62 75 |r commen|t in dbu|
|00001830| 67 2e 5b 63 68 5d 20 66 | 6f 72 20 64 65 74 61 69 |g.[ch] f|or detai|
|00001840| 6c 73 29 2e 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ls)..END|_OF_FILE|
|00001850| 0a 20 20 69 66 20 74 65 | 73 74 20 39 31 34 20 2d |. if te|st 914 -|
|00001860| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 64 62 75 67 |ne `wc -|c <'dbug|
|00001870| 2f 52 65 61 64 6d 65 27 | 60 3b 20 74 68 65 6e 0a |/Readme'|`; then.|
|00001880| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00001890| 22 27 64 62 75 67 2f 52 | 65 61 64 6d 65 27 5c 22 |"'dbug/R|eadme'\"|
|000018a0| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|000018b0| 72 6f 6e 67 20 73 69 7a | 65 21 0a 20 20 66 69 0a |rong siz|e!. fi.|
|000018c0| 20 20 23 20 65 6e 64 20 | 6f 66 20 27 64 62 75 67 | # end |of 'dbug|
|000018d0| 2f 52 65 61 64 6d 65 27 | 0a 66 69 0a 69 66 20 74 |/Readme'|.fi.if t|
|000018e0| 65 73 74 20 2d 66 20 27 | 64 62 75 67 2f 66 61 63 |est -f '|dbug/fac|
|000018f0| 74 2e 63 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |t.c' -a |"${1}" !|
|00001900| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00001910| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00001920| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00001930| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 64 62 |sting fi|le \"'db|
|00001940| 75 67 2f 66 61 63 74 2e | 63 27 5c 22 0a 65 6c 73 |ug/fact.|c'\".els|
|00001950| 65 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 45 |e. echo| shar: E|
|00001960| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 64 62 75 |xtractin|g \"'dbu|
|00001970| 67 2f 66 61 63 74 2e 63 | 27 5c 22 20 5c 28 39 32 |g/fact.c|'\" \(92|
|00001980| 34 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 20 |4 charac|ters\). |
|00001990| 20 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 | sed "s/|^X//" >'|
|000019a0| 64 62 75 67 2f 66 61 63 | 74 2e 63 27 20 3c 3c 27 |dbug/fac|t.c' <<'|
|000019b0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|000019c0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 65 78 61 | This is| the exa|
|000019d0| 6d 70 6c 65 20 66 72 6f | 6d 20 74 68 65 20 44 42 |mple fro|m the DB|
|000019e0| 55 47 20 6d 61 6e 75 61 | 6c 2e 20 2a 2f 0a 58 0a |UG manua|l. */.X.|
|000019f0| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |X#includ|e <stdio|
|00001a00| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 20 22 64 |.h>.X#in|clude "d|
|00001a10| 62 75 67 2e 68 22 0a 58 | 0a 58 0a 58 6d 61 69 6e |bug.h".X|.X.Xmain|
|00001a20| 20 28 61 72 67 63 2c 20 | 61 72 67 76 29 0a 58 69 | (argc, |argv).Xi|
|00001a30| 6e 74 20 61 72 67 63 3b | 0a 58 63 68 61 72 20 2a |nt argc;|.Xchar *|
|00001a40| 61 72 67 76 5b 5d 3b 0a | 58 7b 0a 58 20 20 20 20 |argv[];.|X{.X |
|00001a50| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 72 65 73 |register| int res|
|00001a60| 75 6c 74 2c 20 69 78 3b | 0a 58 20 20 20 20 65 78 |ult, ix;|.X ex|
|00001a70| 74 65 72 6e 20 69 6e 74 | 20 66 61 63 74 6f 72 69 |tern int| factori|
|00001a80| 61 6c 20 28 29 2c 20 61 | 74 6f 69 20 28 29 3b 0a |al (), a|toi ();.|
|00001a90| 58 0a 58 20 20 20 20 44 | 42 55 47 5f 45 4e 54 45 |X.X D|BUG_ENTE|
|00001aa0| 52 20 28 22 6d 61 69 6e | 22 29 3b 0a 58 20 20 20 |R ("main|");.X |
|00001ab0| 20 44 42 55 47 5f 50 52 | 4f 43 45 53 53 20 28 61 | DBUG_PR|OCESS (a|
|00001ac0| 72 67 76 5b 30 5d 29 3b | 0a 58 20 20 20 20 66 6f |rgv[0]);|.X fo|
|00001ad0| 72 20 28 69 78 20 3d 20 | 31 3b 20 69 78 20 3c 20 |r (ix = |1; ix < |
|00001ae0| 61 72 67 63 20 26 26 20 | 61 72 67 76 5b 69 78 5d |argc && |argv[ix]|
|00001af0| 5b 30 5d 20 3d 3d 20 27 | 2d 27 3b 20 69 78 2b 2b |[0] == '|-'; ix++|
|00001b00| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 73 77 69 |) {.X | swi|
|00001b10| 74 63 68 20 28 61 72 67 | 76 5b 69 78 5d 5b 31 5d |tch (arg|v[ix][1]|
|00001b20| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00001b30| 20 63 61 73 65 20 27 23 | 27 3a 0a 58 20 20 20 20 | case '#|':.X |
|00001b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 44 42 55 47 | | DBUG|
|00001b50| 5f 50 55 53 48 20 28 26 | 28 61 72 67 76 5b 69 78 |_PUSH (&|(argv[ix|
|00001b60| 5d 5b 32 5d 29 29 3b 0a | 58 20 20 20 20 20 20 20 |][2]));.|X |
|00001b70| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|00001b80| 58 20 20 20 20 20 20 20 | 20 7d 0a 58 20 20 20 20 |X | }.X |
|00001b90| 7d 0a 58 20 20 20 20 66 | 6f 72 20 28 3b 20 69 78 |}.X f|or (; ix|
|00001ba0| 20 3c 20 61 72 67 63 3b | 20 69 78 2b 2b 29 20 7b | < argc;| ix++) {|
|00001bb0| 0a 58 20 20 20 20 20 20 | 20 20 44 42 55 47 5f 50 |.X | DBUG_P|
|00001bc0| 52 49 4e 54 20 28 22 61 | 72 67 73 22 2c 20 28 22 |RINT ("a|rgs", ("|
|00001bd0| 61 72 67 76 5b 25 64 5d | 20 3d 20 25 73 22 2c 20 |argv[%d]| = %s", |
|00001be0| 69 78 2c 20 61 72 67 76 | 5b 69 78 5d 29 29 3b 0a |ix, argv|[ix]));.|
|00001bf0| 58 20 20 20 20 20 20 20 | 20 72 65 73 75 6c 74 20 |X | result |
|00001c00| 3d 20 66 61 63 74 6f 72 | 69 61 6c 20 28 61 74 6f |= factor|ial (ato|
|00001c10| 69 20 28 61 72 67 76 5b | 69 78 5d 29 29 3b 0a 58 |i (argv[|ix]));.X|
|00001c20| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 20 28 | |printf (|
|00001c30| 22 25 64 5c 6e 22 2c 20 | 72 65 73 75 6c 74 29 3b |"%d\n", |result);|
|00001c40| 0a 58 20 20 20 20 7d 0a | 58 20 20 20 20 44 42 55 |.X }.|X DBU|
|00001c50| 47 5f 52 45 54 55 52 4e | 20 28 30 29 3b 0a 58 7d |G_RETURN| (0);.X}|
|00001c60| 0a 58 0a 58 0a 58 69 6e | 74 20 66 61 63 74 6f 72 |.X.X.Xin|t factor|
|00001c70| 69 61 6c 20 28 76 61 6c | 75 65 29 0a 58 72 65 67 |ial (val|ue).Xreg|
|00001c80| 69 73 74 65 72 20 69 6e | 74 20 76 61 6c 75 65 3b |ister in|t value;|
|00001c90| 0a 58 7b 0a 58 20 20 20 | 20 44 42 55 47 5f 45 4e |.X{.X | DBUG_EN|
|00001ca0| 54 45 52 20 28 22 66 61 | 63 74 6f 72 69 61 6c 22 |TER ("fa|ctorial"|
|00001cb0| 29 3b 0a 58 20 20 20 20 | 44 42 55 47 5f 50 52 49 |);.X |DBUG_PRI|
|00001cc0| 4e 54 20 28 22 66 69 6e | 64 22 2c 20 28 22 66 69 |NT ("fin|d", ("fi|
|00001cd0| 6e 64 20 25 64 20 66 61 | 63 74 6f 72 69 61 6c 22 |nd %d fa|ctorial"|
|00001ce0| 2c 20 76 61 6c 75 65 29 | 29 3b 0a 58 20 20 20 20 |, value)|);.X |
|00001cf0| 69 66 20 28 76 61 6c 75 | 65 20 3e 20 31 29 20 7b |if (valu|e > 1) {|
|00001d00| 0a 58 20 20 20 20 20 20 | 20 20 76 61 6c 75 65 20 |.X | value |
|00001d10| 2a 3d 20 66 61 63 74 6f | 72 69 61 6c 20 28 76 61 |*= facto|rial (va|
|00001d20| 6c 75 65 20 2d 20 31 29 | 3b 0a 58 20 20 20 20 7d |lue - 1)|;.X }|
|00001d30| 0a 58 20 20 20 20 44 42 | 55 47 5f 50 52 49 4e 54 |.X DB|UG_PRINT|
|00001d40| 20 28 22 72 65 73 75 6c | 74 22 2c 20 28 22 72 65 | ("resul|t", ("re|
|00001d50| 73 75 6c 74 20 69 73 20 | 25 64 22 2c 20 76 61 6c |sult is |%d", val|
|00001d60| 75 65 29 29 3b 0a 58 20 | 20 20 20 44 42 55 47 5f |ue));.X | DBUG_|
|00001d70| 52 45 54 55 52 4e 20 28 | 76 61 6c 75 65 29 3b 0a |RETURN (|value);.|
|00001d80| 58 7d 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 20 |X}.END_O|F_FILE. |
|00001d90| 20 69 66 20 74 65 73 74 | 20 39 32 34 20 2d 6e 65 | if test| 924 -ne|
|00001da0| 20 60 77 63 20 2d 63 20 | 3c 27 64 62 75 67 2f 66 | `wc -c |<'dbug/f|
|00001db0| 61 63 74 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |act.c'`;| then. |
|00001dc0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00001dd0| 64 62 75 67 2f 66 61 63 | 74 2e 63 27 5c 22 20 75 |dbug/fac|t.c'\" u|
|00001de0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00001df0| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00001e00| 23 20 65 6e 64 20 6f 66 | 20 27 64 62 75 67 2f 66 |# end of| 'dbug/f|
|00001e10| 61 63 74 2e 63 27 0a 66 | 69 0a 69 66 20 74 65 73 |act.c'.f|i.if tes|
|00001e20| 74 20 2d 66 20 27 64 6f | 63 2f 4d 61 6b 65 66 69 |t -f 'do|c/Makefi|
|00001e30| 6c 65 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |le' -a "|${1}" !=|
|00001e40| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001e50| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001e60| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001e70| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 64 6f 63 |ting fil|e \"'doc|
|00001e80| 2f 4d 61 6b 65 66 69 6c | 65 27 5c 22 0a 65 6c 73 |/Makefil|e'\".els|
|00001e90| 65 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 45 |e. echo| shar: E|
|00001ea0| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 64 6f 63 |xtractin|g \"'doc|
|00001eb0| 2f 4d 61 6b 65 66 69 6c | 65 27 5c 22 20 5c 28 32 |/Makefil|e'\" \(2|
|00001ec0| 32 37 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |27 chara|cters\).|
|00001ed0| 20 20 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e | sed "s|/^X//" >|
|00001ee0| 27 64 6f 63 2f 4d 61 6b | 65 66 69 6c 65 27 20 3c |'doc/Mak|efile' <|
|00001ef0| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00001f00| 23 20 4d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 4f |# Makefi|le for O|
|00001f10| 72 61 70 65 72 6c 20 64 | 6f 63 75 6d 65 6e 74 61 |raperl d|ocumenta|
|00001f20| 74 69 6f 6e 0a 58 0a 58 | 4e 52 4f 46 46 09 3d 20 |tion.X.X|NROFF.= |
|00001f30| 6e 72 6f 66 66 0a 58 0a | 58 64 6f 63 73 3a 0a 58 |nroff.X.|Xdocs:.X|
|00001f40| 09 24 28 4e 52 4f 46 46 | 29 20 2d 6d 61 6e 20 6f |.$(NROFF|) -man o|
|00001f50| 72 61 70 65 72 6c 2e 31 | 20 3e 6f 72 61 70 65 72 |raperl.1| >oraper|
|00001f60| 6c 2e 6d 61 6e 0a 58 09 | 24 28 4e 52 4f 46 46 29 |l.man.X.|$(NROFF)|
|00001f70| 20 6f 72 61 70 65 72 6c | 2e 72 65 66 20 3e 6f 72 | oraperl|.ref >or|
|00001f80| 61 70 65 72 6c 2e 72 65 | 66 2e 70 72 0a 58 09 24 |aperl.re|f.pr.X.$|
|00001f90| 28 4e 52 4f 46 46 29 20 | 2d 6d 61 6e 20 2e 2e 2f |(NROFF) |-man ../|
|00001fa0| 65 78 61 6d 70 6c 65 73 | 2f 73 71 6c 20 3e 73 71 |examples|/sql >sq|
|00001fb0| 6c 2e 6d 61 6e 0a 58 0a | 58 63 6c 6f 62 62 65 72 |l.man.X.|Xclobber|
|00001fc0| 3a 0a 58 09 72 6d 20 2d | 66 20 6f 72 61 70 65 72 |:.X.rm -|f oraper|
|00001fd0| 6c 2e 6d 61 6e 20 6f 72 | 61 70 65 72 6c 2e 72 65 |l.man or|aperl.re|
|00001fe0| 66 2e 70 72 20 73 71 6c | 2e 6d 61 6e 0a 45 4e 44 |f.pr sql|.man.END|
|00001ff0| 5f 4f 46 5f 46 49 4c 45 | 0a 20 20 69 66 20 74 65 |_OF_FILE|. if te|
|00002000| 73 74 20 32 32 37 20 2d | 6e 65 20 60 77 63 20 2d |st 227 -|ne `wc -|
|00002010| 63 20 3c 27 64 6f 63 2f | 4d 61 6b 65 66 69 6c 65 |c <'doc/|Makefile|
|00002020| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00002030| 6f 20 73 68 61 72 3a 20 | 5c 22 27 64 6f 63 2f 4d |o shar: |\"'doc/M|
|00002040| 61 6b 65 66 69 6c 65 27 | 5c 22 20 75 6e 70 61 63 |akefile'|\" unpac|
|00002050| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00002060| 69 7a 65 21 0a 20 20 66 | 69 0a 20 20 23 20 65 6e |ize!. f|i. # en|
|00002070| 64 20 6f 66 20 27 64 6f | 63 2f 4d 61 6b 65 66 69 |d of 'do|c/Makefi|
|00002080| 6c 65 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |le'.fi.i|f test -|
|00002090| 66 20 27 65 78 61 6d 70 | 6c 65 73 2f 52 65 61 64 |f 'examp|les/Read|
|000020a0| 6d 65 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |me' -a "|${1}" !=|
|000020b0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|000020c0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|000020d0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|000020e0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 65 78 61 |ting fil|e \"'exa|
|000020f0| 6d 70 6c 65 73 2f 52 65 | 61 64 6d 65 27 5c 22 0a |mples/Re|adme'\".|
|00002100| 65 6c 73 65 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |else. e|cho shar|
|00002110| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00002120| 65 78 61 6d 70 6c 65 73 | 2f 52 65 61 64 6d 65 27 |examples|/Readme'|
|00002130| 5c 22 20 5c 28 31 30 35 | 31 20 63 68 61 72 61 63 |\" \(105|1 charac|
|00002140| 74 65 72 73 5c 29 0a 20 | 20 73 65 64 20 22 73 2f |ters\). | sed "s/|
|00002150| 5e 58 2f 2f 22 20 3e 27 | 65 78 61 6d 70 6c 65 73 |^X//" >'|examples|
|00002160| 2f 52 65 61 64 6d 65 27 | 20 3c 3c 27 45 4e 44 5f |/Readme'| <<'END_|
|00002170| 4f 46 5f 46 49 4c 45 27 | 0a 58 54 68 69 73 20 64 |OF_FILE'|.XThis d|
|00002180| 69 72 65 63 74 6f 72 79 | 20 63 6f 6e 74 61 69 6e |irectory| contain|
|00002190| 73 20 61 20 66 65 77 20 | 73 61 6d 70 6c 65 20 4f |s a few |sample O|
|000021a0| 72 61 70 65 72 6c 20 73 | 63 72 69 70 74 73 2e 20 |raperl s|cripts. |
|000021b0| 53 6f 6d 65 20 61 72 65 | 20 67 65 6e 75 69 6e 65 |Some are| genuine|
|000021c0| 6c 79 0a 58 75 73 65 66 | 75 6c 20 28 73 71 6c 2c |ly.Xusef|ul (sql,|
|000021d0| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 69 73 | for exa|mple, is|
|000021e0| 20 69 6e 73 74 61 6c 6c | 65 64 20 61 73 20 70 61 | install|ed as pa|
|000021f0| 72 74 20 6f 66 20 6d 61 | 6b 65 20 69 6e 73 74 61 |rt of ma|ke insta|
|00002200| 6c 6c 29 20 77 68 69 6c | 65 0a 58 6f 74 68 65 72 |ll) whil|e.Xother|
|00002210| 73 20 61 72 65 20 6a 75 | 73 74 20 64 65 6d 6f 6e |s are ju|st demon|
|00002220| 73 74 72 61 74 69 6f 6e | 73 20 6f 66 20 64 69 66 |stration|s of dif|
|00002230| 66 65 72 65 6e 74 20 74 | 68 69 6e 67 73 2e 0a 58 |ferent t|hings..X|
|00002240| 0a 58 62 69 6e 64 2e 70 | 6c 09 09 44 65 6d 6f 6e |.Xbind.p|l..Demon|
|00002250| 73 74 72 61 74 65 73 20 | 68 6f 77 20 26 6f 72 61 |strates |how &ora|
|00002260| 5f 62 69 6e 64 28 29 20 | 61 6e 64 20 26 6f 72 61 |_bind() |and &ora|
|00002270| 5f 66 65 74 63 68 28 29 | 20 6d 61 79 20 62 65 0a |_fetch()| may be.|
|00002280| 58 09 09 63 6f 6d 62 69 | 6e 65 64 20 74 6f 20 6d |X..combi|ned to m|
|00002290| 61 6b 65 20 61 20 73 69 | 6d 70 6c 65 20 74 61 62 |ake a si|mple tab|
|000022a0| 6c 65 20 6c 6f 6f 6b 75 | 70 20 70 72 6f 67 72 61 |le looku|p progra|
|000022b0| 6d 0a 58 0a 58 63 6b 64 | 65 62 75 67 2e 70 6c 09 |m.X.Xckd|ebug.pl.|
|000022c0| 44 65 74 65 72 6d 69 6e | 65 73 20 77 68 65 74 68 |Determin|es wheth|
|000022d0| 65 72 20 64 65 62 75 67 | 67 69 6e 67 20 69 73 20 |er debug|ging is |
|000022e0| 61 76 61 69 6c 61 62 6c | 65 0a 58 0a 58 63 6f 6d |availabl|e.X.Xcom|
|000022f0| 6d 69 74 2e 70 6c 09 44 | 65 6d 6f 6e 73 74 72 61 |mit.pl.D|emonstra|
|00002300| 74 65 73 20 74 68 65 20 | 75 73 65 20 6f 66 20 26 |tes the |use of &|
|00002310| 6f 72 61 5f 63 6f 6d 6d | 69 74 28 29 20 61 6e 64 |ora_comm|it() and|
|00002320| 20 26 6f 72 61 5f 72 6f | 6c 6c 62 61 63 6b 28 29 | &ora_ro|llback()|
|00002330| 0a 58 0a 58 65 78 2e 70 | 6c 09 09 54 68 69 73 20 |.X.Xex.p|l..This |
|00002340| 77 61 73 20 6d 79 20 66 | 69 72 73 74 20 65 76 65 |was my f|irst eve|
|00002350| 72 20 4f 72 61 70 65 72 | 6c 20 73 63 72 69 70 74 |r Oraper|l script|
|00002360| 2e 20 49 20 70 72 6f 62 | 61 62 6c 79 20 77 72 6f |. I prob|ably wro|
|00002370| 74 65 20 69 74 0a 58 09 | 09 62 65 66 6f 72 65 20 |te it.X.|.before |
|00002380| 77 72 69 74 69 6e 67 20 | 4f 72 61 70 65 72 6c 21 |writing |Oraperl!|
|00002390| 20 49 74 20 72 65 61 64 | 73 20 64 61 74 61 20 66 | It read|s data f|
|000023a0| 72 6f 6d 20 61 20 74 61 | 62 6c 65 20 61 6e 64 20 |rom a ta|ble and |
|000023b0| 70 72 69 6e 74 73 0a 58 | 09 09 69 74 20 75 73 69 |prints.X|..it usi|
|000023c0| 6e 67 20 61 20 66 6f 72 | 6d 61 74 2e 0a 58 0a 58 |ng a for|mat..X.X|
|000023d0| 6d 6b 64 62 2e 70 6c 09 | 09 43 72 65 61 74 65 73 |mkdb.pl.|.Creates|
|000023e0| 20 61 20 64 61 74 61 62 | 61 73 65 2c 20 70 75 74 | a datab|ase, put|
|000023f0| 73 20 73 6f 6d 65 20 64 | 61 74 61 20 69 6e 74 6f |s some d|ata into|
|00002400| 20 69 74 2c 20 64 72 6f | 70 73 20 69 74 2e 20 54 | it, dro|ps it. T|
|00002410| 68 65 20 6e 69 63 65 0a | 58 09 09 74 68 69 6e 67 |he nice.|X..thing|
|00002420| 20 61 62 6f 75 74 20 74 | 68 69 73 20 69 73 20 74 | about t|his is t|
|00002430| 68 61 74 20 69 74 20 64 | 65 74 65 63 74 73 20 77 |hat it d|etects w|
|00002440| 68 65 74 68 65 72 20 69 | 74 20 69 73 20 72 75 6e |hether i|t is run|
|00002450| 6e 69 6e 67 20 75 6e 64 | 65 72 0a 58 09 09 4f 72 |ning und|er.X..Or|
|00002460| 61 70 65 72 6c 20 6f 72 | 20 43 6f 72 61 70 65 72 |aperl or| Coraper|
|00002470| 6c 2c 20 61 6e 64 20 63 | 68 61 6e 67 65 73 20 69 |l, and c|hanges i|
|00002480| 74 73 20 6f 75 74 70 75 | 74 20 61 63 63 6f 72 64 |ts outpu|t accord|
|00002490| 69 6e 67 6c 79 2e 0a 58 | 0a 58 6f 72 61 64 75 6d |ingly..X|.Xoradum|
|000024a0| 70 2e 70 6c 09 44 75 6d | 70 73 20 74 68 65 20 63 |p.pl.Dum|ps the c|
|000024b0| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 61 6e 20 4f 72 |ontents |of an Or|
|000024c0| 61 63 6c 65 20 74 61 62 | 6c 65 20 69 6e 74 6f 20 |acle tab|le into |
|000024d0| 61 20 73 65 74 20 6f 66 | 20 69 6e 73 65 72 74 0a |a set of| insert.|
|000024e0| 58 09 09 73 74 61 74 65 | 6d 65 6e 74 73 2e 0a 58 |X..state|ments..X|
|000024f0| 0a 58 73 71 6c 09 09 54 | 68 69 73 20 77 61 73 20 |.Xsql..T|his was |
|00002500| 77 72 69 74 74 65 6e 20 | 69 6e 20 72 65 73 70 6f |written |in respo|
|00002510| 6e 73 65 20 74 6f 20 61 | 20 70 6f 73 74 69 6e 67 |nse to a| posting|
|00002520| 20 6f 6e 20 74 68 65 20 | 6e 65 74 2c 20 61 73 6b | on the |net, ask|
|00002530| 69 6e 67 0a 58 09 09 77 | 68 65 74 68 65 72 20 74 |ing.X..w|hether t|
|00002540| 68 65 72 65 20 77 61 73 | 20 61 20 74 6f 6f 6c 20 |here was| a tool |
|00002550| 77 68 69 63 68 20 77 6f | 75 6c 64 20 65 78 65 63 |which wo|uld exec|
|00002560| 75 74 65 20 61 6e 20 53 | 51 4c 20 73 74 61 74 65 |ute an S|QL state|
|00002570| 6d 65 6e 74 0a 58 09 09 | 73 70 65 63 69 66 69 65 |ment.X..|specifie|
|00002580| 64 20 6f 6e 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |d on the| command|
|00002590| 20 6c 69 6e 65 2e 20 4d | 61 6e 75 61 6c 20 70 61 | line. M|anual pa|
|000025a0| 67 65 20 62 75 69 6c 74 | 2d 69 6e 2e 0a 45 4e 44 |ge built|-in..END|
|000025b0| 5f 4f 46 5f 46 49 4c 45 | 0a 20 20 69 66 20 74 65 |_OF_FILE|. if te|
|000025c0| 73 74 20 31 30 35 31 20 | 2d 6e 65 20 60 77 63 20 |st 1051 |-ne `wc |
|000025d0| 2d 63 20 3c 27 65 78 61 | 6d 70 6c 65 73 2f 52 65 |-c <'exa|mples/Re|
|000025e0| 61 64 6d 65 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |adme'`; |then. |
|000025f0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 65 | echo sh|ar: \"'e|
|00002600| 78 61 6d 70 6c 65 73 2f | 52 65 61 64 6d 65 27 5c |xamples/|Readme'\|
|00002610| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00002620| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 20 20 66 69 |wrong si|ze!. fi|
|00002630| 0a 20 20 23 20 65 6e 64 | 20 6f 66 20 27 65 78 61 |. # end| of 'exa|
|00002640| 6d 70 6c 65 73 2f 52 65 | 61 64 6d 65 27 0a 66 69 |mples/Re|adme'.fi|
|00002650| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 65 78 61 |.if test| -f 'exa|
|00002660| 6d 70 6c 65 73 2f 62 69 | 6e 64 2e 70 6c 27 20 2d |mples/bi|nd.pl' -|
|00002670| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00002680| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00002690| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|000026a0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|000026b0| 66 69 6c 65 20 5c 22 27 | 65 78 61 6d 70 6c 65 73 |file \"'|examples|
|000026c0| 2f 62 69 6e 64 2e 70 6c | 27 5c 22 0a 65 6c 73 65 |/bind.pl|'\".else|
|000026d0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |. echo |shar: Ex|
|000026e0| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 65 78 61 6d |tracting| \"'exam|
|000026f0| 70 6c 65 73 2f 62 69 6e | 64 2e 70 6c 27 5c 22 20 |ples/bin|d.pl'\" |
|00002700| 5c 28 35 35 36 20 63 68 | 61 72 61 63 74 65 72 73 |\(556 ch|aracters|
|00002710| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|00002720| 22 20 3e 27 65 78 61 6d | 70 6c 65 73 2f 62 69 6e |" >'exam|ples/bin|
|00002730| 64 2e 70 6c 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |d.pl' <<|'END_OF_|
|00002740| 46 49 4c 45 27 0a 58 23 | 21 2f 75 73 72 2f 6c 6f |FILE'.X#|!/usr/lo|
|00002750| 63 61 6c 2f 62 69 6e 2f | 6f 72 61 70 65 72 6c 0a |cal/bin/|oraperl.|
|00002760| 58 23 0a 58 23 20 62 69 | 6e 64 2e 70 6c 0a 58 23 |X#.X# bi|nd.pl.X#|
|00002770| 0a 58 23 20 54 68 69 73 | 20 73 68 6f 77 73 20 68 |.X# This| shows h|
|00002780| 6f 77 20 74 68 65 20 6f | 72 61 5f 62 69 6e 64 20 |ow the o|ra_bind |
|00002790| 66 75 6e 63 74 69 6f 6e | 20 6d 61 79 20 62 65 20 |function| may be |
|000027a0| 75 73 65 64 20 74 6f 20 | 69 6d 70 6c 65 6d 65 6e |used to |implemen|
|000027b0| 74 20 61 0a 58 23 20 73 | 69 6d 70 6c 65 20 6c 6f |t a.X# s|imple lo|
|000027c0| 6f 6b 75 70 20 73 63 72 | 69 70 74 2e 0a 58 0a 58 |okup scr|ipt..X.X|
|000027d0| 24 6f 72 61 5f 64 65 62 | 75 67 20 3d 20 73 68 69 |$ora_deb|ug = shi|
|000027e0| 66 74 20 69 66 20 24 41 | 52 47 56 5b 30 5d 20 3d |ft if $A|RGV[0] =|
|000027f0| 7e 20 2f 5e 2d 23 2f 3b | 0a 58 0a 58 24 6c 64 61 |~ /^-#/;|.X.X$lda|
|00002800| 20 3d 20 26 6f 72 61 5f | 6c 6f 67 69 6e 28 27 74 | = &ora_|login('t|
|00002810| 27 2c 20 27 6b 73 74 6f | 63 6b 27 2c 20 27 6b 73 |', 'ksto|ck', 'ks|
|00002820| 74 6f 63 6b 27 29 0a 58 | 09 7c 7c 20 64 69 65 20 |tock').X|.|| die |
|00002830| 24 6f 72 61 5f 65 72 72 | 73 74 72 3b 0a 58 24 63 |$ora_err|str;.X$c|
|00002840| 73 72 20 3d 20 26 6f 72 | 61 5f 6f 70 65 6e 28 24 |sr = &or|a_open($|
|00002850| 6c 64 61 2c 20 27 73 65 | 6c 65 63 74 20 70 68 6f |lda, 'se|lect pho|
|00002860| 6e 65 20 66 72 6f 6d 20 | 74 65 6c 6e 6f 20 77 68 |ne from |telno wh|
|00002870| 65 72 65 20 6e 61 6d 65 | 20 3d 20 3a 31 27 29 0a |ere name| = :1').|
|00002880| 58 09 7c 7c 20 64 69 65 | 20 24 6f 72 61 5f 65 72 |X.|| die| $ora_er|
|00002890| 72 73 74 72 3b 0a 58 0a | 58 77 68 69 6c 65 28 3c |rstr;.X.|Xwhile(<|
|000028a0| 53 54 44 49 4e 3e 29 0a | 58 7b 0a 58 09 63 68 6f |STDIN>).|X{.X.cho|
|000028b0| 70 3b 0a 58 09 26 6f 72 | 61 5f 62 69 6e 64 28 24 |p;.X.&or|a_bind($|
|000028c0| 63 73 72 2c 20 24 5f 29 | 09 7c 7c 20 64 69 65 20 |csr, $_)|.|| die |
|000028d0| 24 6f 72 61 5f 65 72 72 | 73 74 72 3b 0a 58 0a 58 |$ora_err|str;.X.X|
|000028e0| 09 69 66 20 28 28 24 70 | 68 6f 6e 65 29 20 3d 20 |.if (($p|hone) = |
|000028f0| 26 6f 72 61 5f 66 65 74 | 63 68 28 24 63 73 72 29 |&ora_fet|ch($csr)|
|00002900| 29 0a 58 09 7b 0a 58 09 | 09 70 72 69 6e 74 20 22 |).X.{.X.|.print "|
|00002910| 24 70 68 6f 6e 65 5c 6e | 22 3b 0a 58 09 7d 0a 58 |$phone\n|";.X.}.X|
|00002920| 09 65 6c 73 65 0a 58 09 | 7b 0a 58 09 09 64 69 65 |.else.X.|{.X..die|
|00002930| 20 24 6f 72 61 5f 65 72 | 72 73 74 72 20 69 66 20 | $ora_er|rstr if |
|00002940| 24 6f 72 61 5f 65 72 72 | 6e 6f 3b 0a 58 09 09 70 |$ora_err|no;.X..p|
|00002950| 72 69 6e 74 20 22 75 6e | 6b 6e 6f 77 6e 5c 6e 22 |rint "un|known\n"|
|00002960| 3b 0a 58 09 7d 0a 58 7d | 0a 58 0a 58 26 6f 72 61 |;.X.}.X}|.X.X&ora|
|00002970| 5f 63 6c 6f 73 65 28 24 | 63 73 72 29 3b 0a 58 26 |_close($|csr);.X&|
|00002980| 6f 72 61 5f 6c 6f 67 6f | 66 66 28 24 6c 64 61 29 |ora_logo|ff($lda)|
|00002990| 3b 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 20 20 |;.END_OF|_FILE. |
|000029a0| 69 66 20 74 65 73 74 20 | 35 35 36 20 2d 6e 65 20 |if test |556 -ne |
|000029b0| 60 77 63 20 2d 63 20 3c | 27 65 78 61 6d 70 6c 65 |`wc -c <|'example|
|000029c0| 73 2f 62 69 6e 64 2e 70 | 6c 27 60 3b 20 74 68 65 |s/bind.p|l'`; the|
|000029d0| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|000029e0| 20 5c 22 27 65 78 61 6d | 70 6c 65 73 2f 62 69 6e | \"'exam|ples/bin|
|000029f0| 64 2e 70 6c 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |d.pl'\" |unpacked|
|00002a00| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00002a10| 21 0a 20 20 66 69 0a 20 | 20 63 68 6d 6f 64 20 2b |!. fi. | chmod +|
|00002a20| 78 20 27 65 78 61 6d 70 | 6c 65 73 2f 62 69 6e 64 |x 'examp|les/bind|
|00002a30| 2e 70 6c 27 0a 20 20 23 | 20 65 6e 64 20 6f 66 20 |.pl'. #| end of |
|00002a40| 27 65 78 61 6d 70 6c 65 | 73 2f 62 69 6e 64 2e 70 |'example|s/bind.p|
|00002a50| 6c 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |l'.fi.if| test -f|
|00002a60| 20 27 65 78 61 6d 70 6c | 65 73 2f 63 6b 64 65 62 | 'exampl|es/ckdeb|
|00002a70| 75 67 2e 70 6c 27 20 2d | 61 20 22 24 7b 31 7d 22 |ug.pl' -|a "${1}"|
|00002a80| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00002a90| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00002aa0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00002ab0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00002ac0| 65 78 61 6d 70 6c 65 73 | 2f 63 6b 64 65 62 75 67 |examples|/ckdebug|
|00002ad0| 2e 70 6c 27 5c 22 0a 65 | 6c 73 65 0a 20 20 65 63 |.pl'\".e|lse. ec|
|00002ae0| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00002af0| 69 6e 67 20 5c 22 27 65 | 78 61 6d 70 6c 65 73 2f |ing \"'e|xamples/|
|00002b00| 63 6b 64 65 62 75 67 2e | 70 6c 27 5c 22 20 5c 28 |ckdebug.|pl'\" \(|
|00002b10| 31 33 38 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |138 char|acters\)|
|00002b20| 0a 20 20 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |. sed "|s/^X//" |
|00002b30| 3e 27 65 78 61 6d 70 6c | 65 73 2f 63 6b 64 65 62 |>'exampl|es/ckdeb|
|00002b40| 75 67 2e 70 6c 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |ug.pl' <|<'END_OF|
|00002b50| 5f 46 49 4c 45 27 0a 58 | 23 21 2f 75 73 72 2f 6c |_FILE'.X|#!/usr/l|
|00002b60| 6f 63 61 6c 2f 62 69 6e | 2f 6f 72 61 70 65 72 6c |ocal/bin|/oraperl|
|00002b70| 0a 58 0a 58 64 65 66 69 | 6e 65 64 28 24 6f 72 61 |.X.Xdefi|ned($ora|
|00002b80| 5f 64 65 62 75 67 29 20 | 26 26 20 70 72 69 6e 74 |_debug) |&& print|
|00002b90| 20 22 64 65 62 75 67 67 | 69 6e 67 20 61 76 61 69 | "debugg|ing avai|
|00002ba0| 6c 61 62 6c 65 5c 6e 22 | 3b 0a 58 64 65 66 69 6e |lable\n"|;.Xdefin|
|00002bb0| 65 64 28 24 6f 72 61 5f | 64 65 62 75 67 29 20 7c |ed($ora_|debug) ||
|00002bc0| 7c 20 70 72 69 6e 74 20 | 22 64 65 62 75 67 67 69 || print |"debuggi|
|00002bd0| 6e 67 20 6e 6f 74 20 61 | 76 61 69 6c 61 62 6c 65 |ng not a|vailable|
|00002be0| 5c 6e 22 3b 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |\n";.END|_OF_FILE|
|00002bf0| 0a 20 20 69 66 20 74 65 | 73 74 20 31 33 38 20 2d |. if te|st 138 -|
|00002c00| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 65 78 61 6d |ne `wc -|c <'exam|
|00002c10| 70 6c 65 73 2f 63 6b 64 | 65 62 75 67 2e 70 6c 27 |ples/ckd|ebug.pl'|
|00002c20| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00002c30| 20 73 68 61 72 3a 20 5c | 22 27 65 78 61 6d 70 6c | shar: \|"'exampl|
|00002c40| 65 73 2f 63 6b 64 65 62 | 75 67 2e 70 6c 27 5c 22 |es/ckdeb|ug.pl'\"|
|00002c50| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00002c60| 72 6f 6e 67 20 73 69 7a | 65 21 0a 20 20 66 69 0a |rong siz|e!. fi.|
|00002c70| 20 20 63 68 6d 6f 64 20 | 2b 78 20 27 65 78 61 6d | chmod |+x 'exam|
|00002c80| 70 6c 65 73 2f 63 6b 64 | 65 62 75 67 2e 70 6c 27 |ples/ckd|ebug.pl'|
|00002c90| 0a 20 20 23 20 65 6e 64 | 20 6f 66 20 27 65 78 61 |. # end| of 'exa|
|00002ca0| 6d 70 6c 65 73 2f 63 6b | 64 65 62 75 67 2e 70 6c |mples/ck|debug.pl|
|00002cb0| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00002cc0| 27 65 78 61 6d 70 6c 65 | 73 2f 65 78 2e 70 6c 27 |'example|s/ex.pl'|
|00002cd0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00002ce0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00002cf0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00002d00| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00002d10| 67 20 66 69 6c 65 20 5c | 22 27 65 78 61 6d 70 6c |g file \|"'exampl|
|00002d20| 65 73 2f 65 78 2e 70 6c | 27 5c 22 0a 65 6c 73 65 |es/ex.pl|'\".else|
|00002d30| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |. echo |shar: Ex|
|00002d40| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 65 78 61 6d |tracting| \"'exam|
|00002d50| 70 6c 65 73 2f 65 78 2e | 70 6c 27 5c 22 20 5c 28 |ples/ex.|pl'\" \(|
|00002d60| 37 33 33 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |733 char|acters\)|
|00002d70| 0a 20 20 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |. sed "|s/^X//" |
|00002d80| 3e 27 65 78 61 6d 70 6c | 65 73 2f 65 78 2e 70 6c |>'exampl|es/ex.pl|
|00002d90| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00002da0| 27 0a 58 23 21 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f |'.X#!/us|r/local/|
|00002db0| 62 69 6e 2f 6f 72 61 70 | 65 72 6c 0a 58 0a 58 24 |bin/orap|erl.X.X$|
|00002dc0| 6f 72 61 5f 64 65 62 75 | 67 20 3d 20 73 68 69 66 |ora_debu|g = shif|
|00002dd0| 74 20 69 66 20 24 41 52 | 47 56 5b 30 5d 20 3d 7e |t if $AR|GV[0] =~|
|00002de0| 20 2f 5e 2d 23 2f 3b 0a | 58 0a 58 66 6f 72 6d 61 | /^-#/;.|X.Xforma|
|00002df0| 74 20 53 54 44 4f 55 54 | 5f 54 4f 50 20 3d 0a 58 |t STDOUT|_TOP =.X|
|00002e00| 20 20 20 20 20 20 20 4e | 61 6d 65 20 20 20 20 20 | N|ame |
|00002e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e20| 20 20 20 20 20 20 50 68 | 6f 6e 65 0a 58 20 20 20 | Ph|one.X |
|00002e30| 20 20 20 20 3d 3d 3d 3d | 20 20 20 20 20 20 20 20 | ====| |
|00002e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e50| 20 20 20 3d 3d 3d 3d 3d | 0a 58 2e 0a 58 0a 58 66 | =====|.X..X.Xf|
|00002e60| 6f 72 6d 61 74 20 53 54 | 44 4f 55 54 20 3d 0a 58 |ormat ST|DOUT =.X|
|00002e70| 20 20 20 20 20 20 20 40 | 3c 3c 3c 3c 3c 3c 3c 3c | @|<<<<<<<<|
|00002e80| 3c 3c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |<< | |
|00002e90| 40 3e 3e 3e 3e 3e 3e 3e | 3e 3e 3e 0a 58 20 20 20 |@>>>>>>>|>>>.X |
|00002ea0| 20 20 20 20 24 6e 61 6d | 65 2c 20 20 20 20 20 20 | $nam|e, |
|00002eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 24 70 68 | | $ph|
|00002ec0| 6f 6e 65 0a 58 2e 0a 58 | 0a 58 64 69 65 20 28 22 |one.X..X|.Xdie ("|
|00002ed0| 59 6f 75 20 73 68 6f 75 | 6c 64 20 75 73 65 20 6f |You shou|ld use o|
|00002ee0| 72 61 70 65 72 6c 2c 20 | 6e 6f 74 20 70 65 72 6c |raperl, |not perl|
|00002ef0| 5c 6e 22 29 20 75 6e 6c | 65 73 73 20 64 65 66 69 |\n") unl|ess defi|
|00002f00| 6e 65 64 20 26 6f 72 61 | 5f 6c 6f 67 69 6e 3b 0a |ned &ora|_login;.|
|00002f10| 58 0a 58 24 6c 64 61 20 | 3d 20 26 6f 72 61 5f 6c |X.X$lda |= &ora_l|
|00002f20| 6f 67 69 6e 28 22 74 22 | 2c 20 22 6b 73 74 6f 63 |ogin("t"|, "kstoc|
|00002f30| 6b 22 2c 20 22 6b 73 74 | 6f 63 6b 22 29 0a 58 09 |k", "kst|ock").X.|
|00002f40| 7c 7c 20 64 69 65 20 24 | 6f 72 61 5f 65 72 72 73 ||| die $|ora_errs|
|00002f50| 74 72 3b 0a 58 24 63 73 | 72 20 3d 20 26 6f 72 61 |tr;.X$cs|r = &ora|
|00002f60| 5f 6f 70 65 6e 28 24 6c | 64 61 2c 20 22 73 65 6c |_open($l|da, "sel|
|00002f70| 65 63 74 20 2a 20 66 72 | 6f 6d 20 74 65 6c 6e 6f |ect * fr|om telno|
|00002f80| 20 6f 72 64 65 72 20 62 | 79 20 6e 61 6d 65 22 2c | order b|y name",|
|00002f90| 20 36 29 0a 58 09 7c 7c | 20 64 69 65 20 24 6f 72 | 6).X.||| die $or|
|00002fa0| 61 5f 65 72 72 73 74 72 | 3b 0a 58 0a 58 24 6e 66 |a_errstr|;.X.X$nf|
|00002fb0| 69 65 6c 64 73 20 3d 20 | 26 6f 72 61 5f 66 65 74 |ields = |&ora_fet|
|00002fc0| 63 68 28 24 63 73 72 29 | 3b 0a 58 70 72 69 6e 74 |ch($csr)|;.Xprint|
|00002fd0| 20 22 51 75 65 72 79 20 | 77 69 6c 6c 20 72 65 74 | "Query |will ret|
|00002fe0| 75 72 6e 20 24 6e 66 69 | 65 6c 64 73 20 66 69 65 |urn $nfi|elds fie|
|00002ff0| 6c 64 73 5c 6e 5c 6e 22 | 3b 0a 58 0a 58 77 68 69 |lds\n\n"|;.X.Xwhi|
|00003000| 6c 65 20 28 28 24 6e 61 | 6d 65 2c 20 24 70 68 6f |le (($na|me, $pho|
|00003010| 6e 65 29 20 3d 20 26 6f | 72 61 5f 66 65 74 63 68 |ne) = &o|ra_fetch|
|00003020| 28 24 63 73 72 29 29 0a | 58 7b 0a 58 09 77 72 69 |($csr)).|X{.X.wri|
|00003030| 74 65 3b 0a 58 7d 0a 58 | 0a 58 64 6f 20 6f 72 61 |te;.X}.X|.Xdo ora|
|00003040| 5f 63 6c 6f 73 65 28 24 | 63 73 72 29 20 7c 7c 20 |_close($|csr) || |
|00003050| 64 69 65 20 22 63 61 6e | 27 74 20 63 6c 6f 73 65 |die "can|'t close|
|00003060| 20 63 75 72 73 6f 72 22 | 3b 0a 58 64 6f 20 6f 72 | cursor"|;.Xdo or|
|00003070| 61 5f 6c 6f 67 6f 66 66 | 28 24 6c 64 61 29 20 7c |a_logoff|($lda) ||
|00003080| 7c 20 64 69 65 20 22 63 | 61 6e 27 74 20 6c 6f 67 || die "c|an't log|
|00003090| 20 6f 66 66 20 4f 72 61 | 63 6c 65 22 3b 0a 45 4e | off Ora|cle";.EN|
|000030a0| 44 5f 4f 46 5f 46 49 4c | 45 0a 20 20 69 66 20 74 |D_OF_FIL|E. if t|
|000030b0| 65 73 74 20 37 33 33 20 | 2d 6e 65 20 60 77 63 20 |est 733 |-ne `wc |
|000030c0| 2d 63 20 3c 27 65 78 61 | 6d 70 6c 65 73 2f 65 78 |-c <'exa|mples/ex|
|000030d0| 2e 70 6c 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |.pl'`; t|hen. |
|000030e0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 65 78 |echo sha|r: \"'ex|
|000030f0| 61 6d 70 6c 65 73 2f 65 | 78 2e 70 6c 27 5c 22 20 |amples/e|x.pl'\" |
|00003100| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00003110| 6f 6e 67 20 73 69 7a 65 | 21 0a 20 20 66 69 0a 20 |ong size|!. fi. |
|00003120| 20 63 68 6d 6f 64 20 2b | 78 20 27 65 78 61 6d 70 | chmod +|x 'examp|
|00003130| 6c 65 73 2f 65 78 2e 70 | 6c 27 0a 20 20 23 20 65 |les/ex.p|l'. # e|
|00003140| 6e 64 20 6f 66 20 27 65 | 78 61 6d 70 6c 65 73 2f |nd of 'e|xamples/|
|00003150| 65 78 2e 70 6c 27 0a 66 | 69 0a 69 66 20 74 65 73 |ex.pl'.f|i.if tes|
|00003160| 74 20 2d 66 20 27 6f 72 | 61 70 65 72 6c 2e 70 68 |t -f 'or|aperl.ph|
|00003170| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00003180| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00003190| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|000031a0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|000031b0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 6f 72 61 70 65 |ng file |\"'orape|
|000031c0| 72 6c 2e 70 68 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |rl.ph'\"|.else. |
|000031d0| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|000031e0| 63 74 69 6e 67 20 5c 22 | 27 6f 72 61 70 65 72 6c |cting \"|'oraperl|
|000031f0| 2e 70 68 27 5c 22 20 5c | 28 31 30 38 36 20 63 68 |.ph'\" \|(1086 ch|
|00003200| 61 72 61 63 74 65 72 73 | 5c 29 0a 20 20 73 65 64 |aracters|\). sed|
|00003210| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 6f 72 61 70 | "s/^X//|" >'orap|
|00003220| 65 72 6c 2e 70 68 27 20 | 3c 3c 27 45 4e 44 5f 4f |erl.ph' |<<'END_O|
|00003230| 46 5f 46 49 4c 45 27 0a | 58 23 20 6f 72 61 70 65 |F_FILE'.|X# orape|
|00003240| 72 6c 2e 70 68 0a 58 23 | 0a 58 23 20 56 61 72 69 |rl.ph.X#|.X# Vari|
|00003250| 6f 75 73 20 63 6f 6e 73 | 74 61 6e 74 73 20 77 68 |ous cons|tants wh|
|00003260| 69 63 68 20 6d 61 79 20 | 62 65 20 75 73 65 66 75 |ich may |be usefu|
|00003270| 6c 20 69 6e 20 6f 72 61 | 70 65 72 6c 20 70 72 6f |l in ora|perl pro|
|00003280| 67 72 61 6d 73 0a 58 23 | 0a 58 23 20 41 75 74 68 |grams.X#|.X# Auth|
|00003290| 6f 72 3a 09 4b 65 76 69 | 6e 20 53 74 6f 63 6b 0a |or:.Kevi|n Stock.|
|000032a0| 58 23 20 44 61 74 65 3a | 09 09 32 38 74 68 20 4f |X# Date:|..28th O|
|000032b0| 63 74 6f 62 65 72 20 31 | 39 39 31 0a 58 23 20 4c |ctober 1|991.X# L|
|000032c0| 61 73 74 20 43 68 61 6e | 67 65 3a 09 38 74 68 20 |ast Chan|ge:.8th |
|000032d0| 41 70 72 69 6c 20 31 39 | 39 32 0a 58 0a 58 0a 58 |April 19|92.X.X.X|
|000032e0| 23 20 4f 72 61 70 65 72 | 6c 20 65 72 72 6f 72 20 |# Oraper|l error |
|000032f0| 63 6f 64 65 73 2c 20 73 | 65 74 20 69 6e 20 24 6f |codes, s|et in $o|
|00003300| 72 61 5f 65 72 72 6e 6f | 0a 58 0a 58 24 4f 52 41 |ra_errno|.X.X$ORA|
|00003310| 50 5f 4e 4f 4d 45 4d 09 | 3d 20 31 30 30 30 30 31 |P_NOMEM.|= 100001|
|00003320| 3b 09 23 20 6f 75 74 20 | 6f 66 20 6d 65 6d 6f 72 |;.# out |of memor|
|00003330| 79 0a 58 24 4f 52 41 50 | 5f 49 4e 56 43 53 52 09 |y.X$ORAP|_INVCSR.|
|00003340| 3d 20 31 30 30 30 30 32 | 3b 09 23 20 69 6e 76 61 |= 100002|;.# inva|
|00003350| 6c 69 64 20 63 75 72 73 | 6f 72 20 73 75 70 70 6c |lid curs|or suppl|
|00003360| 69 65 64 0a 58 24 4f 52 | 41 50 5f 49 4e 56 4c 44 |ied.X$OR|AP_INVLD|
|00003370| 41 09 3d 20 31 30 30 30 | 30 33 3b 09 23 20 69 6e |A.= 1000|03;.# in|
|00003380| 76 61 6c 69 64 20 6c 64 | 61 20 73 75 70 70 6c 69 |valid ld|a suppli|
|00003390| 65 64 0a 58 24 4f 52 41 | 50 5f 4e 4f 53 49 44 09 |ed.X$ORA|P_NOSID.|
|000033a0| 3d 20 31 30 30 30 30 34 | 3b 09 23 20 63 6f 75 6c |= 100004|;.# coul|
|000033b0| 64 6e 27 74 20 73 65 74 | 20 4f 52 41 43 4c 45 5f |dn't set| ORACLE_|
|000033c0| 53 49 44 0a 58 24 4f 52 | 41 50 5f 42 41 44 56 41 |SID.X$OR|AP_BADVA|
|000033d0| 52 09 3d 20 31 30 30 30 | 30 35 3b 09 23 20 62 61 |R.= 1000|05;.# ba|
|000033e0| 64 20 63 6f 6c 6f 6e 20 | 76 61 72 69 61 62 6c 65 |d colon |variable|
|000033f0| 20 73 65 71 75 65 6e 63 | 65 0a 58 24 4f 52 41 50 | sequenc|e.X$ORAP|
|00003400| 5f 4e 55 4d 56 41 52 53 | 09 3d 20 31 30 30 30 30 |_NUMVARS|.= 10000|
|00003410| 36 3b 09 23 20 77 72 6f | 6e 67 20 6e 75 6d 62 65 |6;.# wro|ng numbe|
|00003420| 72 20 6f 66 20 63 6f 6c | 6f 6e 20 76 61 72 69 61 |r of col|on varia|
|00003430| 62 6c 65 73 0a 58 24 4f | 52 41 50 5f 4e 4f 44 41 |bles.X$O|RAP_NODA|
|00003440| 54 41 09 3d 20 31 30 30 | 30 30 37 3b 09 23 20 73 |TA.= 100|007;.# s|
|00003450| 74 61 74 65 6d 65 6e 74 | 20 64 6f 65 73 20 6e 6f |tatement| does no|
|00003460| 74 20 72 65 74 75 72 6e | 20 64 61 74 61 0a 58 0a |t return| data.X.|
|00003470| 58 0a 58 23 20 4f 72 61 | 70 65 72 6c 20 64 65 62 |X.X# Ora|perl deb|
|00003480| 75 67 67 69 6e 67 20 63 | 6f 64 65 73 20 66 6f 72 |ugging c|odes for|
|00003490| 20 24 6f 72 61 5f 64 65 | 62 75 67 0a 58 23 20 46 | $ora_de|bug.X# F|
|000034a0| 72 6f 6d 20 76 65 72 73 | 69 6f 6e 20 32 2c 20 79 |rom vers|ion 2, y|
|000034b0| 6f 75 20 73 68 6f 75 6c | 64 6e 27 74 20 72 65 61 |ou shoul|dn't rea|
|000034c0| 6c 6c 79 20 75 73 65 20 | 74 68 65 73 65 2e 0a 58 |lly use |these..X|
|000034d0| 0a 58 24 4f 44 42 47 5f | 45 58 45 43 09 3d 20 20 |.X$ODBG_|EXEC.= |
|000034e0| 20 38 3b 09 09 23 20 70 | 72 6f 67 72 61 6d 20 65 | 8;..# p|rogram e|
|000034f0| 78 65 63 75 74 69 6f 6e | 0a 58 24 4f 44 42 47 5f |xecution|.X$ODBG_|
|00003500| 53 54 52 4e 55 4d 09 3d | 20 20 33 32 3b 09 09 23 |STRNUM.=| 32;..#|
|00003510| 20 73 74 72 69 6e 67 2f | 6e 75 6d 65 72 69 63 20 | string/|numeric |
|00003520| 63 6f 6e 76 65 72 73 69 | 6f 6e 73 0a 58 24 4f 44 |conversi|ons.X$OD|
|00003530| 42 47 5f 4d 41 4c 4c 4f | 43 09 3d 20 31 32 38 3b |BG_MALLO|C.= 128;|
|00003540| 09 09 23 20 6d 65 6d 6f | 72 79 20 61 6c 6c 6f 63 |..# memo|ry alloc|
|00003550| 61 74 69 6f 6e 2f 72 65 | 6c 65 61 73 65 0a 58 0a |ation/re|lease.X.|
|00003560| 58 23 20 4f 72 61 63 6c | 65 20 64 61 74 61 74 79 |X# Oracl|e dataty|
|00003570| 70 65 73 0a 58 23 20 49 | 20 64 6f 6e 27 74 20 6b |pes.X# I| don't k|
|00003580| 6e 6f 77 20 77 68 65 74 | 68 65 72 20 74 68 65 73 |now whet|her thes|
|00003590| 65 20 61 72 65 20 76 61 | 6c 69 64 20 66 6f 72 20 |e are va|lid for |
|000035a0| 61 6c 6c 20 76 65 72 73 | 69 6f 6e 73 2e 0a 58 0a |all vers|ions..X.|
|000035b0| 58 25 6f 72 61 5f 74 79 | 70 65 73 20 3d 0a 58 28 |X%ora_ty|pes =.X(|
|000035c0| 0a 58 09 20 31 2c 09 27 | 63 68 61 72 61 63 74 65 |.X. 1,.'|characte|
|000035d0| 72 20 61 72 72 61 79 27 | 2c 0a 58 09 20 32 2c 09 |r array'|,.X. 2,.|
|000035e0| 27 6e 75 6d 62 65 72 27 | 2c 0a 58 09 20 33 2c 09 |'number'|,.X. 3,.|
|000035f0| 27 73 69 67 6e 65 64 20 | 69 6e 74 65 67 65 72 27 |'signed |integer'|
|00003600| 2c 0a 58 09 20 34 2c 09 | 27 66 6c 6f 61 74 27 2c |,.X. 4,.|'float',|
|00003610| 0a 58 09 20 37 2c 09 27 | 70 61 63 6b 65 64 20 64 |.X. 7,.'|packed d|
|00003620| 65 63 69 6d 61 6c 27 2c | 0a 58 09 20 38 2c 09 27 |ecimal',|.X. 8,.'|
|00003630| 6c 6f 6e 67 20 73 74 72 | 69 6e 67 27 2c 0a 58 09 |long str|ing',.X.|
|00003640| 20 39 2c 09 27 76 61 72 | 63 68 61 72 27 2c 0a 58 | 9,.'var|char',.X|
|00003650| 09 31 31 2c 09 27 72 6f | 77 69 64 27 2c 0a 58 09 |.11,.'ro|wid',.X.|
|00003660| 31 32 2c 09 27 64 61 74 | 65 27 2c 0a 58 09 31 35 |12,.'dat|e',.X.15|
|00003670| 2c 09 27 76 61 72 72 61 | 77 27 2c 0a 58 09 32 33 |,.'varra|w',.X.23|
|00003680| 2c 09 27 72 61 77 27 2c | 0a 58 09 32 34 2c 09 27 |,.'raw',|.X.24,.'|
|00003690| 6c 6f 6e 67 20 72 61 77 | 27 2c 0a 58 29 3b 0a 58 |long raw|',.X);.X|
|000036a0| 0a 58 31 3b 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |.X1;.END|_OF_FILE|
|000036b0| 0a 20 20 69 66 20 74 65 | 73 74 20 31 30 38 36 20 |. if te|st 1086 |
|000036c0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 6f 72 61 |-ne `wc |-c <'ora|
|000036d0| 70 65 72 6c 2e 70 68 27 | 60 3b 20 74 68 65 6e 0a |perl.ph'|`; then.|
|000036e0| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|000036f0| 22 27 6f 72 61 70 65 72 | 6c 2e 70 68 27 5c 22 20 |"'oraper|l.ph'\" |
|00003700| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00003710| 6f 6e 67 20 73 69 7a 65 | 21 0a 20 20 66 69 0a 20 |ong size|!. fi. |
|00003720| 20 23 20 65 6e 64 20 6f | 66 20 27 6f 72 61 70 65 | # end o|f 'orape|
|00003730| 72 6c 2e 70 68 27 0a 66 | 69 0a 69 66 20 74 65 73 |rl.ph'.f|i.if tes|
|00003740| 74 20 2d 66 20 27 70 61 | 74 63 68 6c 65 76 65 6c |t -f 'pa|tchlevel|
|00003750| 2e 68 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.h' -a "|${1}" !=|
|00003760| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00003770| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00003780| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00003790| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 70 61 74 |ting fil|e \"'pat|
|000037a0| 63 68 6c 65 76 65 6c 2e | 68 27 5c 22 0a 65 6c 73 |chlevel.|h'\".els|
|000037b0| 65 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 45 |e. echo| shar: E|
|000037c0| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 70 61 74 |xtractin|g \"'pat|
|000037d0| 63 68 6c 65 76 65 6c 2e | 68 27 5c 22 20 5c 28 36 |chlevel.|h'\" \(6|
|000037e0| 30 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 20 |0 charac|ters\). |
|000037f0| 20 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 | sed "s/|^X//" >'|
|00003800| 70 61 74 63 68 6c 65 76 | 65 6c 2e 68 27 20 3c 3c |patchlev|el.h' <<|
|00003810| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|00003820| 2a 20 70 61 74 63 68 6c | 65 76 65 6c 2e 68 20 2a |* patchl|evel.h *|
|00003830| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 09 56 45 52 |/.X.X#de|fine.VER|
|00003840| 53 49 4f 4e 09 09 32 0a | 58 23 64 65 66 69 6e 65 |SION..2.|X#define|
|00003850| 09 50 41 54 43 48 4c 45 | 56 45 4c 09 30 0a 45 4e |.PATCHLE|VEL.0.EN|
|00003860| 44 5f 4f 46 5f 46 49 4c | 45 0a 20 20 69 66 20 74 |D_OF_FIL|E. if t|
|00003870| 65 73 74 20 36 30 20 2d | 6e 65 20 60 77 63 20 2d |est 60 -|ne `wc -|
|00003880| 63 20 3c 27 70 61 74 63 | 68 6c 65 76 65 6c 2e 68 |c <'patc|hlevel.h|
|00003890| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|000038a0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 70 61 74 63 68 |o shar: |\"'patch|
|000038b0| 6c 65 76 65 6c 2e 68 27 | 5c 22 20 75 6e 70 61 63 |level.h'|\" unpac|
|000038c0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|000038d0| 69 7a 65 21 0a 20 20 66 | 69 0a 20 20 23 20 65 6e |ize!. f|i. # en|
|000038e0| 64 20 6f 66 20 27 70 61 | 74 63 68 6c 65 76 65 6c |d of 'pa|tchlevel|
|000038f0| 2e 68 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |.h'.fi.i|f test -|
|00003900| 66 20 27 74 65 73 74 64 | 69 72 2f 52 65 61 64 6d |f 'testd|ir/Readm|
|00003910| 65 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |e' -a "$|{1}" != |
|00003920| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00003930| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00003940| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00003950| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 74 65 73 74 |ing file| \"'test|
|00003960| 64 69 72 2f 52 65 61 64 | 6d 65 27 5c 22 0a 65 6c |dir/Read|me'\".el|
|00003970| 73 65 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |se. ech|o shar: |
|00003980| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 74 65 |Extracti|ng \"'te|
|00003990| 73 74 64 69 72 2f 52 65 | 61 64 6d 65 27 5c 22 20 |stdir/Re|adme'\" |
|000039a0| 5c 28 31 39 36 20 63 68 | 61 72 61 63 74 65 72 73 |\(196 ch|aracters|
|000039b0| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|000039c0| 22 20 3e 27 74 65 73 74 | 64 69 72 2f 52 65 61 64 |" >'test|dir/Read|
|000039d0| 6d 65 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |me' <<'E|ND_OF_FI|
|000039e0| 4c 45 27 0a 58 54 68 65 | 20 73 63 72 69 70 74 73 |LE'.XThe| scripts|
|000039f0| 20 69 6e 20 74 68 69 73 | 20 64 69 72 65 63 74 6f | in this| directo|
|00003a00| 72 79 20 61 72 65 20 68 | 61 63 6b 65 64 20 66 72 |ry are h|acked fr|
|00003a10| 6f 6d 20 73 63 72 69 70 | 74 73 20 69 6e 20 74 68 |om scrip|ts in th|
|00003a20| 65 20 65 78 61 6d 70 6c | 65 73 0a 58 64 69 72 65 |e exampl|es.Xdire|
|00003a30| 63 74 6f 72 79 2e 20 54 | 68 65 79 20 68 61 76 65 |ctory. T|hey have|
|00003a40| 20 62 65 65 6e 20 70 6c | 61 63 65 64 20 68 65 72 | been pl|aced her|
|00003a50| 65 20 66 6f 72 20 74 65 | 73 74 69 6e 67 20 70 75 |e for te|sting pu|
|00003a60| 72 70 6f 73 65 73 2e 20 | 54 68 65 79 20 61 72 65 |rposes. |They are|
|00003a70| 6e 27 74 0a 58 65 78 68 | 61 75 73 74 69 76 65 20 |n't.Xexh|austive |
|00003a80| 74 65 73 74 73 2c 20 62 | 75 74 20 69 66 20 74 68 |tests, b|ut if th|
|00003a90| 65 79 20 77 6f 72 6b 2c | 20 69 74 27 73 20 61 20 |ey work,| it's a |
|00003aa0| 67 6f 6f 64 20 73 69 67 | 6e 21 0a 45 4e 44 5f 4f |good sig|n!.END_O|
|00003ab0| 46 5f 46 49 4c 45 0a 20 | 20 69 66 20 74 65 73 74 |F_FILE. | if test|
|00003ac0| 20 31 39 36 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 196 -ne| `wc -c |
|00003ad0| 3c 27 74 65 73 74 64 69 | 72 2f 52 65 61 64 6d 65 |<'testdi|r/Readme|
|00003ae0| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00003af0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 74 65 73 74 64 |o shar: |\"'testd|
|00003b00| 69 72 2f 52 65 61 64 6d | 65 27 5c 22 20 75 6e 70 |ir/Readm|e'\" unp|
|00003b10| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|00003b20| 20 73 69 7a 65 21 0a 20 | 20 66 69 0a 20 20 23 20 | size!. | fi. # |
|00003b30| 65 6e 64 20 6f 66 20 27 | 74 65 73 74 64 69 72 2f |end of '|testdir/|
|00003b40| 52 65 61 64 6d 65 27 0a | 66 69 0a 69 66 20 74 65 |Readme'.|fi.if te|
|00003b50| 73 74 20 2d 66 20 27 74 | 65 73 74 64 69 72 2f 53 |st -f 't|estdir/S|
|00003b60| 74 61 6e 64 61 72 64 2d | 52 65 73 75 6c 74 73 27 |tandard-|Results'|
|00003b70| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00003b80| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00003b90| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00003ba0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00003bb0| 67 20 66 69 6c 65 20 5c | 22 27 74 65 73 74 64 69 |g file \|"'testdi|
|00003bc0| 72 2f 53 74 61 6e 64 61 | 72 64 2d 52 65 73 75 6c |r/Standa|rd-Resul|
|00003bd0| 74 73 27 5c 22 0a 65 6c | 73 65 0a 20 20 65 63 68 |ts'\".el|se. ech|
|00003be0| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00003bf0| 6e 67 20 5c 22 27 74 65 | 73 74 64 69 72 2f 53 74 |ng \"'te|stdir/St|
|00003c00| 61 6e 64 61 72 64 2d 52 | 65 73 75 6c 74 73 27 5c |andard-R|esults'\|
|00003c10| 22 20 5c 28 35 39 32 20 | 63 68 61 72 61 63 74 65 |" \(592 |characte|
|00003c20| 72 73 5c 29 0a 20 20 73 | 65 64 20 22 73 2f 5e 58 |rs\). s|ed "s/^X|
|00003c30| 2f 2f 22 20 3e 27 74 65 | 73 74 64 69 72 2f 53 74 |//" >'te|stdir/St|
|00003c40| 61 6e 64 61 72 64 2d 52 | 65 73 75 6c 74 73 27 20 |andard-R|esults' |
|00003c50| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00003c60| 58 63 72 65 61 74 69 6e | 67 20 74 61 62 6c 65 20 |Xcreatin|g table |
|00003c70| 32 20 33 20 35 20 37 20 | 31 31 20 63 6f 6d 6d 69 |2 3 5 7 |11 commi|
|00003c80| 74 74 69 6e 67 20 4f 4b | 20 31 33 20 31 37 20 31 |tting OK| 13 17 1|
|00003c90| 39 20 32 33 20 32 39 0a | 58 0a 58 52 65 61 64 69 |9 23 29.|X.XReadi|
|00003ca0| 6e 67 20 74 61 62 6c 65 | 20 66 6f 72 20 74 68 65 |ng table| for the|
|00003cb0| 20 66 69 72 73 74 20 74 | 69 6d 65 0a 58 0a 58 32 | first t|ime.X.X2|
|00003cc0| 20 33 20 35 20 37 20 31 | 31 20 31 33 20 31 37 20 | 3 5 7 1|1 13 17 |
|00003cd0| 31 39 20 32 33 20 32 39 | 20 0a 58 0a 58 52 6f 6c |19 23 29| .X.XRol|
|00003ce0| 6c 69 6e 67 20 62 61 63 | 6b 20 4f 4b 0a 58 0a 58 |ling bac|k OK.X.X|
|00003cf0| 41 74 74 65 6d 70 74 69 | 6e 67 20 74 6f 20 72 65 |Attempti|ng to re|
|00003d00| 61 64 20 64 61 74 61 20 | 66 6f 72 20 74 68 65 20 |ad data |for the |
|00003d10| 73 65 63 6f 6e 64 20 74 | 69 6d 65 2e 0a 58 4f 6e |second t|ime..XOn|
|00003d20| 6c 79 20 76 61 6c 75 65 | 73 20 75 70 20 74 6f 20 |ly value|s up to |
|00003d30| 31 31 20 73 68 6f 75 6c | 64 20 61 70 70 65 61 72 |11 shoul|d appear|
|00003d40| 2e 0a 58 0a 58 32 20 33 | 20 35 20 37 20 31 31 20 |..X.X2 3| 5 7 11 |
|00003d50| 0a 58 32 20 66 69 65 6c | 64 73 2c 20 6c 65 6e 67 |.X2 fiel|ds, leng|
|00003d60| 74 68 73 20 31 30 2c 20 | 34 30 0a 58 09 74 79 70 |ths 10, |40.X.typ|
|00003d70| 65 73 20 31 2c 20 32 0a | 58 20 20 20 20 20 20 20 |es 1, 2.|X |
|00003d80| 4e 61 6d 65 20 20 20 20 | 20 20 20 20 20 45 78 74 |Name | Ext|
|00003d90| 0a 58 20 20 20 20 20 20 | 20 3d 3d 3d 3d 20 20 20 |.X | ==== |
|00003da0| 20 20 20 20 20 20 3d 3d | 3d 0a 58 20 20 20 20 20 | ==|=.X |
|00003db0| 20 20 61 6e 67 65 6c 61 | 20 20 20 20 20 20 20 32 | angela| 2|
|00003dc0| 30 38 0a 58 20 20 20 20 | 20 20 20 61 72 6e 6f 6c |08.X | arnol|
|00003dd0| 64 20 20 20 20 20 20 20 | 33 30 35 0a 58 20 20 20 |d |305.X |
|00003de0| 20 20 20 20 63 61 74 68 | 65 72 69 6e 65 20 20 20 | cath|erine |
|00003df0| 20 32 30 31 0a 58 20 20 | 20 20 20 20 20 6a 75 6c | 201.X | jul|
|00003e00| 69 61 20 20 20 20 20 20 | 20 20 32 39 32 0a 58 20 |ia | 292.X |
|00003e10| 20 20 20 20 20 20 6c 61 | 72 72 79 20 20 20 20 20 | la|rry |
|00003e20| 20 20 20 34 32 34 0a 58 | 20 20 20 20 20 20 20 72 | 424.X| r|
|00003e30| 61 6e 64 61 6c 20 20 20 | 20 20 20 20 33 30 36 0a |andal | 306.|
|00003e40| 58 32 20 66 69 65 6c 64 | 73 2c 20 6c 65 6e 67 74 |X2 field|s, lengt|
|00003e50| 68 73 20 31 30 2c 20 34 | 30 0a 58 09 74 79 70 65 |hs 10, 4|0.X.type|
|00003e60| 73 20 31 2c 20 32 0a 58 | 0c 20 20 20 20 20 20 20 |s 1, 2.X|. |
|00003e70| 4e 61 6d 65 20 20 20 20 | 20 20 20 20 20 45 78 74 |Name | Ext|
|00003e80| 0a 58 20 20 20 20 20 20 | 20 3d 3d 3d 3d 20 20 20 |.X | ==== |
|00003e90| 20 20 20 20 20 20 3d 3d | 3d 0a 58 20 20 20 20 20 | ==|=.X |
|00003ea0| 20 20 6c 61 72 72 79 20 | 20 20 20 20 20 20 20 34 | larry | 4|
|00003eb0| 32 34 0a 58 20 20 20 20 | 20 20 20 72 61 6e 64 61 |24.X | randa|
|00003ec0| 6c 20 20 20 20 20 20 20 | 33 30 36 0a 45 4e 44 5f |l |306.END_|
|00003ed0| 4f 46 5f 46 49 4c 45 0a | 20 20 69 66 20 74 65 73 |OF_FILE.| if tes|
|00003ee0| 74 20 35 39 32 20 2d 6e | 65 20 60 77 63 20 2d 63 |t 592 -n|e `wc -c|
|00003ef0| 20 3c 27 74 65 73 74 64 | 69 72 2f 53 74 61 6e 64 | <'testd|ir/Stand|
|00003f00| 61 72 64 2d 52 65 73 75 | 6c 74 73 27 60 3b 20 74 |ard-Resu|lts'`; t|
|00003f10| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00003f20| 72 3a 20 5c 22 27 74 65 | 73 74 64 69 72 2f 53 74 |r: \"'te|stdir/St|
|00003f30| 61 6e 64 61 72 64 2d 52 | 65 73 75 6c 74 73 27 5c |andard-R|esults'\|
|00003f40| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00003f50| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 20 20 66 69 |wrong si|ze!. fi|
|00003f60| 0a 20 20 23 20 65 6e 64 | 20 6f 66 20 27 74 65 73 |. # end| of 'tes|
|00003f70| 74 64 69 72 2f 53 74 61 | 6e 64 61 72 64 2d 52 65 |tdir/Sta|ndard-Re|
|00003f80| 73 75 6c 74 73 27 0a 66 | 69 0a 65 63 68 6f 20 73 |sults'.f|i.echo s|
|00003f90| 68 61 72 3a 20 45 6e 64 | 20 6f 66 20 61 72 63 68 |har: End| of arch|
|00003fa0| 69 76 65 20 35 20 5c 28 | 6f 66 20 35 5c 29 2e 0a |ive 5 \(|of 5\)..|
|00003fb0| 63 70 20 2f 64 65 76 2f | 6e 75 6c 6c 20 61 72 6b |cp /dev/|null ark|
|00003fc0| 35 69 73 64 6f 6e 65 0a | 4d 49 53 53 49 4e 47 3d |5isdone.|MISSING=|
|00003fd0| 22 22 0a 66 6f 72 20 49 | 20 69 6e 20 31 20 32 20 |"".for I| in 1 2 |
|00003fe0| 33 20 34 20 35 20 3b 20 | 64 6f 0a 20 20 20 20 69 |3 4 5 ; |do. i|
|00003ff0| 66 20 74 65 73 74 20 21 | 20 2d 66 20 61 72 6b 24 |f test !| -f ark$|
|00004000| 7b 49 7d 69 73 64 6f 6e | 65 20 3b 20 74 68 65 6e |{I}isdon|e ; then|
|00004010| 0a 09 4d 49 53 53 49 4e | 47 3d 22 24 7b 4d 49 53 |..MISSIN|G="${MIS|
|00004020| 53 49 4e 47 7d 20 24 7b | 49 7d 22 0a 20 20 20 20 |SING} ${|I}". |
|00004030| 66 69 0a 64 6f 6e 65 0a | 69 66 20 74 65 73 74 20 |fi.done.|if test |
|00004040| 22 24 7b 4d 49 53 53 49 | 4e 47 7d 22 20 3d 20 22 |"${MISSI|NG}" = "|
|00004050| 22 20 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |" ; then|. ech|
|00004060| 6f 20 59 6f 75 20 68 61 | 76 65 20 75 6e 70 61 63 |o You ha|ve unpac|
|00004070| 6b 65 64 20 61 6c 6c 20 | 35 20 61 72 63 68 69 76 |ked all |5 archiv|
|00004080| 65 73 2e 0a 20 20 20 20 | 72 6d 20 2d 66 20 61 72 |es.. |rm -f ar|
|00004090| 6b 5b 31 2d 39 5d 69 73 | 64 6f 6e 65 0a 65 6c 73 |k[1-9]is|done.els|
|000040a0| 65 0a 20 20 20 20 65 63 | 68 6f 20 59 6f 75 20 73 |e. ec|ho You s|
|000040b0| 74 69 6c 6c 20 6d 75 73 | 74 20 75 6e 70 61 63 6b |till mus|t unpack|
|000040c0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 61 | the fol|lowing a|
|000040d0| 72 63 68 69 76 65 73 3a | 0a 20 20 20 20 65 63 68 |rchives:|. ech|
|000040e0| 6f 20 22 20 20 20 20 20 | 20 20 20 22 20 24 7b 4d |o " | " ${M|
|000040f0| 49 53 53 49 4e 47 7d 0a | 66 69 0a 65 78 69 74 20 |ISSING}.|fi.exit |
|00004100| 30 0a 65 78 69 74 20 30 | 20 23 20 4a 75 73 74 20 |0.exit 0| # Just |
|00004110| 69 6e 20 63 61 73 65 2e | 2e 2e 0a |in case.|... |
+--------+-------------------------+-------------------------+--------+--------+