page%rishathra@Sun.COM (Bob Page) (04/27/89)
Submitted-by: hcrvax!edwin (Edwin Hoogerbeets) Posting-number: Volume 89, Issue 98 Archive-name: libraries/edlib11.2 # This is a shell archive. # Remove anything above and including the cut line. # Then run the rest of the file through 'sh'. # Unpacked files will be owned by you and have default permissions. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: SHell ARchive # Run the following text through 'sh' to create: # ed32.lib.uu # edlib.h # filetype.c # getcwd.c # getopt.c # hextoint.c # isbdigit.c # iscsym.c # iscsymf.c # isodigit.c # makefile # stolower.c # stoupper.c # strcspn.c # strdup.c # stricmp.c # strnicmp.c # strpbrk.c # strpos.c # strrpbrk.c # strrpos.c # strspn.c # strtod.c # strtok.c # test.c # toint.c # This is archive 2 of a 2-part kit. # This archive created: Wed Apr 26 13:37:40 1989 echo "extracting ed32.lib.uu" sed 's/^X//' << \SHAR_EOF > ed32.lib.uu X Xbegin 644 ed32.lib XM86H````"7V)I;G1O:6YT`$("7V1E8W1O:6YT`(@"7V]P=&5R<@"(`E]O<'1IZ XM;F0`B`)?;W!T;W!T`(@"7V]P=&%R9P"(`E]G971O<'0`S`-?:&5X=&]I;G0`T XM#@1?:7-B9&EG:70`4`1?:7-C<WEM`(8$7VES8W-Y;68`LP1?:7-O9&EG:70`D XMY01?<W1O;&]W97(`&`5?<W1O=7!P97(`2P5?<W1R8W-P;@"!!5]S=')P8G)KN XM`+T%7W-T<G!O<P#X!5]S=')R<&]S`#4&7W-T<G-P;@!K!E]S=')T;VL`O`9?A XM=&]I;G0`\P9?8F%S96YA;64`4@=?<W1R:6-M<`"J!U]S=')N:6-M<``'"%]S= XM=')R<&)R:P!,"%]S=')T;V0`Y@E?<W1R9'5P`"T*7V=E=&-W9`"="U]C:&1I] XM<@`D#%]F:6QE='EP90``````````````````````````````````````````C XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM``````````````````````````````!!2F)I;G1O:6YT````4```````````" XM``0``0`7``D`%@!"P``""```7V)I;G1O:6YT``<(``!?:7-B9&EG:70`!P@`9 XM`%]T;VEN=``'"```+F)E9VEN`````H``4`QB:6YT;VEN="YC`!4,X(8-``C_` XM`0``'4Y5``!(YP@@)&T`"'@`!'9A;'5E``)L!6YU;6)E<@`&(V/_____$TH2] XM9SK_&1`22(!(P"\`3KKZ<0`56$]*@&<<_QT@2E**$!!(@$C`+P!.NOIR`!E8\ XM3R($XX$H`-B!_Q%@"O\9(`1,WP003EU.=?\18,+__Q,@!&#R_PT`%0'__P@`> XM`GML"``!>VP(``![;/4```!!2F1E8W1O:6YT````6`````````````4``0`88 XM``D`%P!&P``""```7V1E8W1O:6YT``<*``!?8W1P7P`'"```7W1O:6YT``<(J XM```N;75L=0`'"```+F)E9VEN``*``%@,9&5C=&]I;G0N8P`5#."+#0`*_P$`G XM`!U.50``2.<(("1M``AX``1V86QU90`";`5N=6UB97(`!B-C_____Q-*$F="E XM_Q<0$DB`2,!!^OHA<0`Q%P@P``((`&<D_QT@2E**$!!(@$C`+P!.NOIR`!E8* XM3W(*+P`@!$ZZ^G,`%2(?*`'8@/\18`K_&2`$3-\$$$Y=3G7_$6"Z__\3(`1@, XM\O\-`!<!__\(``)[;`@``'ML"``!6S!C]0``04IG971O<'0``````L`````,, XM```````*``4`+``)`"<!1,```PH``%]O<'1E<G(``PH`!%]O<'1I;F0`!PH`' XM!%]O<'1O<'0`!PH`!%]O<'1A<F<``@@``%]G971O<'0`!P@``%]S=')C;7``- XM!P@``%]S=')C:'(`!P@``%]S=')L96X`!P@``%]W<FET90`'"```+F)E9VENE XM`````H`"3@.```@"@`).`H`!%`*``?#U$P````'T]1,````!]`QG971O<'0N` XM8P`5#."0#0`:_P$``!M.5?_^2.<,("@M``CU$P````'T!&-P``8C8P1C``-L$ XM!G-P```!;`5A<F=C``)L`V%R9W8```PC(V,#;W!T<P``$"-C_________Q4,' XMK0````'0!F$`$69B_Q$@+=`"<0`3L(1M"O\9</],WP0P3EU.=?__$2`MT`)Q/ XM`!_E@"!M``PB<`@`#!$`+6<8_Q$@+=`"<0`14JW0`G$`&>6`(&T`#"MP"`#0] XMA',`_Q-P`&#,__\12'KZ(6(`,!$@+=`"<0`;Y8`@;0`,+S`(`$ZZ^G4`%5!/O XM2H!F"/\14JW0`G$`_Q-P_V"H____$2`MT`)Q`!OE@"!M``PB,`@`(&W0`F$`D XM&Q`P&`!(@$C`*@`K0-""<@#_'[J\````.F<4+P4O+0`03KKZ=@`94$\D0$J`C XM9@``D/\12JW0`G``$6=:`0`#`F5R<F)U9@#__ELP8Q\;1?_^&WP`"O__(&T`P XM#"\0$4ZZ^G<`'UA/+P`@;0`,+Q!(>``"3KKZ>``53^\`#$AZ^B%B`%B!$4ZZN XM^G<`%5A/+P!(>OHA8@`S%4AX``).NOIX`!]/[P`,2'@``DAM__Y(>``"$4ZZ7 XM^G@`$T_O``S_$2`MT`)Q`!OE@"!M``PB,`@`4JW0`F$`$2!MT`)A`!5*,!@`, XM9@S_$5*MT`)Q`/\5*WP````!T(9A`/__%7`_8`#^X/__&5**#!(`.F8``-+_Y XM$2`MT`)Q`!OE@"!M``PB<`@`T^W0`F$`%4HI``%G(/\1("W0`G$`$5*MT`)Q* XM`!OE@"!M``PB,`@`TJW0`F$`$U*!*T'0@G,`$V```)#_$5*MT`)Q`!$@+=`"! XM<0`3L(1M;O\12JW0`G``$6=:`0`$`F5R<F)U9@#__ELP8Q\;1?_^&WP`"O__! XM(&T`#"\0$4ZZ^G<`'UA/+P`@;0`,+Q!(>``"3KKZ>``53^\`#$AZ^B%B`%^$L XM$4ZZ^G<`%5A/+P!(>OHA8@!=@A5(>``"3KKZ>``?3^\`#$AX``)(;?_^2'@`! XM`A%.NOIX`!-/[P`,_Q4K?`````'0AF$`_Q5P/V``_B3__Q$@+=`"<0`14JW0A XM`G$`&>6`(&T`#"MP"`#0A',`_Q4K?`````'0AF$`_Q%@+/\1("W0`G$`&^6`C XM(&T`#"(P"`!2K=`"80`1(&W0`F$`%4HP&`!F#/\5*WP````!T(9A`/\14JW0A XM`G$`__\10JW0`G,`__\5(`5@`/W4_Q\M+0`Z(&EL;&5G86P@;W!T'VEO;B`MP XM+2``.B!I;&QE9V$?;"!O<'1I;VX@+2T@`#H@;Q]P=&EO;B!R97%U:7)E<R!A6 XM'VX@87)G=6UE;G0@+2T@`#H?(&]P=&EO;B!R97%U:7)E<Q\@86X@87)G=6UE[ XM;G0@+2T@$0``#0!*`?__"``(>VP(``=[;`@`!'ML"``#(V,(``)L"``!;`@`' XM`&P(``9[(V,(``5[;/4`````04IH97AT;VEN=````%`````````````$``$`W XM%@`)`!4`0L```@@``%]H97AT;VEN=``'"@``7V-T<%\`!P@``%]T;VEN=``'+ XM"```+F)E9VEN`````H``4`QH97AT;VEN="YC`!4,X)0-``K_`0``'4Y5``!(1 XMYP@@)&T`"'@`!'9A;'5E``)L!6YU;6)E<@`&(V/_____$TH29SK_%Q`22(!(= XMP$'Z^B%Q`#$7"#```P@`9QS_'2!*4HH0$$B`2,`O`$ZZ^G(`&5A/(@3I@2@`" XMV('_$6`*_QD@!$S?!!!.74YU_Q%@PO__$R`$8/+_#0`7`?__"``">VP(``![+ XM;`@``5LP8_4`````04II<V)D:6=I=````"(````````````"``$`$0`)`!``! XM0L```@@``%]I<V)D:6=I=``'"```+F)E9VEN``````*``"(,:7-B9&EG:70NI XM8P`5#."9#0`,_P$``!E.50``+P08+0`+!6,``F/__QNX/``Q9P:X/``P9@C_> XM%W`!*!].74YU__\3<`!@]O__#0`4`?__"```>VP*``L``0`(`!8!7V)P````' XM(V,!7V)E;F0```0C8P%?8G5F9@``""-C`5]F;&%G<P``#&,!7W5N:70```UC& XM`5]B>71B=68```YC`5]B=69L96X``!!I`5]T;7!N86UE```2(V,)1DE,10`Z_ XM``'U````04II<V-S>6T``````#X````````````$``$`%@`)`!4`-L```@@`0 XM`%]I<V-S>6T`!P@``%]I<V-S>6UF``<*``!?8W1P7P`'"```+F)E9VEN````[ XM`H``/@QI<V-S>6TN8P`5#."<#0`._P$``!E.50``+P08+0`+!6,``F/__QD0@ XM!$B`2,`O`$ZZ^G$`'5A/2H!F$A`$2(!(P$'Z^B%R`#$7"#```@@`9PS_&Q`$3 XM2(!(P"@?3EU.=?__$W``8/;_#0`6`?__"``!>VP(``![;`@``ELP8_4`04II] XM<V-S>6UF`````#`````````````#``$`$P`)`!(`+<```@@``%]I<V-S>6UF+ XM``<*``!?8W1P7P`'"```+F)E9VEN`````H``,`QI<V-S>6UF+F,`%0S@GPT`2 XM#?\!```93E4``"\$&"T`"P5C``)C__\7$`1(@$C`0?KZ(7$`,1\2,`@`PCP`Q XM`V8&N#P`7V8$&W`!8`)P`"@?3EU.=?\-`!$!__\(``![;`@``5LP8_4`04IIJ XM<V]D:6=I=````#H````````````#``$`$P`)`!(`,L```@@``%]I<V]D:6=IB XM=``'"@``7V-T<%\`!P@``"YB96=I;@```H``.@QI<V]D:6=I="YC`!4,X*(-Q XM``W_`0``&4Y5```O!!@M``L%8P`"8___&[@\`#EG!K@\`#AF"/\7<``H'TY=> XM3G7__Q<0!$B`2,!!^OHA<0`Q'R(`$#`8`$B`2,#`O`````018-[__PT`%@'_- XM_P@``'ML"``!6S!C]0````!!2G-T;VQO=V5R````,`````````````,``0`4L XM``D`$P`SP``""```7W-T;VQO=V5R``<(``!?=&]L;W=E<@`'"```+F)E9VENS XM`````H``,`QS=&]L;W=E<BYC`!4,X*8-``W_`0``'4Y5``!(YP`P)&T`""9*W XM!'1E;7``!R-C!7-T<@`&(V/_____$6`2_QD0$TB`2,`O`$ZZ^G$`&5A/%H!2% XMBTH39NK__QD@"DS?#`!.74YU_PT`%@'__P@``7ML"```>R-C]0````!!2G-T? XM;W5P<&5R````,`````````````,``0`4``D`$P`SP``""```7W-T;W5P<&5R= XM``<(``!?=&]U<'!E<@`'"```+F)E9VEN`````H``,`QS=&]U<'!E<BYC`!4,Q XMX*D-``W_`0``'4Y5``!(YP`P)&T`""9*!'1E;7``!R-C!7-T<@`&(V/_____X XM$6`2_QD0$TB`2,`O`$ZZ^G$`&5A/%H!2BTH39NK__QD@"DS?#`!.74YU_PT`" XM%@'__P@``7ML"```>R-C]0````!!2G-T<F-S<&X`````.`````````````,`6 XM`0`3``D`$@`VP``""```7W-T<F-S<&X`!P@``%]S=')C:'(`!P@``"YB96=IS XM;@`"@``X#'-T<F-S<&XN8P`5#."L#0`+_P$``!].50``2.<(,"1M``@F;0`,X XM$2@*!'1E;7```B-C!7-T<@`&(V,%8VAA<G-E=``'(V/_____'2!$$!!(@$C`8 XM+P`O"TZZ^G$`%5!/2H!F!/\34H1@YO__&R`$D(I,WPP03EU.=?\-`!4!__\(F XM``%[;`@``'ML]0!!2G-T<G!B<FL`````1@````````````,``0`3``D`$@`\3 XMP``""```7W-T<G!B<FL`!P@``%]I;F1E>``'"```+F)E9VEN```"@`!&#'-TT XM<G!B<FLN8P`5#."Y#0`)_P$``!].50``2.<(,"1M``@F;0`,!'1E;7```B-CE XM!7-T<@`&(V,%8VAA<G-E=``'(V/______Q$H"O__'R!$2A!G&B!$$!!(@$C`4 XM+P`3+PM.NOIQ`!503TJ`9@3_$U*$8.#__Q\@1$H09P0@!&`"<`!,WPP0$TY=` XM3G7_#0`5`?__"``!>R-C"```>R-C]0````!!2G-T<G!O<P``````0```````A XM``````,``0`3``D`$@`[P``""```7W-T<G!O<P`'"```7W-T<FQE;@`'"```6 XM+F)E9VEN```"@`!`#'-T<G!O<RYC`!4,X+P-``W_`0``'TY5``!(YPP@)&T`" XM"!@M``\1>@`$8V]U;G1E<@`#;`5S=')I;F<`!B-C!6ME>0`"8_______$TH$1 XM9A#_$R\*3KKZ<0`96$],WP0P3EU.=?__%4HR6`!G$/\7$#)8`+`$9@3_$R`%D XM8.;_$5*%_Q%@ZO\3</]@WO\-`!P!__\(``%[;`@``'ML]0```$%*<W1R<G!OV XM<P````!*`````````````P`!`!,`"0`2`#W```((``!?<W1R<G!O<P`'"```! XM7W-T<FQE;@`'"```+F)E9VEN``*``$H,<W1R<G!O<RYC`!4,X,0-``W_`0``> XM'TY5``!(YP@P)&T`"!@M``\$=&5M<``'(V,%<W1R:6YG``8C8P5K97D``F/_W XM_____Q-*!&80_Q,O"DZZ^G$`&5A/3-\,$$Y=3G7__Q,O"DZZ^G$`&5A/T(HF# XM0%.+8`[_%1`3L`1F!O\;(`N0BF#<4XNWRF3N__\3</]@TO\-`!L!__\(``%[+ XM;`@``'ML]0````!!2G-T<G-P;@``````.`````````````,``0`3``D`$@`VE XMP``""```7W-T<G-P;@`'"```7VEN9&5X``<(```N8F5G:6X````"@``X#'-T( XM<G-P;BYC`!4,X,D-``O_`0``'TY5``!(YP@P)&T`""9M``P1*`H$=&5M<``"6 XM(V,%<W1R``8C8P5C:&%R<V5T``<C8_____\=($00$$B`2,`O`"\+3KKZ<0`5* XM4$]*@&<$_Q-2A&#F__\;(`20BDS?#!!.74YU_PT`%`'__P@``7ML"```>VSU! XM``!!2G-T<G1O:P``````7@`````````$``0``@`7``D`%0!1P``""```7W-TP XM<G1O:P`'"```7W-T<G-P;@`'"```7W-T<G!B<FL`!P@``"YB96=I;@`"@`!>P XM"8````QS=')T;VLN8P`5#.#,#0`,_P$``!].50``2.<,,"1M``@F;0`,!F9RV XM;VU,87-T5&EM90```2-C!&5N9``#(V,$=&]K96X``B-C!6)U9@`&(V,%<V5P2 XM87)A=&]R<P`'(V/_______\9(`IG!"`*8`0@+=`"80`3*`!G.O\5+PLO!$ZZD XM^G$`$U!/V(#_%2!$2A!F"O\9<`!,WPPP3EU.=?\5+PLO!$ZZ^G(`'U!/*@!G8 XM!B`%4H!@`G``*T#0@F$`____$R!%0A#__Q,@!_PT`'0'__P@``7ML"``"! XM>R-C"```>R-C]0!!2G1O:6YT````````8`````````````(``0`0``D`#P`WZ XMP``""```7W1O:6YT``<(```N8F5G:6X````"@`!@#'1O:6YT+F,`%0S@UPT`K XM#?\!```93E4``"\$&"T`"P5C``)C__\;N#P`,&T8N#P`.6X2_Q\0!$B`2,"0: XMO````#`H'TY=$4YU_QNX/`!A;12X/`!F;@[_'1`$2(!(P)"\````5V#@_QNXM XM/`!!;12X/`!&;@[_'1`$2(!(P)"\````-V#&__\3</]@PO\-`!@!__\(``![E XM;/4`````04IB87-E;F%M90```#(````````````#``(`%0`)`!,`7\```@@`Y XM`%]B87-E;F%M90`'"```7W-T<G)P8G)K``<(```N8F5G:6X```*``"X"@``NE XM#&)A<V5N86UE+F,`%1?=8@T`"/\!```=3E4``$CG`#`D;0`(2'KZ(6$`,!,O! XM"DZZ^G$`$U!/)D`$9F]O``<C8P5B=68`!B-C_____Q\@"V<&(`M2@&`"(`I,` XMWPP`$TY=3G7_$SHO```-``X!__\(``%[(V,(``![(V,)5$585`!#"4)/3TP`: XM:0E50T]53E0`20E#3U5.5`!I"41/54),10!D"49,3T%4`&8)55-(3U)4`$D)A XM4TA/4E0`:0E#4%12`$P)05!44@`C(T,)4U124%12`"-#"4)95$5"2513`$,)I XM54)95$4`0PE"651%`&,)5T]21$))5%,`20E55T]21`!)"5=/4D0`:0E,3TY'V XM0DE44P!,"55,3TY'`$P)3$].1P!L]0````!!2G-T<FEC;7``````K```````K XM``````,``0`4``D`$P!8P``""```7W-T<FEC;7``!P@``%]T;VQO=V5R``<(` XM```N8F5G:6X``````H``K`QS=')I8VUP+F,`%0S@KPT`"?\!```?3E4``$CGW XM"#`D;0`()FT`#!%X``1I;F1E>``";`5S='(Q``8C8P5S='(R``<C8_____\?6 XM2C)(`&<R2C-(`&<L$#)(`!=(@$C`+P!.NOIQ`!]83R\`$#-(`$B`2,`O`$ZZ/ XM^G$`%UA/(A^R@&8$__\34H1@R/__&Q`R2`!(@$C`+P!.NOIQ`!]83R\`$#-(J XM`$B`2,`O`$ZZ^G$`'UA/(A^R@&P$</]@+A`R2``72(!(P"\`3KKZ<0`?6$\O@ XM`!`S2`!(@$C`+P!.NOIQ`!]83R(?LH!O!'`!8`)P`$S?%0P03EU.=?__#0`56 XM`?__"``!>VP(``![;/4`````04IS=')N:6-M<````+@````````````#``$`* XM%``)`!,`7<```@@``%]S=')N:6-M<``'"```7W1O;&]W97(`!P@``"YB96=IT XM;@````*``+@,<W1R;FEC;7`N8P`5#."T#0`)_P$``!].50``2.<,,"1M``@FL XM;0`,%2@M`!!Z``1I;F1E>``#;`5S='(Q``8C8P5S='(R``<C8P5L96X``FS_A XM_____Q]*,E@`9SI*,U@`9S0@!%.`'[J`;"P0,E@`2(!(P"\`3KKZ<0`?6$\OI XM`!`S6`!(@$C`+P!.NOIQ`!=83R(?LH!F!/__$U*%8,#__QL0,E@`2(!(P"\`B XM3KKZ<0`?6$\O`!`S6`!(@$C`+P!.NOIQ`!]83R(?LH!L!'#_8"X0,E@`%TB`4 XM2,`O`$ZZ^G$`'UA/+P`0,U@`2(!(P"\`3KKZ<0`?6$\B'[*`;P1P`6`"<`!,G XMWQ4,,$Y=3G7__PT`%@'__P@``7ML"```>VSU````04IS=')R<&)R:P```%8`M XM```````````$``$`%@`)`!4`1<```@@``%]S=')R<&)R:P`'"```7W-T<FQEY XM;@`'"```7VEN9&5X``<(```N8F5G:6X``H``5@QS=')R<&)R:RYC`!4,X,`-S XM``G_`0``'TY5``!(YP@P)&T`""9M``P$=&5M<``"(V,%<W1R``8C8P5C:&%RY XM<V5T``<C8_______$R\*3KKZ<0`76$_0BB@`4X3__Q\@2E.(L<1G&B!$$!!(. XM@$C`%2\`+PM.NOIR`!503TJ`9@3_$U.$8-[__Q\@2E.(L<1G!"`$8`)P`$S?L XM%0P03EU.=?\-`!4!__\(``%[;`@``GLC8P@``'LC8_4`````04IS=')T;V0`C XM`````R`````````````+``(`*0`)`"<!FL```@@``%]S=')T;V0`!PH``%]C` XM='!?``<*``!?97)R;F\`!P@``%]T;VEN=``'"```+FUU;'4`!P@``"Y09FQT( XM``<(```N4&UU;``'"```7W-T<F-M<``'"```7W-P<FEN=&8`!P@``%]A=&]FN XM``<(```N8F5G:6X``H`"]@*``O8,<W1R=&]D+F,`%1EOP`T`-/\!```73E7_* XMH$CG"#`"8G5F9F5R`/^@6S!C`F)U9FQI;0#_X"-C`F)U9F]R9P#_Y"-C!&,`- XM`FP$9'``!R-C!'-P``8C8P)S879E`/_H(V,"97AP=`#_[&P"97-I9VX`__!LQ XM`F1O='-E96X`__1L`G-C86QE`/_X;`)S:6=N`/_\;`-S='(```@C8P-P='(`= XM``PC(V/______________Q,D;0`(_Q4,$@`@9@3_$U**8/;__Q<K?`````'_2 XM_/__%0P2`"UF!O\35:W__/\14HK___\30JW_]/\30JW_^/\50>W_H"9(__\7/ XM($M2BQ"\`##_%R!+4HL0O``N__\3*TO_Y/\70>W_T"M(_^#__Q4K2O_H8&;_? XM_Q>XO````"YF#/__%4JM__1F8O___Q-2K?_T__\38%!!^OHA<0`Q%P@P``)(# XM`&8"_Q%@3O__%[B\````,&8D__\5M^W_Y&<2____%;?M_^!D"O\5($M2BQ"$O XM_Q-2K?_X____$6`*_____Q5*K?_T9P3_$U.M__C__Q%@%O___Q6W[?_@9`;_R XM%2!+4HL0A/___Q5*K?_T9@3_$U*M__C__QM2BA`22(!(P"@`9I#_%;7M_^AFG XM(O\52JT`#&<(_Q<@;0`,(*T`"/\5*WP````*T(9R`/\;<`!R`$S?#!!.74YUJ XM____';?M_^1C#`PK`##__V8$_Q-3BV#N__\5M^W_Y&8(_Q<@2U*+$+P`,/__] XM$4(3______________\3*TK_Z/\30JW_[/\7*WP````!__#___\;($I2BA`0A XM2(!(P"@`__\?N+P```!E9PJXO````$5F`!$`KO___QL@2E**$!!(@$C`*`#_R XM_Q>XO````"UF$O\35:W_\/\;($I2BA`02(!(P"@`_Q]@'+B\````*V<(N+P`& XM```@$68,_QL@2E**$!!(@$C`*`#___\10?KZ(7$`,1<(,``"2`!G7O___Q>X+ XMO````#!F#O\=($I2BA`02(!(P"@`8.K__Q%@*/\3+P1.NOIS`!M83W(*+P`@" XM+?_L3KKZ=``?(A_2@"M!_^P@2E**$!!(@!5(P"@`0?KZ(7$`,1<(,``"2`!F! XMS/__%4JM__!L!/\31*W_[/__%R!*4X@K2/_H_____Q5*K0`,9PC_%R!M``P@I XMK?_H__\7("W_^-&M_^S___\5*WP````)T(9R`/__&0RM```!-?_L;QS_%2`M] XM__Q.NOIU`!TD/'_O__\F//___U5.NOIV`!-@`/ZZ_QD,K0```37_[&8P_Q%(2 XM>OHA80`P%2\M_^1.NOIW`!503TJ`;QS_%2`M__Q.NOIU`!TD/'_O__\F//__8 XM_U5.NOIV`!-@`/Z"_QM@3@RM___^O?_L;!3_%2`M__Q.NOIU`!5T`'8`3KKZX XM=@`38`#^8O\9#*W___Z]_^QF)O\12'KZ(6$`4H$5+RW_Y$ZZ^G<`%5!/2H!LB XM%/\5("W__$ZZ^G4`%70`=@!.NOIV`!-@`/XR______\5+RW_[$AZ^B%A`%6"M XM$R\+3KKZ>``33^\`#/\10JW0`G(`_Q5(;?^@3KKZ>0`;6$\O`2\`("W__$ZZ[ XM^G4`&20`)@$@'R(?3KKZ=@`38`#]]O\?,3<Y-S8Y,S$S-#@V,C,Q-!\W`#0Y< XM-#`V-38T-3@T,3(T&38U-#0`925D```-`-(!__\(``A[;`@`!WML"``";`@`4 XM`5LP8P@``'MD"``#>VP)5$585`!#"4)/3TP`:0E50T]53E0`20E#3U5.5`!IB XM"41/54),10!D"49,3T%4`&8)55-(3U)4`$D)4TA/4E0`:0E#4%12`$P)05!4" XM4@`C(T,)4U124%12`"-#"4)95$5"2513`$,)54)95$4`0PE"651%`&,)5T]2A XM1$))5%,`20E55T]21`!)"5=/4D0`:0E,3TY'0DE44P!,"55,3TY'`$P)3$].3 XM1P!L"``)>V3U``!!2G-T<F1U<```````1@````````````8``0`<``D`&P!'9 XMP``""```7W-T<F1U<``'"```7W-T<FQE;@`'"```7VUA;&QO8P`'"@``7V5R^ XM<FYO``<(``!?<W1R8V%T``<(```N8F5G:6X````"@`!&#'-T<F1U<"YC`!49% XM;E\-``O_`0``'TY5``!(YP`P)&T`""\*3KKZ<0`56$\O`$ZZ^G(`$UA/)D`$. XM9'5P``<C8P5S='(`!B-C_____Q,@"V82_Q4K?`````/0AG,`_QEP`$S?#`!.& XM74YU____$R`+9PK_%2\*+PM.NOIT`!%03____Q,@"V#F_PT`&P'__P@`!'ML3 XM"``!>VP(``![(V,(``)[(V,(``-L]0```$%*9V5T8W=D``````&<````````6 XM````#@`%`#D`"0`T`7#```((``!?9V5T8W=D``<(``!?;6%L;&]C``<*``!?W XM97)R;F\`!P@``%],;V-K``<(``!?9G)E90`'"```7U5N3&]C:P`'"```7T%L" XM;&]C365M``<(``!?4&%R96YT1&ER``<(``!?1G)E94UE;0`'"```7T5X86UI% XM;F4`!P@``%]S=')L96X`!P@``%]S=')C870``@``B%]F;VQL;W<`!P@``"YBS XM96=I;@`````"@`"&`H``A@*``9@"@`&&`H`!F`QG971C=V0N8P`5&2:'#0`2' XM_P$``!E.50``2.<(('@`!&UA;&QO8V5D``)L"D9I;&5,;V-K``1L;V-K``8CG XM.@`!`V)U9@``""-C`W-I>F4```QL________%4JM``AF)/\5+RT`#$ZZ^G$`& XM%UA/*T``"&82_Q4K?`````/0AG(`_QEP`$S?!!!.74YU__\1>`'_____%4AX] XM__Y(>OHA80`P$4ZZ^G,`$U!/)$#__Q4@;0`(0A#__Q\O+0`,+RT`""\*83)/% XM[P`,$TJ`9AK__Q-*A&<*_Q4O+0`(3KKZ=``16$____\3+PI.NOIU`!%83___$ XM$W``8++___\3+PI.NOIU`!%83___%2`M``A@I/\1```-`#;_`0`"%TY5``!(0 XMYP@P!&YE=VQO8VL`!R,Z``$*1FEL94EN9F]";&]C:P`*1&%T95-T86UP``L`4 XM`P`#``P!9'-?1&%Y<P```&P!9'-?36EN=71E```$;`%D<U]4:6-K```(;`L`@ XM`@`*`00!9FEB7T1I<VM+97D```!L`69I8E]$:7)%;G1R>51Y<&4```1L`69IF XM8E]&:6QE3F%M90``"%LP8P%F:6)?4')O=&5C=&EO;@``=&P!9FEB7T5N=')YS XM5'EP90``>&P!9FEB7U-I>F4``'QL`69I8E].=6U";&]C:W,``(!L`69I8E]$Z XM871E``"$.@`#`69I8E]#;VUM96YT``"06S!C`7!A9&1I;F<``.!;,&,$9FEBX XM``8C.@`"`VQO8VL```@C.@`!`V)U9@``#"-C`W-I>F4``!!L__________\50 XM2JT`"&8*_QEP`4S?#!!.74YU____&TAY``$``$AX`01.NOIV`!-03R1`__\3K XM(`IF!/\3<`!@WO__%2\M``A.NOIW`!-83R9`__\?+RT`$"\M``PO"V&V3^\`D XM#!-*@&80_Q=(>`$$+PI.NOIX`!%03_\3<`!@KO___Q<O"B\M``A.NOIY`!=0` XM3TJ`9P``C`$``P1C``)C____%2\M``Q.NOIZ`!M83R\`($I0B"\(3KKZ>@`=5 XM6$\B']*`5(&RK0`0;Q+_%TAX`00O"DZZ^G@`$5!/_Q5P`&``_VC___\9(`MGP XM+B\M``Q.NOIZ`!]83R!`T>T`#!@H__^X/``Z%V<4N#P`+V<._Q%(>OHA9``P9 XM%2\M``Q.NOI[`!%03____QL@2E"(+P@O+0`,3KKZ>P`14$___Q,@"V8._Q%(8 XM>OHA9``R%2\M``Q.NOI[`!%03_____\72'@!!"\*3KKZ>``14$___Q5P`6``T XM_P+_$R\`.@`-`&8!__\(``M[;`@`"GML"``)>VP(``A[;`@`!7ML"``$>VP'^ XM9F]L;&]W```,>VP(``-[(SH``0@`!WLC.@`!"``&>R,Z``((``%[(V,(``)LZ XM"4)35%(`;`E"4%12`&P(``![(V,)5$585`!#"4)/3TP`:0E50T]53E0`20E#1 XM3U5.5`!I"41/54),10!D"49,3T%4`&8)55-(3U)4`$D)4TA/4E0`:0E#4%12W XM`$P)05!44@`C(T,)4U124%12`"-#"4)95$5"2513`$,)54)95$4`0PE"651%W XM`&,)5T]21$))5%,`20E55T]21`!)"5=/4D0`:0E,3TY'0DE44P!,"55,3TY'Y XM`$P)3$].1P!L]0``04IC:&1I<@```````&@````````````&``$`'0`)`!P`L XMA\```@@``%]C:&1I<@`'"@``7V5R<FYO``<(``!?9FEL971Y<&4`!P@``%],: XM;V-K``<(``!?0W5R<F5N=$1I<@`'"```+F)E9VEN``````*``&@,8VAD:7(N= XM8P`5&5.2#0`-_P$``!-.5?_\"D9I;&5,;V-K``)L;V-K`/_\(SH``0-P871H( XM```((V/_____%4JM``AF#O\5*WP````+T(9Q`/\5</].74YU____%2\M``A.4 XMNOIR`!E83["\`````6<,_Q4K?`````'0AG$`_Q-P_V#>____&4AX__XO+0`(_ XM3KKZ<P`74$\K0/_\9@S_%2M\````"-"&<0#_$W#_8+[___\5+RW__$ZZ^G0`+ XM%5A/*T#__/__$W``8*S_#0`D`?__"``$>R,Z``$(``-[(SH``0@``6P)0E-4. XM4@!L"4)05%(`;`@``GML"```>VP)5$585`!#"4)/3TP`:0E50T]53E0`20E#V XM3U5.5`!I"41/54),10!D"49,3T%4`&8)55-(3U)4`$D)4TA/4E0`:0E#4%12W XM`$P)05!44@`C(T,)4U124%12`"-#"4)95$5"2513`$,)54)95$4`0PE"651%W XM`&,)5T]21$))5%,`20E55T]21`!)"5=/4D0`:0E,3TY'0DE44P!,"55,3TY'Y XM`$P)3$].1P!L]0``04IF:6QE='EP90```(`````````````(``$`(P`)`"(`J XMV\```@@``%]F:6QE='EP90`'"```7T%L;&]C365M``<*``!?97)R;F\`!P@`# XM`%],;V-K``<(``!?17AA;6EN90`'"```7U5N3&]C:P`'"```7T9R965-96T`F XM!P@``"YB96=I;@````*``(`,9FEL971Y<&4N8P`5&6.1#0`0_P$``!=.50``\ XM2.<(,`1R97-U;'0``FP*1FEL94QO8VL`!&QO8VL`!R,Z``$*1FEL94EN9F]"U XM;&]C:P`*1&%T95-T86UP``L``P`#``P!9'-?1&%Y<P```&P!9'-?36EN=71EP XM```$;`%D<U]4:6-K```(;`L``@`*`00!9FEB7T1I<VM+97D```!L`69I8E]$( XM:7)%;G1R>51Y<&4```1L`69I8E]&:6QE3F%M90``"%LP8P%F:6)?4')O=&5C% XM=&EO;@``=&P!9FEB7T5N=')Y5'EP90``>&P!9FEB7U-I>F4``'QL`69I8E].V XM=6U";&]C:W,``(!L`69I8E]$871E``"$.@`#`69I8E]#;VUM96YT``"06S!C> XM`7!A9&1I;F<``.!;,&,$9FEB``8C.@`"`W!A=&@```@C8_________\;2'D`3 XM`0``2'@!!$ZZ^G$`%U!/)$!*@&82_Q4K?`````/0AG(`_QEP_TS?#!!.74YU7 XM____&4AX__XO+0`(3KKZ<P`74$\F0$J`9@S_%2M\````"-"&<@#_$W#_8-C_' XM__\5+PHO"TZZ^G0`$5!/__\=2JH`!&\$<`%@`G`"*`#__Q,O"TZZ^G4`$5A/9 XM_Q=(>`$$+PI.NOIV`!%03___$R`$8*C_#0`M`?__"``&>VP(``5[;`@`!'ML- XM"``#>R,Z``$(``%[(SH``@@``FP)0E-44@!L"4)05%(`;`@``'ML"51%6%0`7 XM0PE"3T],`&D)54-/54Y4`$D)0T]53E0`:0E$3U5"3$4`9`E&3$]!5`!F"553* XM2$]25`!)"5-(3U)4`&D)0U!44@!,"4%05%(`(R-#"5-44E!44@`C0PE"651%Z XM0DE44P!#"55"651%`$,)0EE410!C"5=/4D1"2513`$D)55=/4D0`20E73U)$2 XA`&D)3$].1T))5%,`3`E53$].1P!,"4Q/3D<`;/4`````4 X`` Xend Xsize 13308 SHAR_EOF echo "extracting edlib.h" sed 's/^X//' << \SHAR_EOF > edlib.h X/* X * edlib.h v1.1 Copyright 1989 Edwin Hoogerbeets X * X * This code may be freely redistributed as long as no cost is levied X * for it and that this copyright notice remains intact. X * X * edlib contains a bunch of routines that are listed in H&S that are X * not in the Manx libraries. Also contains other public domain as well X * as freely redistributable routines. X * X * The library was compiled with Manx 3.6a. X */ X#include <exec/types.h> X#define EFAULT 11 /* for chdir */ X#define TYPE_DIR 1 /* for filetype */ X#define TYPE_FILE 2 X#define isdir(a) (filetype(a) == TYPE_DIR) X#define isfile(a) (filetype(a) == TYPE_FILE) X#define MDMINEXPT -323 X#define MDMINFRAC "494065645841246544" X#define ZERO 0.0 X#define MDMAXEXPT 309 X#define MDMAXFRAC "17976931348623147" X#define HUGE 1.7976931348623147e308 X X/* character processing functions */ Xextern int isbdigit(); /* is the character a `1' or a `0'? */ Xextern int iscsym(); /* character part of a valid C symbol? */ Xextern int iscsymf(); /* character valid a first char in a C symbol? */ Xextern int toint(); /* converts a character 0..f to its hexadecimal value */ Xextern int isodigit(); /* is this an octal digit? */ X X/* string processing functions */ Xextern char *basename(); /* find the file name in a full path name */ Xextern int bintoint(); /* these three take character strings and return the */ Xextern int dectoint(); /* int value of the number in the string */ Xextern int hextoint(); Xextern char *stoupper(); /* converts a string to entirely upper case chars */ Xextern char *stolower(); /* converts a string to entirely lower case chars */ Xextern int strpos(); /* gives position of first occurance of char in string */ Xextern int strrpos(); /* gives position of last occurance of char in string */ Xextern char *strrpbrk(); Xextern int stricmp(); /* case insensitive string compare */ Xextern int strnicmp(); /* " with a certain length */ Xextern int strcspn(); Xextern char *strpbrk(); /* these four courtesy Daniel J. Barrett */ Xextern char *strtok(); Xextern int strspn(); Xextern double strtod(); /* convert a string to a double */ Xextern char *strdup(); /* return a duplicate of a string */ X X/* other functions */ Xextern int chdir(); /* change directory to given path */ Xextern char *getcwd(); /* get current working directory */ Xextern int filetype(); /* return whether name is dir or file */ X X/* definitions to use getopt() */ Xextern int getopt(); Xextern char *optarg; Xextern int optind; X X X X SHAR_EOF echo "extracting filetype.c" sed 's/^X//' << \SHAR_EOF > filetype.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X#include "edlib.h" X#include <libraries/dos.h> X#include <exec/memory.h> X#include <errno.h> X X#define FIBSIZE sizeof(struct FileInfoBlock) X Xextern struct FileInfoBlock *AllocMem(); Xextern struct FileLock *Lock(); X Xint filetype(path) Xchar *path; X{ X register struct FileInfoBlock *fib; X register struct FileLock *lock; X register int result; X X X if ( !(fib = AllocMem(FIBSIZE,MEMF_CLEAR)) ) { X errno = ENOMEM; X return(-1); X } X X if ( !(lock = Lock(path,ACCESS_READ)) ) { X errno = EACCES; X return(-1); X } X X Examine(lock,fib); X X result = ( fib->fib_DirEntryType > 0 ) ? TYPE_DIR : TYPE_FILE; X X UnLock(lock); X FreeMem(fib,FIBSIZE); X X return(result); X} X X X SHAR_EOF echo "extracting getcwd.c" sed 's/^X//' << \SHAR_EOF > getcwd.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X#include "edlib.h" X#include <libraries/dos.h> X#include <exec/memory.h> X#include <errno.h> X X#define NULL 0L X#define FIBSIZE sizeof(struct FileInfoBlock) Xextern char *malloc(); Xextern struct FileInfoBlock *AllocMem(); Xextern struct FileLock *ParentDir(); Xextern struct FileLock *Lock(); X Xchar *getcwd(buf,size) Xchar *buf; Xint size; X{ X register struct FileLock *lock; X register int malloced = 0; X X if ( !buf ) { X if ( !(buf = malloc(size)) ) { X errno = ENOMEM; X return(NULL); X } X malloced = 1; X } X X /* get a lock on the current working directory */ X lock = Lock("",ACCESS_READ); X X buf[0] = '\0'; X X if ( !follow(lock,buf,size) ) { X X if ( malloced ) { X free(buf); X } X X UnLock(lock); X X return(NULL); X } X X UnLock(lock); X X return(buf); X} X Xstatic int follow(lock,buf,size) Xstruct FileLock *lock; Xchar *buf; Xint size; X{ X register struct FileInfoBlock *fib; X register struct FileLock *newlock; X X /* at end of road */ X if ( !lock ) { X return(1); X } X X fib = AllocMem(FIBSIZE,MEMF_CLEAR); X X if ( !fib ) X return(0); X X newlock = ParentDir(lock); X X if ( !follow(newlock,buf,size) ) { X FreeMem(fib,FIBSIZE); X return(0); X } X X if ( Examine(lock,fib) ) { X register char c; X X if ( strlen(buf) + strlen(fib->fib_FileName) + 2 > size ) { X FreeMem(fib,FIBSIZE); X return(0); X } X X if ( newlock && (c = buf[strlen(buf)-1]) != ':' && c != '/' ) { X strcat(buf,"/"); X } X X strcat(buf,&fib->fib_FileName[0]); X X if ( !newlock) { X strcat(buf,":"); X } X } X X FreeMem(fib,FIBSIZE); X X return(1); X} X SHAR_EOF echo "extracting getopt.c" sed 's/^X//' << \SHAR_EOF > getopt.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#define NULL 0 X#define EOF (-1) X#define ERR(s, c) if(opterr){\ X extern int strlen(), write();\ X char errbuf[2];\ X errbuf[0] = c; errbuf[1] = '\n';\ X (void) write(2, argv[0], (unsigned)strlen(argv[0]));\ X (void) write(2, s, (unsigned)strlen(s));\ X (void) write(2, errbuf, 2);} X Xextern int strcmp(); Xextern char *strchr(); X Xint opterr = 1; Xint optind = 1; Xint optopt; Xchar *optarg; X Xint Xgetopt(argc, argv, opts) Xregister int argc; Xchar **argv, *opts; X{ X static int sp = 1; X register int c; X register char *cp; X X if(sp == 1) X if(optind >= argc) X return(EOF); X else { X if(argv[optind][0] != '-') { X optarg = argv[optind++]; X return(NULL); X } X if(strcmp(argv[optind], "--") == NULL) { X optind++; X return(EOF); X } X } X optopt = c = argv[optind][sp]; X if(c == ':' || (cp=strchr(opts, c)) == NULL) { X ERR(": illegal option -- ", c); X if(argv[optind][++sp] == '\0') { X optind++; X sp = 1; X } X return('?'); X } X if(*++cp == ':') { X if(argv[optind][sp+1] != '\0') X optarg = &argv[optind++][sp+1]; X else if(++optind >= argc) { X ERR(": option requires an argument -- ", c); X sp = 1; X return('?'); X } else X optarg = argv[optind++]; X sp = 1; X } else { X if(argv[optind][++sp] == '\0') { X sp = 1; X optind++; X } X optarg = NULL; X } X return(c); X} SHAR_EOF echo "extracting hextoint.c" sed 's/^X//' << \SHAR_EOF > hextoint.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* this function takes a string of hex digits and returns its value */ X#include <ctype.h> X Xint hextoint(number) Xregister char *number; X{ X register int value = 0; X X while ( *number ) X if ( isxdigit(*number) ) { X value = ( value << 4 ) + toint(*number++); X } else { X return(value); X } X X return(value); X} SHAR_EOF echo "extracting isbdigit.c" sed 's/^X//' << \SHAR_EOF > isbdigit.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X tests whether the given character could be a binary digit X*/ X#include <stdio.h> X Xint isbdigit(c) Xregister char c; X{ X if ( c == '1' || c == '0' ) { X return(1); X } else { X return(NULL); X } X} SHAR_EOF echo "extracting iscsym.c" sed 's/^X//' << \SHAR_EOF > iscsym.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X this function returns a non-zero number if the character given X is suitable for the a character of an identifier X*/ X#include <ctype.h> X#define NULL 0 X Xint iscsym(c) Xregister char c; X{ X if ( iscsymf(c) || isdigit(c) ) X return(c); X X return(NULL); X} X SHAR_EOF echo "extracting iscsymf.c" sed 's/^X//' << \SHAR_EOF > iscsymf.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X iscsymf is included here because Manx for some reason does not have X it in ctype.h. tells whether or not the given character may be the X first character of a valid C symbol X*/ X#include <ctype.h> Xint iscsymf(c) Xregister char c; X{ X return( isalpha(c) || c == '_' ); X} SHAR_EOF echo "extracting isodigit.c" sed 's/^X//' << \SHAR_EOF > isodigit.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X returns a nonzero value if c is the code for an octal digit, otherwise X return zero X*/ X#include <ctype.h> X Xint isodigit(c) Xregister char c; X{ X if (c == '9' || c == '8') { X return(0); X } else { X return(isdigit(c)); X } X} X SHAR_EOF echo "extracting makefile" sed 's/^X//' << \SHAR_EOF > makefile X# X# makefile for the edlib library source directory X# Copyright 1989 Edwin Hoogerbeets X# X# make sure that lb is in your path or make will give you an exec failure X# X X# X# add +L to compile ed32.lib, and leave blank for ed.lib X# XCFLAGS=+L +fi X XOBJS= bintoint.o dectoint.o getopt.o hextoint.o isbdigit.o \ X iscsym.o iscsymf.o isodigit.o stolower.o stoupper.o \ X strcspn.o strpbrk.o strpos.o strrpos.o strspn.o \ X strtok.o toint.o basename.o stricmp.o strnicmp.o \ X strrpbrk.o strtod.o strdup.o getcwd.o chdir.o \ X filetype.o X Xtest32: test.o ed32.lib X ln test.o -led32 -lma32 -lc32 -o test32 X Xtest: test.o ed.lib X ln test.o -led -lma -lc -o test X Xed32.lib: $(OBJS) X lb ed32.lib $(OBJS) X Xed.lib: $(OBJS) X lb ed.lib $(OBJS) X Xclean: X -shell -c "rm $(OBJS)" X SHAR_EOF echo "extracting stolower.c" sed 's/^X//' << \SHAR_EOF > stolower.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X string to lower changes all upper case letters in a string to lower X case. X*/ X#include <ctype.h> X Xchar *stolower(str) Xregister char *str; X{ X register char *temp = str; X X for ( ; *temp ; temp++ ) X *temp = (char) tolower(*temp); X X return(str); X} SHAR_EOF echo "extracting stoupper.c" sed 's/^X//' << \SHAR_EOF > stoupper.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X string to upper changes all lower case letters in a string to upper X case. X*/ X#include <ctype.h> X Xchar *stoupper(str) Xregister char *str; X{ X register char *temp = str; X X for ( ; *temp ; temp++ ) X *temp = (char) toupper(*temp); X X return(str); X} SHAR_EOF echo "extracting strcspn.c" sed 's/^X//' << \SHAR_EOF > strcspn.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* Return the number of characters NOT from "charset" that are at the X * BEGINNING of string "string". X*/ X Xint strcspn(str, charset) Xregister char *str, *charset; X{ X register char *temp = str; X X while (!strchr(charset, *temp)) X ++temp; X X return(temp - str); X} X SHAR_EOF echo "extracting strdup.c" sed 's/^X//' << \SHAR_EOF > strdup.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X#include <errno.h> X X#define NULL 0L Xextern char *malloc(); X Xchar *strdup(str) Xregister char *str; X{ X register char *dup = malloc(strlen(str)); X X if ( !dup ) { X errno = ENOMEM; X return(NULL); X } X X if ( dup ) { X strcat(dup,str); X } X X return(dup); X} X SHAR_EOF echo "extracting stricmp.c" sed 's/^X//' << \SHAR_EOF > stricmp.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#include <ctype.h> X Xint stricmp(str1,str2) Xregister char *str1,*str2; X{ X register int index = 0; X X while ( str1[index] && str2[index] && X tolower(str1[index]) == tolower(str2[index]) ) X ++index; X X return( (tolower(str1[index]) < tolower(str2[index])) ? -1 : X ( (tolower(str1[index]) > tolower(str2[index])) ? 1 : 0) ); X} X SHAR_EOF echo "extracting strnicmp.c" sed 's/^X//' << \SHAR_EOF > strnicmp.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#include <ctype.h> X Xint strnicmp(str1,str2,len) Xregister char *str1,*str2; Xregister int len; X{ X register int index = 0; X X while ( str1[index] && str2[index] && index < len - 1 && X tolower(str1[index]) == tolower(str2[index]) ) X ++index; X X return( (tolower(str1[index]) < tolower(str2[index])) ? -1 : X ( (tolower(str1[index]) > tolower(str2[index])) ? 1 : 0) ); X} X SHAR_EOF echo "extracting strpbrk.c" sed 's/^X//' << \SHAR_EOF > strpbrk.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#define NULL 0L X Xchar *strpbrk(str, charset) Xregister char *str, *charset; X{ X register char *temp; X extern char *index(); X X temp = str; X X while ( *temp && !index(charset, *temp) ) X temp++; X X return( *temp ? temp : NULL); X} SHAR_EOF echo "extracting strpos.c" sed 's/^X//' << \SHAR_EOF > strpos.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X strpos searches the null-terminated string string for the first X occurance of the character "key". It returns either the position X or EOF if it is not found. X*/ X Xint strpos(string,key) Xregister char *string; Xregister char key; X{ X register int counter = 0; X X if ( !key ) X return(strlen(string)); X X while (string[counter]) { X if (string[counter] == key) X return(counter); X counter++; X } X return(-1); X} SHAR_EOF echo "extracting strrpbrk.c" sed 's/^X//' << \SHAR_EOF > strrpbrk.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#define NULL 0L X Xchar *strrpbrk(str, charset) Xregister char *str, *charset; X{ X register char *temp; X extern char *index(); X X temp = str + strlen(str) - 1; X X while ( temp != (str - 1) && !index(charset, *temp) ) X --temp; X X return( (temp != (str - 1)) ? temp : NULL); X} SHAR_EOF echo "extracting strrpos.c" sed 's/^X//' << \SHAR_EOF > strrpos.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X strrpos searches the null-terminated string string for the last X occurance of the character "key". It returns either the position X or -1 if it is not found. X*/ X Xint strrpos(string,key) Xregister char *string; Xregister char key; X{ X register char *temp; X X if ( !key ) X return(strlen(string)); X X for (temp = string + strlen(string) - 1; temp >= string ; temp-- ) X if ( *temp == key) X return(temp - string); X X return(-1); X} SHAR_EOF echo "extracting strspn.c" sed 's/^X//' << \SHAR_EOF > strspn.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* Return the number of characters from "charset" that are at the BEGINNING X * of string "str". X*/ X Xint strspn(str, charset) Xregister char *str, *charset; X{ X register char *temp = str; X X while ( index(charset, *temp) ) X ++temp; X X return(temp - str); X} SHAR_EOF echo "extracting strtod.c" sed 's/^X//' << \SHAR_EOF > strtod.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X X/* File : strtod.c X Author : Richard A. O'Keefe @ Quintus Computer Systems, Inc. X Updated: Saturday March 11, 1989 X Defines: double strtod(char *str, char**ptr) X*/ X X/* This is an implementation of the strtod() function described in the X System V manuals, with a different name to avoid linker problems. X All that str2dbl() does itself is check that the argument is well-formed X and is in range. It leaves the work of conversion to atof(), which is X assumed to exist and deliver correct results (if they can be represented). X X There are two reasons why this should be provided to the net: X (a) some UNIX systems do not yet have strtod(), or do not have it X available in the BSD "universe" (but they do have atof()). X (b) some of the UNIX systems that *do* have it get it wrong. X (some crash with large arguments, some assign the wrong *ptr value). X There is a reason why *we* are providing it: we need a correct version X of strtod(), and if we give this one away maybe someone will look for X mistakes in it and fix them for us (:-). X*/ X X/* The following constants are machine-specific. MD{MIN,MAX}EXPT are X integers and MD{MIN,MAX}FRAC are strings such that X 0.${MDMAXFRAC}e${MDMAXEXPT} is the largest representable double, X 0.${MDMINFRAC}e${MDMINEXPT} is the smallest representable +ve double X MD{MIN,MAX}FRAC must not have any trailing zeros. X The values here are for IEEE-754 64-bit floats. X It is not perfectly clear to me whether an IEEE infinity should be X returned for overflow, nor what a portable way of writing one is, X so HUGE is just 0.MAXFRAC*10**MAXEXPT (this seems still to be the X UNIX convention). X X I do know about <values.h>, but the whole point of this file is that X we can't always trust that stuff to be there or to be correct. X*/ X Xextern double atof(); /* Only called when result known to be ok */ X X#include "edlib.h" X#include <ctype.h> X#include <errno.h> Xextern int errno; X Xdouble strtod(str, ptr) Xchar *str; Xchar **ptr; X{ X int sign, scale, dotseen; X int esign, expt; X char *save; X register char *sp, *dp; X register int c; X char *buforg, *buflim; X char buffer[64]; /* 45-digit significand + */ X /* 13-digit exponent */ X sp = str; X while (*sp == ' ') X sp++; X X sign = 1; X X if (*sp == '-') { X sign -= 2; X sp++; X } X X dotseen = 0; X scale = 0; X dp = buffer; X X *dp++ = '0'; X *dp++ = '.'; X X buforg = dp; X buflim = buffer+48; X X for (save = sp; c = *sp; sp++) { X X if (c == '.') { X X if (dotseen) X break; X X dotseen++; X X } else if ( !isdigit(c) ) { X break; X X } else if (c == '0') { X X if (dp != buforg) { X X /* This is not the first digit, so we want to keep it */ X if (dp < buflim) { X *dp++ = c; X scale += 1; X } X X } else { X X /* No non-zero digits seen yet */ X /* If a . has been seen, scale must be adjusted */ X if (dotseen) X scale--; X } X } else { X X /* This is a nonzero digit, so we want to keep it */ X if (dp < buflim) X *dp++ = c; X X /* If it precedes a ., scale must be adjusted */ X if (!dotseen) X scale++; X } X } X if (sp == save) { X if (ptr) X *ptr = str; X errno = EDOM; /* what should this be? */ X return ZERO; X } X X while (dp > buforg && dp[-1] == '0') X --dp; X X if (dp == buforg) X *dp++ = '0'; X X *dp = '\0'; X X /* Now the contents of buffer are X +--+--------+-+--------+ X |0.|fraction|\|leftover| X +--+--------+-+--------+ X ^dp points here X where fraction begins with 0 iff it is "0", and has at most X 45 digits in it, and leftover is at least 16 characters. X */ X X save = sp; X expt = 0; X esign = 1; X X do { X c = *sp++; X X if (c != 'e' && c != 'E') X break; X X c = *sp++; X X if ( c == '-' ) { X esign -= 2; X c = *sp++; X } else if (c == '+' || c == ' ') { X c = *sp++; X } X X if ( !isdigit(c) ) X break; X X while (c == '0') X c = *sp++; X X for (; isdigit(c); c = *sp++) X expt = expt*10 + toint(c); X X if (esign < 0) X expt = -expt; X X save = sp-1; X X } while (0); X X if (ptr) X *ptr = save; X X expt += scale; X X /* Now the number is sign*0.fraction*10**expt */ X errno = ERANGE; X X if (expt > MDMAXEXPT) { X return(HUGE*sign); X } else if (expt == MDMAXEXPT) { X if (strcmp(buforg, MDMAXFRAC) > 0) X return(HUGE*sign); X } else if (expt < MDMINEXPT) { X return(ZERO*sign); X } else if (expt == MDMINEXPT) { X if (strcmp(buforg, MDMINFRAC) < 0) X return(ZERO*sign); X } X X /* We have now established that the number can be */ X /* represented without overflow or underflow */ X (void) sprintf(dp, "e%d", expt); X errno = 0; X return(atof(buffer)*sign); X} X SHAR_EOF echo "extracting strtok.c" sed 's/^X//' << \SHAR_EOF > strtok.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#define STRING_END '\0' X#ifndef NULL X#define NULL 0L X#endif X Xchar *strtok(buf, separators) Xregister char *buf, *separators; X{ X register char *token, *end; /* Start and end of token. */ X extern char *strpbrk(); X static char *fromLastTime; X X if (token = buf ? buf : fromLastTime) { X token += strspn(token, separators); /* Find token! */ X if (*token == STRING_END) X return(NULL); X fromLastTime = ((end = strpbrk(token,separators)) X ? &end[1] X : NULL); X *end = STRING_END; /* Cut it short! */ X } X return(token); X} SHAR_EOF echo "extracting test.c" sed 's/^X//' << \SHAR_EOF > test.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X#include <stdio.h> X#include "edlib.h" X#include <ctype.h> X#include <exec/types.h> X Xchar *b = "10101"; Xchar *d = "12345"; Xchar *h = "2a"; Xchar *zoo = "ifoo"; Xchar *zar = "Ibar"; X Xchar *s1 = "hey man this was in lower case."; Xchar *s2 = "THIS WAS ENTIRELY UPPER CASE IN THE FASHION OF IBM."; X Xchar *s3 = "hey man this was in lower case."; Xchar *s4 = "THIS WAS ENTIRELY UPPER CASE IN THE FASHION OF IBM."; X Xchar *file = "df1:edlib/1.1"; Xchar *file2 = "df0:foo"; Xchar *file3 = "foobar"; Xchar *file4 = "rad:c"; Xchar *file5 = "rad:edlib"; Xchar *doub = "00011020.332e+20"; X Xmain() X{ X char buf[BUFSIZ]; X X printf("basename of %s is %s\n",file,basename(file)); X printf("basename of %s is %s\n",file2,basename(file2)); X printf("basename of %s is %s\n",file3,basename(file3)); X X printf("getcwd reveals that the current dir is %s\n",getcwd(buf,BUFSIZ)); X printf("getcwd reveals again that the current dir is %s\n",getcwd(buf,BUFSIZ)); X printf("and changing directory to %s and then %s\n",file4,file5); X chdir(file4); X chdir(file5); X printf("getcwd reveals that the current dir is %s\n",getcwd(buf,BUFSIZ)); X X printf("strtod of %s is %f\n",doub,strtod(doub,NULL)); X X printf("Bin: %d\n",bintoint(b)); X printf("Dec: %d\n",dectoint(d)); X printf("Hex: %d\n",hextoint(h)); X X printf("Is 1 a bdigit? %d Is 'a'? %d\n",isbdigit('1'),isbdigit('a')); X X printf("iscsym: 'a' %d '_' %d '4' %d '!' %d '/' %d\n",iscsym('a'), X iscsym('_'), iscsym('4'), iscsym('!'), iscsym('/')); X X printf("iscsymf: 'a' %d '_' %d '4' %d '!' %d '/' %d\n",iscsymf('a'), X iscsymf('_'), iscsymf('4'), iscsymf('!'), iscsymf('/')); X X printf("isodigit: '2' %d '8' %d 'a' %d\n", isodigit('2'), isodigit('8'), X isodigit('a')); X X printf("stoupper: %s\n",stoupper(s1)); X printf("stolower: %s\n",stolower(s2)); X X printf("strcspn: '%s' '%s' gives %d\n",s3,"an",strcspn(s3,"an")); X X printf("stricmp: '%s' '%s' gives %d\n",s1,s3,stricmp(s1,s3)); X printf("strnicmp: '%s' '%s' 1 gives %d\n",zoo,zar,strnicmp(zoo,zar,1)); X X printf("strpbrk: '%s' '%s' gives '%s'\n",s3,"a",strpbrk(s3,"a")); X X printf("strpos: '%s' '%c' gives %d\n",s3,'a',strpos(s3,'a')); X X printf("strrpbrk: '%s' '%s' gives '%s'\n",s3,"a",strrpbrk(s3,"a")); X X printf("strrpos: '%s' '%s' gives %d\n",s3,'a',strrpos(s3,'a')); X X printf("strspn: '%s' '%s' gives %d\n",s3,"ma yeh",strspn(s3,"ma yeh")); X X printf("strtok: '%s'\n",s3); X printf(" tok1: '%s'\n",strtok(s3," ")); X printf(" tok2: '%s'\n",strtok(NULL," ")); X printf(" tok3: '%s'\n",strtok(NULL," ")); X X printf("toint: '1' %d 'b' %d 'k' %d\n",toint('1'),toint('b'),toint('k')); X X exit(0); X} X X X X SHAR_EOF echo "extracting toint.c" sed 's/^X//' << \SHAR_EOF > toint.c X/* X * edlib v1.1 Copyright 1989 Edwin Hoogerbeets X * This code is freely redistributable as long as no charge other than X * reasonable copying fees are levied for it. X */ X X/* X toint is also not included in Manx. converts an ascii character X into its corresponding hexadecimal value. Can be used for X binary and decimal digits since these are subsets of the X hexadecimal character set. X*/ Xint toint(c) Xregister char c; X{ X if ( c >= '0' && c <= '9') { X return( c - '0' ); X } else if ( c >= 'a' && c <= 'f' ) { X return( c - 'a' + 10 ); X } else if ( c >= 'A' && c <= 'F' ) { X return( c - 'A' + 10 ); X } else X return(-1); X} SHAR_EOF echo "End of archive 2 (of 2)" # if you want to concatenate archives, remove anything after this line exit