amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (10/10/90)
Submitted-by: nick@chopin.uucp (Dominic Giampaolo) Posting-number: Volume 90, Issue 270 Archive-name: libraries/ezlib/part02 #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 2 (of 2)." # Contents: Demo.uu doc/README ez.lib.uu src/demo.c src/getstring.c # src/screen.c # Wrapped by tadguy@abcfd20 on Tue Oct 9 20:59:52 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Demo.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Demo.uu'\" else echo shar: Extracting \"'Demo.uu'\" \(12809 characters\) sed "s/^X//" >'Demo.uu' <<'END_OF_FILE' Xbegin 644 Demo XM```#\P`````````#``````````(```AK````;@````$```/I```(:T[Z%Z1.- XM5?_H0JW__$*M__A"K?_T0JW_[$*M_^A(>``#3KH2V%A/2H!F*$AZ`O).NA<T; XM6$\O`$AZ`MQ.NAZ&+P!.NAZ<3^\`#$AX``I.NAR,6$](>``#2'D``(``3KH/9 XM6%!/*T#__$JM__QF#DZZ%BY(>``*3KH<9%A/0J="IT*G0J<@;?_\2&@`+$ZZ8 XM'[Q/[P`42'@`"4*G2'@`#TAX``$@;?_\2&@`+$ZZ'YY/[P`40J=(>``/2'@`B XM#TAX``(@;?_\2&@`+$ZZ'X!/[P`40J=(>``'2'@`#TAX``,@;?_\2&@`+$ZZ< XM'V)/[P`42'@`#D*G2'@`!TAX``0@;?_\2&@`+$ZZ'T1/[P`40J=(>``/0J=(? XM>``%(&W__$AH`"Q.NA\H3^\`%$AX__](>/__0J="IR\M__Q.N@Y23^\`%"M`, XM__A*K?_X9A@O+?_\3KH1/%A/3KH52$AX``I.NAM^6$](>/__2'H!PB\M__A.1 XMNB`<3^\`#"!M__@K:``R__!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I.E XM[O\N3OH``B!O``0L;(%J3N[^C$[Z``(L;(%J(F\`!"`O``A.[OW83OH``B)OF XM``0L;(%J3N[^AB`O``0L;(%J3N[^PD[Z``(@;P`$+&R!:D[N_H!,[P`#``0LA XM;(%"3N[^%")O``1,[P`#``@L;(%"3N[^U")O``0L;(%"3N[_LB)O``1,[P`#Q XM``@L;(%"3N[_"B)O``1,[P`/``@L;(%"3N[_3"!O``1,[P`#``@L;(%"3N[^? XM#B!O``1,[P`'``@L;(%"3N[^>B)O``1,[P`#``@L;(%"3N[_$")O``0@+P`(G XM+&R!0D[N_JHB;P`$(&\`""QL@4).[O^^(&\`!$SO``\`""QL@4).[O[@(F\`J XM!"!O``@@+P`,+&R!0B\'3J[_Q"X?3G5,[P,```0L;(&23N[_H"!O``0L;(&2< XM3N[_IB!O``0L;(&23N[_LB\*3.\'```(+&R!1DZN_C(D7TYU3.\#```$("\`Q XM#"QL@49.[O_6+PI,[P,```A,[P0#`!`L;(%&3J[^2B1?3G5(YP`P3.\/```,K XM3.\`#P`<+&R!1DZN_J1,WPP`3G4@;P`$+&R!1D[N_\H@;P`$+&R!1D[N_[X@? XM;P`$+&R!1D[N_[@@;P`$("\`""QL@49.[O]\(&\`!"QL@49.[OZV(&\`!"QL2 XM@49.[O\Z(&\`!"QL@49.[O\T+PI,[P<```@L;(%&3J[_(B1?3G4O"DSO!P``= XM""`O`!0L;(%&3J[^4"1?3G5,[P,```0L;(%&3N[_'"\*3.\'```(+&R!1DZNP XM_NPD7TYU(&\`!"QL@4I.[O_B``````/L`````0````$``!@:`````````_(`; XM``/J````60``````````````_P``````````````````````````````````% XM```!)````20`"P````L`````__[__@,```4````D````````````#0`2`2,`) XM"@```($`!````#@```````````````````````````````````!+````2P`+H XM````"P````#_____`P``!0```'0``````P`````*``$````````%#```````B XM`````.8`*`!*``H````!``$```"(`````````)@```````````````````,`' XM````"@`!````````!1(````````````*`"@`2@`*`````0`!````B```````R XM``#8``````````````````````(```(0#P`````!0`#(``$``0```0\`````6 XM`````````````````````````````````````````````````!0`````````4 XM```````#[`````<````!````0````%H```"0````O@```,8```#^```!!@``J XB``(`````````I````.0````````#\@```^L````!```#\L8`I X`` Xend Xsize 9124 END_OF_FILE if test 12809 -ne `wc -c <'Demo.uu'`; then echo shar: \"'Demo.uu'\" unpacked with wrong size! fi # end of 'Demo.uu' fi if test -f 'doc/README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'doc/README'\" else echo shar: Extracting \"'doc/README'\" \(9286 characters\) sed "s/^X//" >'doc/README' <<'END_OF_FILE' X X Ez.lib and Ezlib.h X - two things that will make your programming life easier - X X by X Dominic Giampaolo X X X X1. Introduction X X I have recently started into heavily programming the Amiga. Since Xthen, I've noticed that at times it can be *very* difficult to even get Xsimple things done. To that end I have started working on Ez.lib. X X Ez.lib is a link time library which has high level functions to Xaccomplish many of the mundane tasks of writing an "Amiga" program. X X The Ezlib functions have been designed to simplify the normal process Xof creating windows, gadgets, screens and other things. This is my first Xstab, but for the moment it serves my purposes quite well. Hopefully it Xwill do the same for you. X X Using Ez.lib is also straightforward. You simply #include <ezlib.h> in Xyour program, and link with ez.lib. That's it! X X X----------------------------------------------------------------------- X X X2. What's included? X X There are routines to open screens, gadgets, windows, get string input, Xget yes or no answers, use disk fonts, open libraries, and of course Xclosing all that stuff down. Now when I say "opening screens and windows", XI mean it - you'll see (read: no silly structures to painstakingly fill Xout). X X Probably the nicest function (IMHO) is the makescreen() call. Here is Xall you need to do to open a HiRes, Interlaced, 3 bitplane screen: X X X struct Screen *screen; X X screen = makescreen(HIRES|LACE, 3); X if (screen == NULL) X no_screen(); X X X That's it. *Everything* is handled with a single function call. You Xsimply specify the modes you would like and the depth, then presto. X X Compare this to what would normally be required. Notice you didn't Xeven have to bother opening grahics.library or intuition.library! The Xmakescreen() call checks those trivial things and covers your butt. X X Of course it wouldn't be nice if you had to go through the rigamorole Xof closing and freeing all that stuff. To that end, killscreen() takes Xcare of you, and with a single call, everything is properly deallocated and Xclosed down. X X X Now the first thing most people will say is, yeah great that's really Xnice, but what about { performance | size }? X X Performance really isn't an issue with these calls as you don't sit in Xa loop creating custom screens (at least I don't ;-). And if it really Xdoes matter, the code simply has a few if/then combinations to make sure Xyou get a valid screen. Certainly nothing computationally intensive. X X Size wise, the extra code for checking various parameters doesn't Xamount to a hill of beans. A demo program I wrote that uses *every* Xfunction in the library is still less than 9K - it accomplishes a fair Xamount too, and is one helluva lot easier to understand! X X X----------------------------------------------------------------------- X X X3. Let's go over roughly what is in Ez.lib X X These are short descriptions of what each function does. The complete X docs for each function are in the doc directory. X X Function Name What it does X ------------- ------------ X X openlibs(which_ones) Open the specified libraries. Which X libraries are opened depends on the X argument you specify. Can easily open X multiple libraries at once, error X checking each as it goes along. X X X makescreen(modes, depth) Opens a screen of said modes and depth X allocates any necessary bitmaps, etc... X Can handle any Amiga screen mode and X depth (not overscan though). X X X makewindow(screen, Open a standard Intuition window with all X l_edge, t_edge, the trimmings. Put it at l_edge (left X width, height) edge), t_edge (top edge) and give it X width and height for dimensions. If X screen is non null, open it there. X X X makeboolgadget(win, Create and add to your window an auto- X l_edge, t_edge, sized boxed boolean gadget. The top X text, id) corner will be as specified and the width X and height are figured dynamically. The X string will be centered in the gadget. X X X getstring(screen, Pop up a window with a string gadget to X title, default) get input from the user. The window will X have the given title, and you may give X a default string to place in the string X gadget. X X X getyn(window, string) Use an AutoRequest() to get a yes or no X answer from the user. The string you X specify is put in the requestor. X X X getfont(name, size) Open a disk based font for use in a X window or screen. You specify the name X of the font and its size, and the rest is X taken care of. X X X There are also functions to close down/deallocate the items you open Xwith these calls. You are not required to use the "kill" routines, but Xthey are guaranteed to be safe, and will free any previously allocated Xmemory and generally be smart about closing down. X X In addition there are a few lower level calls that give more Xflexibility in the objects they create. This is at the expense of a Xparameter or two extra which you must specify in the function call. There Xare also two low level bitmap allocation/de-allocation routines. X X------------------------------------------------------------------------- X X4. General X X These functions certainly don't cover everything you will ever need to Xdo on the Amiga, but they do make many things easier. For example, you can Xnow try out the graphics in your Amiga without having to worry about all Xthe nitty gritty details. X X As a similar example, I wanted to write a program to draw Lissajous Xcurves. First I was daunted by having to drag out the RKM's and start Xgoing through the NewScreen structure, etc. Now I simply call makescreen() Xonce and I'm ready to start drawing the curves! The entire source to draw Xthe curves is now less than 1.4K - and the bulk of that is simply setting Xup tables to make the calculations faster. The executable is around 6K. X X Using the getstring() function you can even create simple XIntuition'ized programs without any more effort than it would take to call Xthe same character/line oriented function (gets() or similar). X X And with the ability to trivially create boolean gadgets, what more can Xyou ask for? A completely Intuitioniz'ed calculator program could be Xcreated without much effort at all. X X As you can see, the functionality in Ez.lib will definately make many Xprograms easier to write and debug. You don't have to worry about making Xsure you properly allocated the bitplanes you needed, or making sure you Xdid it right. Instead, you concentrate on your code, knowing that the XEz.lib functions will cover the rest. X X---------------------------------------------------------------------- X X X5. Any thing else? X X Well, the real docs for all these functions are in the individual Xfiles in the doc directory. The return values and methods for calling them Xare also documented there. In addition, there are code fragments in the Xdocumentation that directly show the complete calling sequence for these Xfunctions. Hopefully, using these functions is straightforward. X X I will probably continue to add functionality to the library as needed. XI'd like to cover a lot more things (mainly other types of gadgets), but Xfor now the library is sufficient to be usable. X X I'd like to thank Dan Drake and Bob Koon for both listening to me Xbabble about this library and for giving me some good input. Thanks guys. X X Finally I'd like to give credit to the _Amiga Transactor_ (god rest Xits soul :) for having had excellent articles from which I learned plenty X(and from which some of this code came from!). In addition, I would like Xto thank the many nameless folks who have distributed public domain source Xcode for doing various things on the Amiga. I've learned a lot from that Xcode - thanks. And finally the folks at Commodore who wrote the RKM's, if Xit wasn't for them, I'd still just be using WorkBench ;^) X X X If you are interested in contacting me about bugs, problems, or Xquestions about EzLib, you can reach me in the following ways: X X X E-mail : nick@chopin.uunet.uu.net OR giampal@auvm.bitnet X X SNail Mail : Dominic Giampaolo X 4201 Mass. Ave. X Apt# 8067 West X Washington, D.C. 20016 X X Of course I'd really like to hear back from you if you have anything X(good or bad ;^) to say about these routines. X X Oh one final thing. This code is totally free for you to do whatever Xyou want with - excluding selling it for outrageous prices, saying that you Xwrote it, or any other generally evil things. Essentially this is in the Xspirit of GNU - code for anyone to use and learn from (however this code is Xnot under the GPL). X X--dominic X08/09/90 X X************************************************************************ X X NOTE: The library that is included in the distribution is for Manx 3.6. X If you use Manx 5.0 or Lattice, you WILL have to recompile the X source and make library from the object files. I don't know X Lattice, but I have included a Makefile for Manx, and it shouldn't X be too hard to do for Lattice. X X************************************************************************ X X END_OF_FILE if test 9286 -ne `wc -c <'doc/README'`; then echo shar: \"'doc/README'\" unpacked with wrong size! fi # end of 'doc/README' fi if test -f 'ez.lib.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ez.lib.uu'\" else echo shar: Extracting \"'ez.lib.uu'\" \(13756 characters\) sed "s/^X//" >'ez.lib.uu' <<'END_OF_FILE' Xbegin 644 ez.lib XM86H````"7V5Z7W-T<FEN9U]G861G971?4TEN9F\```)?97I?0F]R9&5R5F5CE XM=&]R<S$```)?97I?0F]R9&5R,0```E]E>E]S=')I;F=?9V%D9V5T7V=L;V)A, XM;````E]E>E]";W)D97)696-T;W)S,@```E]E>E]";W)D97(R```"7V5Z7TE4L XM97AT```"7V5Z7V]K7V=A9&=E=%]G;&]B86P```)?97I?251E>'0R```"7V5ZD XM7V-A;F-E;%]G861G971?9VQO8F%L```"7V=E='-T<FEN9P!N`U]G971F;VYT? XM`/<#7V=E='EN`'8$7V-R96%T95]B;V]L9V%D9V5T`'8$7VUA:V5B;V]L9V%D3 XM9V5T`'8$7VMI;&QG861G970`J05?8W)E871E=VEN9&]W`*D%7VQA8V5D7W=B( XM`*D%7VMI;&QW:6YD;W<`J05?;6%K97=I;F1O=P"D!E]M86ME<V-R965N`*0&E XM7V=E=&)I=&UA<`"D!E]G971?<F%S=&5R<P"D!E]F<F5E7V)I=&UA<`"D!E]K# XM:6QL<V-R965N`/@'7T=F>$)A<V4`^`=?26YT=6ET:6]N0F%S90#X!U]$:7-K$ XM9F]N=$)A<V4`^`=?07)P0F%S90#X!U]4<F%N<VQA=&]R0F%S90#X!U]297AXV XM4WES0F%S90#X!U]O<&5N;&EB<P#X!U]C;&]S96QI8G,`````````````````2 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=E='-T<FEN```"3@```1@`````D XM`!@``@!Z``D`=P%NP``#"@``7V5Z7W-T<FEN9U]G861G971?4TEN9F\``RH`Z XM)``!7V5Z7T)O<F1E<E9E8W1O<G,Q``,J`#@``5]E>E]";W)D97(Q``,*`$A?] XM97I?<W1R:6YG7V=A9&=E=%]G;&]B86P``RH`=``!7V5Z7T)O<F1E<E9E8W1O. XM<G,R``,J`(@``E]E>E]";W)D97(R``,J`)@``5]E>E])5&5X=``#"@"L7V5Z# XM7V]K7V=A9&=E=%]G;&]B86P``RH`V``!7V5Z7TE497AT,@`#"@#L7V5Z7V-AQ XM;F-E;%]G861G971?9VQO8F%L``((``Y?9V5T<W1R:6YG``<(``!?<W1R8W!Y> XM``<(``!?8W)E871E=VEN9&]W``<(``!?4V5T5VEN9&]W5&ET;&5S``<(``!?O XM061D1TQI<W0`!P@``%]2969R97-H1V%D9V5T<P`'"```7U=A:70`!P@``%]'@ XM971-<V<`!P@``%]S=')L96X`!P@``%]!;&QO8TUE;0`'"```7T%C=&EV871E= XM1V%D9V5T``<(``!?4F5P;'E-<V<`!P@``%]#;&]S95=I;F1O=P`'"```+F)E- XM9VEN``*@`````0*@``8``?4?``````````````#_`````!\`````````````\ XM````````$P````#T]1\``````20```$D``L````+$P````#T]1?__O_^`P``+ XM!?UQ`!,`````]/4?```````-`!(!(P`*````@1$`!/UR`!\`````````````_ XM````````%0```````/3U'P``````2P```$L`"P````L3`````/3U%_____\#; XM```%_70`$P````#T]1L#``````H``0````#](6``,!,`````]!4@($]+(`#U4 XM'P``````Y@`H`$H`"@````$1``']=0`3`````/UV`!T`````````````````I XM`/3U&P,`````"@`!`````/TA80`P$P````#T%T-A;F-E;```]1\```````H`# XM*`!*``H````!$0`!_74`$P````#]>``=``````````````````#T'TY5_CI"6 XMK?[\*WP````!_D(?*WP`!`)`_CXK?``",`[^.A]*K0`09Q`O+0`02&W_`4ZZ\ XM^GL`'5!/8`1"+?\!0>W^;$/Z^GD`'7`*(-E1R/_\0>W^F$/Z^G<`'7`*(-E1# XMR/_\0>W^Q$/Z^G,`'7`*(-E1R/_\0>W^2$/Z^G``'W`((-E1R/_\0>W^2"M(G XM_N8?0>W^F"M(_FQ![?[$*TC^F!\[?`%?_I([?`%@_KX[?`%A'_[J0>W_`2M(X XM_DA(>``W2'@?`3Q(>``N2'@`E"\M_CXO+1?^.B\M``A.NOI\`!]/[P`<*T#^B XM^$JM_OAF!G``'TY=3G5(>/__+RT`#"\M_O@13KKZ?0`?3^\`#$*G2'@``TAXK XM``%(;1?^;"\M_OA.NOI^`!]/[P`40J<O+?[X2&W^;$ZZ^G\`'T_O``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``+_^TAM__1.NOIY`!]83RM`__PO+?_P+RW_[$ZZ^GH`&5!/2BW_XV8.+RW0* XM`G$`$4ZZ^GL`$UA/0JW0`G$`'R`M__Q@`/]`+F9O;G0`9&D?<VMF;VYT+FQI< XM8G)A<GD``/4``$%*9V5T>6X```````%:````````````!@`!`"``"0`?`'_`P XM``((``!?9V5T>6X`!P@``%]!;&QO8TUE;0`'"```7TEN='5I5&5X=$QE;F=T> XM:``'"```7T%U=&]297%U97-T``<(``!?1G)E94UE;0`'"```+F)E9VEN```"K XM@`%,'TY5_^P,K0```&0`"&(&<``?3EU.=4AY``$``$AX`#Q.NOIQ`!]03RM`> XM__1*K?_T9@1P`&#>'R!M__31_````!0K2/_P(&T?__31_````"@K2/_L(&W_5 XM[!\1?``!``$@;?_P$7P``0`!'R!M__01?``!``$@;?_L$7P?``$``B!M__`1' XM?``!``(@;1__]!%\``$``B!M__0Q?``*'P`$(&W_]#%\``P`!B!M__0?(6T`T XM#``,(&W_\#%\``,`!A\@;?_P,7P``P`$(&W_\$/Z'P"*(4D`#"!M_^PQ?``#9 XM``8?(&W_[#%\``,`!"!M_^Q#^OHA8``U&2%)``PO+?_T3KKZ<@`?6$_0O```: XM`#(K0/_X#*T``!\`EO_X;`@K?````.'_^$AX'P`Z+RW_^$*G0J<O+?_L+RT;H XM__`O+?_T+RT`"$ZZ^G,`'T_O`"`K0/_\2'@`/"\M__013KKZ=``?4$\@+?_\2 XM8`#^QB!/2R``(!=#04Y#14P``/4```!!2F=A9&=E=``````#A```````````. XM``P````\``D`/`$SP``""```7V-R96%T95]B;V]L9V%D9V5T``<(``!?06QL< XM;V--96T`!P@``%]&<F5E365M``<(``!?26YT=6E497AT3&5N9W1H``<*``!?N XM1V9X0F%S90`""`*,7VUA:V5B;V]L9V%D9V5T``<(``!?061D1V%D9V5T``<(? XM``!?4F5F<F5S:$=,:7-T``((`Q!?:VEL;&=A9&=E=``'"```7U)E;6]V94=AI XM9&=E=``'"```7U)E9G)E<VA'861G971S``<(```N8F5G:6X````?3E7_[$*M^ XM__Q"K?_X0JW_]!\(+0`!`!-G!G``3EU.=0@M'P```!-F!@!M````$DAY``$7A XM``!(>``L3KKZ<0`?4$\K0/_\2'D``0``2'@`%!%.NOIQ`!]03RM`__A(>0`!_ XM``!(>``0$4ZZ^G$`'U!/*T#_]$JM__1G%$*G2'@3`!1.NOIQ`!]03R!M__0AW XM0``(2JW__&<6'TJM__AG$$JM__1G"B!M__0?2J@`"&9>2JW__&<.2'@`+!4O* XM+?_\3KKZ<@`?4$]*K?_X9PY(>``4+RW_^!%.NOIR`!]03TJM__1G*B!M__1*L XMJ``('V<22'@`%"!M__0O*``(3KKZ<@`;4$](>``0+RW_]$ZZ^G(`'U!/<`!@* XM`/\@(&W__#%M``H?``0@;?_\,6T`#@`&(&W__!\Q;0`2``P@;?_\,6T`%@`.9 XM'R!M__PQ;0`>`"8@;?_\,7P?``$`$"!M__PA;?_X`!H@;1___"%M__0`$B!M< XM__@0O``"'R!M__A"*``"(&W_^#%\``H?``0@;?_X,7P``P`&(&W_^!\A;0`8U XM``P@;?_T,+S__R!M'__T,7S__P`"(&W_]!%\``$?``0@;?_T0B@`!2!M__1"D XM*!\`!B!M__01?``%``<O+?_X$4ZZ^G,`'UA/T+P````6*T#_\`RM```?`![_V XM\&P(*WP````>__`@;=`"=``?(F@`FG``,"D`%%R`*T#_[!\@;?_T(F@`"$)1! XM(&W_]")H'P`(0FD``B!M__0B:``(,VT?__(`!"!M__0B:``(0FD`!A\@;?_T& XM(F@`"#-M__(`""!M'__T(F@`"#-M_^X`"B!M__0?(F@`"$)I``P@;?_T(F@`E XM"!\S;?_N``X@;?_T(F@`"$)I'P`0(&W_]")H``A":0`2("T?__!3@"!M__PQD XM0``(("W_[!]3@"!M__PQ0``*("W__&``'_V03E7_^$)M__X[?``!__P?<``P! XM+0`:+P`O+0`4<``P+1___"\`<``P+?_^+P`P+0`2'TC`+P`P+0`.2,`O`$ZZD XM_3@?3^\`&"M`__A*K?_X9@9P`!].74YU2'D``/__+RW_^"\M$P`(3KKZ=@`?# XM3^\`#$AX``%"IR\M``@O+1/_^$ZZ^G<`'T_O`!`@+?_X8,I.5?_\+RT7``PO> XM+0`(3KKZ>0`?4$]"IR\M``@@;0`(+R@`/A%.NOIZ`!]/[P`,2'@`%"!M``PBJ XM:``2%2\I``A.NOIR`!]03TAX`!`@;0`,+R@`$DZZ^G(`'U!/2'@`%"!M``PO! XM*``:3KKZ<@`;4$](>``L+RT`#$ZZ^G(`%5!/3EU.=?4`````04IW:6YD;W<`R XM`````FH````(```````1``(`2@`)`$@`^\```@@``%]C<F5A=&5W:6YD;W<`2 XM!PH``%]'9GA"87-E``<*``!?26YT=6ET:6]N0F%S90`'"```7V]P96YL:6)S( XM``<(``!?06QL;V--96T`!P@``"YM=6QU``<(``!?3W!E;E=I;F1O=P`'"```_ XM7T9R965-96T``@@!R%]L86-E9%]W8@`'"```7T=E=%!R969S``((`>I?:VEL% XM;'=I;F1O=P`'"```7T-L96%R365N=5-T<FEP``<(``!?1V5T37-G``<(``!?C XM4F5P;'E-<V<`!P@``%]#;&]S95=I;F1O=P`""`(^7VUA:V5W:6YD;W<`!P@`] XM`"YB96=I;@```X````.```053E7_]$JMT`)Q`!-G!DJMT`)R`!=F%$AX``-._ XMNOIS`!]83TJ`9@9P`$Y=3G5(>0`!%P``2'@`,$ZZ^G0`'U!/*T#_^$JM__AFT XM!'``8-X72JT`'&P.(&W0`G$`'W``,"@`VBM``!Q*K0`@;`@?*WP```7<`"`@@ XM;?_X(6T`#!\`#B!M__@A;0`0``H@;?_X'S"M`!8@;?_X,6T`'@`$(&T?__@Q% XM;0`:``(@;?_X,6T`(A\`!B!M__@Q?``\`"8@;?_X'S%\`!X`*"!M__@1?`#_K XM``@?(&W_^!%\`/\`"2!M__@Q?!\``0`N(&W_^"%M``@`'DJM'P`(9V0@;?_XD XM,7P`#P`N("T?`!30K0`<(&T`"#(H``Q(P1^P@6\6(&T`"#`H``Q(P)"M'P`4- XM(&W_^#%```0@+0`8T*T?`"`@;0`(,B@`#DC!L(%O%A\@;0`(,"@`#DC`D*T`U XM&"!M'__X,4``!F!@("T`%-"M`!P1(&W0`G$`&W(`,B@`VK"!8Q8@;=`"<0`?G XM<``P*`#:D*T`%"!M__@Q0!<`!&%64H`@;=`"<0`7<@`R*`#83KKZ=0`?*T#_7 XM_"`M`!C0K0`@L*W__!]O$"`M__R0K0`8(&W_^#%`%P`&+RW_^$ZZ^G8`'UA/T XM*T#_]$AX`#`O+?_X3KKZ=P`?4$\@+?_T8`#^6DY5_QA(>!<`Z$AM_QA.NOIY0 XM`!]03THM_]%G!G`!3EU.=7``'V#X3E4``$CG`#`D;0`(M?P?````9&0(3-\,J XM`$Y=3G5*JA<`'&<(+PI.NOI[`!U83TJJ`%9G&B\J`%9.NOI\`!M83R9`2H!G/ XM"B\+3KKZ?0`76$]@X"\*3KKZ?@`76$]@P$Y5``#U$P```@#T]1,``A`/]!\OD XM+0`8+RT`%"\M`!`O+0`,$2\MT`)@`!$O+=`"80`?+RT`"$ZZ_:!/[P`<3EU.# XM=?4```!!2G-C<F5E;@`````#1````"```````!@``0!B``D`80%4P``""```@ XM7VUA:V5S8W)E96X`!PH``%]'9GA"87-E``<*``!?26YT=6ET:6]N0F%S90`'" XM"```7V]P96YL:6)S``,```!?97I?1&5F875L=%-C<F5E;@`'"```7T]P96Y3; XM8W)E96X``@@!&%]G971B:71M87``!P@``%]!;&QO8TUE;0`'"```7TEN:71"( XM:71-87```@@!?%]G971?<F%S=&5R<P`'"```7T%L;&]C4F%S=&5R``<(``!?\ XM<W1R;&5N``<(``!?3W5T<'5T``<(``!?5W)I=&4`!P@``"YD:79S``<(```N` XM;75L=0`'"```7T)L=$-L96%R``((`GA?9G)E95]B:71M87``!P@``%]&<F5E+ XM4F%S=&5R``<(``!?1G)E94UE;0`""`+47VMI;&QS8W)E96X`!P@``%]$96QA/ XM>0`'"```7T-L;W-E4V-R965N``<(```N8F5G:6X``````H`",O4?``````%`*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)Y(&EN'R!Y;W5R($Q)0E,Z(&1I<F4?8W1O<GDN"@!.;R!R97AX<Q]Y<VQI8 XM8BYL:6)R87)Y(&EN'R!Y;W5R($Q)0E,Z(&1I<F478W1O<GDN"@`93E4```RM' XM````9-`&<@`38PXO+=`"<@`13KKZ?``36$]"K=`"<@`5#*T```!DT`9S`!-C] XM#B\MT`)S`!%.NOI\`!-83T*MT`)S`!4,K0```&30!G$`$V,.+RW0`G$`$4ZZA XM^GP`$UA/0JW0`G$`%0RM````9-`&<``38PXO+=`"<``13KKZ?``36$]"K=`"& XM<``5#*T```!DT`9T`!-C#B\MT`)T`!%.NOI\`!-83T*MT`)T`!4,K0```&302 XC!G4`$V,.+RW0`G4`$4ZZ^GP`$UA/0JW0`G4`$TY=3G7U``!T+ X`` Xend Xsize 9800 END_OF_FILE if test 13756 -ne `wc -c <'ez.lib.uu'`; then echo shar: \"'ez.lib.uu'\" unpacked with wrong size! fi # end of 'ez.lib.uu' fi if test -f 'src/demo.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'src/demo.c'\" else echo shar: Extracting \"'src/demo.c'\" \(4159 characters\) sed "s/^X//" >'src/demo.c' <<'END_OF_FILE' X/* This program "demos" most of the features of ezlib. X * X * The big thing to notice is how much it abstracts the code you are X * writing. You no longer have to write gobs and gobs of crap to deal X * with screens, and windows. X * X * Also notice, that you still should error check results from the ez.lib X * functions. This is the Amiga and not a protected memory environment, X * so failure to check the return values could be dangerous. X */ X X#include "ezlib.h" /* get in the door with ez.lib */ X X Xmain() X{ X struct Screen *screen=NULL; /* our custom screen */ X struct Window *wind=NULL; /* our window */ X struct Gadget *gadg=NULL; /* do-nothing gadget */ X struct RastPort *rp; /* rastport for Gfx calls */ X struct TextFont *tf=NULL; /* disk font ptr */ X char *string=NULL; /* return ptr from getstring() */ X X X /* in reality, this call to openlibs() isn't even needed as it will happen X * in makescreen() or makewindow(). However it makes things look more X * symetric with the closelibs() call at the end (which you really should X * make). X */ X if (openlibs(GFX|INTUI) == NULL) X { MSG("no libs?\n"); exit(10L); } X X X screen = makescreen(HIRES, 3); /* gets a 640x400 8 color screen */ X if (screen == NULL) X { closelibs(); exit(10); } /* safe exit just in case... */ X X X /* set up some some nice colors */ X setcolor(screen, 0, BLACK); setcolor(screen, 1, PINK); X setcolor(screen, 2, YELLOW); setcolor(screen, 3, ORANGE); X setcolor(screen, 4, INDIGO); setcolor(screen, 5, GREEN); X X X /* notice that even though these window dimensions are totally off, they X * are corrected in makewindow() X */ X wind = makewindow(screen, 0, 0, -1, -1); X if (wind == NULL) X { killscreen(screen); closelibs(); exit(10); } /* exit path */ X X X SetWindowTitles(wind, "EzLib Demo Program", -1); X X rp = wind->RPort; /* get a RastPort for calling the gfx library */ X X X /* if you happen to have this font in your fonts: directory, you're all X * set. If not, no biggie - we'll just use the default font. X */ X X tf = getfont("toronto.font", 12); X if (tf != NULL) X SetFont(rp, tf); X X /* get an input string from the user. */ X X string = getstring(screen, "Enter a string here:", "This is a default string"); X X if (string != NULL) { X Move(rp, 160, 40); X Print(rp, "You typed :"); /* ezlib #define for printing window text */ X Print(rp, string); X FreeMem(string, strlen(string)+1); X } X X X draw_stuff(rp); /* draw some simple graphics in the window */ X X X /* create a simple do-nothing gagdet */ X gadg = makeboolgadget(wind, 210, 175, "Don't have a cow dude!", 43); X X Move(rp, 200, 150); X Print(rp, "Ezlib makes programming fun."); /* be obnoxious here */ X Move(rp, 190, 170); X Print(rp, "Click the close gadget to exit"); X X X /* since the window has a close gadget, the first message will be from X * the user clicking the CLOSE gadget. Soooooo, we can just exit. X */ X WaitPort(wind->UserPort); X X getyn(wind, "Boy this sure is neat huh?"); /* just be annoying */ X X /* here we go through the motions of closing up shop */ X X if (tf) X CloseFont(tf); /* close the font we opened with the call to getfont() */ X X if (gadg) X killgadget(wind, gadg); /* free gadget resources */ X X killwindow(wind); /* close the window with error checking */ X killscreen(screen); /* do same for the screen */ X closelibs(); /* close any opened libraries here */ X exit(0); /* and finally call the normal exit() routine */ X} X X X/* this function will draw some simple graphics into your rastport. X * Some numbers are hardcoded, yes, but this is just a demo.... X */ Xdraw_stuff(rp) X struct RastPort *rp; X{ X int i; X X /* lets just draw some stuff on the screen */ X for(i=40; i < 160; i++ ) { X Line(rp, 10, i, 620, (200 - i) ); /* ezlib #define for drawing lines */ X SetAPen(rp, i % 16); /* change colors for each line */ X } X X for(i=20; i < 50; i++) { X Line(rp, 10, i, 620, i); X Circle(rp, 310, i, 10); /* ezlib #define for drawing circles */ X SetAPen(rp, i % 16); X } X} X END_OF_FILE if test 4159 -ne `wc -c <'src/demo.c'`; then echo shar: \"'src/demo.c'\" unpacked with wrong size! fi # end of 'src/demo.c' fi if test -f 'src/getstring.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'src/getstring.c'\" else echo shar: Extracting \"'src/getstring.c'\" \(6832 characters\) sed "s/^X//" >'src/getstring.c' <<'END_OF_FILE' X#include "ezlib.h" X X/* this file contains a function called getstring() which will prompt X * a user for a string, and the return it to you if they clicked o.k. X * or hit return in the string gadget X */ X X/* Yes, if you haven't already noticed, some of these structures were X * generated by PowerWindows. Also note that I had to mess around with X * the generated code a fair amount before it worked properly. X * X * One other thing. The reason these structures are declared global X * and then copied in down below is so that the routine will be completely X * re-entrant and won't modify any static data on multiple calls through X * the same code! This comes in handy when you have several children X * tasks using this code. X */ Xvoid *AllocMem(); X Xstruct StringInfo ez_string_gadget_SInfo = { X NULL, /* buffer where text will be edited - FILLED IN LATER*/ X NULL, /* optional undo buffer */ X 0, /* character position in buffer */ X 255, /* maximum number of characters to allow */ X 0, /* first displayed character buffer position */ X 0,0,0,0,0, /* Intuition initialized and maintained variables */ X 0, /* Rastport of gadget */ X 0, /* initial value for integer gadgets */ X NULL /* alternate keymap (fill in if you set the flag) */ X}; X XSHORT ez_BorderVectors1[] = { X 0,0, X 292,0, X 292,11, X 0,11, X 0,0 X}; Xstruct Border ez_Border1 = { X -2,-2, /* XY origin relative to container TopLeft */ X 3,0,JAM1, /* front pen, back pen and drawmode */ X 5, /* number of XY vectors */ X ez_BorderVectors1, /* pointer to XY vectors */ X NULL /* next border in list */ X}; X Xstruct Gadget ez_string_gadget_global = { X NULL, /* next gadget */ X 13,18, /* origin XY of hit box relative to window TopLeft */ X 291,10, /* hit box width and height */ X NULL, /* gadget flags */ X SELECTED+RELVERIFY, /* activation flags */ X STRGADGET, /* gadget type flags */ X (APTR)&ez_Border1, /* gadget border or image to be rendered */ X NULL, /* alternate imagery for selection */ X NULL, /* first IntuiText structure */ X NULL, /* gadget mutual-exclude long word */ X NULL, /* SpecialInfo structure */ X NULL, /* user-definable data */ X NULL /* pointer to user-definable data */ X}; X XSHORT ez_BorderVectors2[] = { X 0,0, X 75,0, X 75,11, X 0,11, X 0,0 X}; Xstruct Border ez_Border2 = { X -1,-1, /* XY origin relative to container TopLeft */ X 3,0,JAM1, /* front pen, back pen and drawmode */ X 5, /* number of XY vectors */ X ez_BorderVectors2, /* pointer to XY vectors */ X NULL /* next border in list */ X}; X Xstruct IntuiText ez_IText = { X 3,0,JAM1, /* front and back text pens, drawmode and fill byte */ X 10,1, /* XY origin relative to container TopLeft */ X NULL, /* font pointer or NULL for default */ X (UBYTE *)" OK ", /* pointer to text */ X NULL /* next IntuiText structure */ X}; X Xstruct Gadget ez_ok_gadget_global = { X NULL, /* next gadget */ X 230,40, /* origin XY of hit box relative to window TopLeft */ X 74,10, /* hit box width and height */ X NULL, /* gadget flags */ X RELVERIFY, /* activation flags */ X BOOLGADGET, /* gadget type flags */ X (APTR)&ez_Border2, /* gadget border or image to be rendered */ X NULL, /* alternate imagery for selection */ X &ez_IText, /* first IntuiText structure */ X NULL, /* gadget mutual-exclude long word */ X NULL, /* SpecialInfo structure */ X NULL, /* user-definable data */ X NULL /* pointer to user-definable data */ X}; X Xstruct IntuiText ez_IText2 = { X 3,0,JAM1, /* front and back text pens, drawmode and fill byte */ X 10,1, /* XY origin relative to container TopLeft */ X NULL, /* font pointer or NULL for default */ X (UBYTE *)"Cancel", /* pointer to text */ X NULL /* next IntuiText structure */ X}; X Xstruct Gadget ez_cancel_gadget_global = { X NULL, /* next gadget - filled in below */ X 10,40, /* origin XY of hit box relative to window TopLeft */ X 74,10, /* hit box width and height */ X NULL, /* gadget flags */ X RELVERIFY, /* activation flags */ X BOOLGADGET, /* gadget type flags */ X (APTR)&ez_Border2, /* gadget border or image to be rendered */ X NULL, /* alternate imagery for selection */ X &ez_IText2, /* first IntuiText structure */ X NULL, /* gadget mutual-exclude long word */ X NULL, /* SpecialInfo structure */ X NULL, /* user-definable data */ X NULL /* pointer to user-definable data */ X}; X X X/* some defines for our gadget id's for this window... */ X#define CANCEL_GADG 351 X#define SEARCH_GADG 352 X#define STRING_GADG 353 X X Xchar *getstring(screen, title, def_string) X struct Screen *screen; X UBYTE *title; X char *def_string; X{ X char buff[255], *string = NULL; X struct Window *win, *OpenWindow(); X struct IntuiMessage *msg, *GetMsg(); X struct Gadget *gadg, string_gadget, search_gadget, cancel_gadget; X struct StringInfo string_gadgetSInfo; X USHORT len; X LONG go_on = TRUE; X ULONG idcmp = GADGETUP+CLOSEWINDOW+ACTIVEWINDOW, /* IDCMP flags */ X flags = WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH+WINDOWACTIVE; X X if (def_string != NULL) X strcpy(buff, def_string); X else X buff[0] = 0; X X /* this part uses the structure assignment feature of Manx which I X * believe is part of ANSI C, so this should be o.k. X */ X cancel_gadget = ez_cancel_gadget_global; X search_gadget = ez_ok_gadget_global; X string_gadget = ez_string_gadget_global; X X string_gadgetSInfo = ez_string_gadget_SInfo; X string_gadget.SpecialInfo = (APTR) &string_gadgetSInfo; X X cancel_gadget.NextGadget = &search_gadget; X search_gadget.NextGadget = &string_gadget; X X cancel_gadget.GadgetID = CANCEL_GADG; X search_gadget.GadgetID = SEARCH_GADG; X string_gadget.GadgetID = STRING_GADG; X string_gadgetSInfo.Buffer = (UBYTE *)buff; X X win = createwindow(screen, flags, idcmp, 148, 46, 316, 55); X if ( win == NULL) X { return NULL; } X X /* put the window title in */ X SetWindowTitles(win, title, -1L); X X /* add the gadgets to the window and make them appear */ X AddGList(win, &cancel_gadget, 1, 3, NULL); X RefreshGadgets(&cancel_gadget, win, NULL); X X while (go_on) X { X Wait(1L << win->UserPort->mp_SigBit); X X while( go_on && (msg = GetMsg(win->UserPort)) ) X { X switch(msg->Class) X { X case GADGETUP : gadg = (struct Gadget *)msg->IAddress; X switch( gadg->GadgetID ) X { X case CANCEL_GADG : go_on = FALSE; X break; X X case SEARCH_GADG : /* fall through here... */ X X case STRING_GADG : go_on = FALSE; X len = strlen(buff) + 1; X if (len == 1) /* empty gadget */ X break; X string = (char *)AllocMem(len, 0L); X if (string == NULL) X break; X strcpy(string, buff); X break; X X default : break; X } X break; X X case ACTIVEWINDOW : ActivateGadget(&string_gadget, win, NULL); X break; X X case CLOSEWINDOW : go_on = FALSE; X break; X X default : break; X X } /* end of switch(msg->Class) */ X ReplyMsg(msg); X X } /* end of while(msg....) */ X X } /* end of while (go_on) */ X X CloseWindow(win); X X return string; X} X END_OF_FILE if test 6832 -ne `wc -c <'src/getstring.c'`; then echo shar: \"'src/getstring.c'\" unpacked with wrong size! fi # end of 'src/getstring.c' fi if test -f 'src/screen.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'src/screen.c'\" else echo shar: Extracting \"'src/screen.c'\" \(5063 characters\) sed "s/^X//" >'src/screen.c' <<'END_OF_FILE' X/* Screen and window functions. Creating and Closing them. X * Yes there are several functions in here that aren't documented. X * If you think you need them, go right ahead and use 'em. I felt X * it would be best to keep everything encapsulated the way it is. X * X * Dominic Giampaolo. X */ X X#include "ezlib.h" X Xextern struct GfxBase *GfxBase; Xextern struct IntuitionBase *IntuitionBase; Xextern int openlibs(); X Xvoid *AllocMem(); Xvoid *AllocRaster(); X Xstruct BitMap *getbitmap(); X X/* this function will open a custom screen for X * you. Simply tell it the type (HIRES, LACE, etc) and X * the depth. The rest is taken care of. X */ X X /* structure will be mostly filled in later */ X static struct NewScreen ez_DefaultScreen = X { X 0L, 0L, /* left edge, top edge */ X 320L, 200L, /* width, height */ X 1L, /* depth */ X 0L, 1L, /* detailpen, blockpen */ X 0L, /* ViewModes, */ X CUSTOMSCREEN|SCREENQUIET, /* type, */ X NULL, /* Font, */ X NULL, /* title, */ X NULL, NULL /* Gadgets, Bitmap */ X }; X X Xstruct Screen *makescreen(modes, depth) X register int modes; X register int depth; X{ X struct Screen *OpenScreen(), *temp_ptr; X struct NewScreen NewScreen; X X /* some sanity checking - short and fast */ X if(GfxBase == NULL || IntuitionBase == NULL) X if ( openlibs(GFX | INTUITION) == NULL) X return NULL; X X NewScreen = ez_DefaultScreen; /* copy in the default struct */ X X NewScreen.ViewModes = modes; /* assume modes value is o.k. */ X X if (modes & HIRES) X NewScreen.Width = 640; X if (modes & LACE) X NewScreen.Height = (SHORT)( 2 * GfxBase->NormalDisplayRows ); X else X NewScreen.Height = (SHORT)GfxBase->NormalDisplayRows; X X /* check depth field to make sure it agrees with resolution type */ X if (depth > 4 && (modes & HIRES)) X depth = 4; X X if (depth <= 0) X depth = 1; X X if (modes & HAM) /* make sure we have ok vals */ X { depth = 6; NewScreen.Width = 320; } X X if (modes & EXTRA_HALFBRITE) /* give valid values */ X { depth = 6; NewScreen.Width = 320; } X X /* make sure no foolishness here */ X if (depth > 6) X depth = 6; X X NewScreen.Depth = depth; /* o.k. to do this now */ X X /* now see if we have to allocate bitmap stuff */ X if (depth > 2) { X NewScreen.CustomBitMap = (struct BitMap *)getbitmap( depth, NewScreen.Width, NewScreen.Height ); X if (NewScreen.CustomBitMap == NULL) X return NULL; X NewScreen.Type |= CUSTOMBITMAP; X } X X temp_ptr = OpenScreen(&NewScreen); X X /* we shove the bitmap ptr into the user data field so we can free it X * properly later on. READ: don't use the ExtData field of your screen, X * or if you do, save it first and then restore it before calling X * killscreen()! X */ X X if (temp_ptr != NULL && depth > 2) X temp_ptr->ExtData = (UBYTE *)NewScreen.CustomBitMap; X X return temp_ptr; X} /* end of makescreen() */ X X Xstruct BitMap *getbitmap(depth, width, height) X int depth, width, height; X{ X register struct BitMap *bm; X X if(depth > 8) X return NULL; X X bm = (struct BitMap*)AllocMem(sizeof(struct BitMap), MEMF_CLEAR); X if ( bm == NULL) X return NULL; X X InitBitMap(bm, depth, width, height); X X /* takes care of freeing bitmap struct if it fails */ X if ( get_rasters(bm, width, height) == NULL) X return NULL; X X return bm; X} /* end of getbitmap() */ X X X X/* Ripoff notice : This code is pretty much straight out of the Transactor X * volume 1, issue 3. I modified it somewhat however. X * It will nicely allocate all of the required bit plane pointers for your X * specified bitmap structure. Return NULL if something screws up. X */ Xget_rasters(bm, width, height) X register struct BitMap *bm; X int width, height; X{ X register int i; X register long size; X X size = bm->Rows * bm->BytesPerRow; X X for (i=0; i < bm->Depth; i++) X { X bm->Planes[i] = (PLANEPTR) AllocRaster( width, height); X X if (bm->Planes[i] == NULL) X { X MSG("No mem for BitMap data. Exiting.\n"); X return free_bitmap(bm, width, height); X } X X BltClear(bm->Planes[i], ((width/8) * height), 1L); X } X return 1; X} /* end of AllocRasters() */ X X Xfree_bitmap(bm, width, height) X register struct BitMap *bm; X int width, height; X{ X register int i; X X /* if a plane pointer is null, this for loop exits */ X for (i=0; bm->Planes[i] && i < bm->Depth; i++) { X FreeRaster(bm->Planes[i], (LONG)width, (LONG)height); X } X X FreeMem(bm, sizeof(struct BitMap)); X return NULL; X} /* end of FreeRasters() */ X X Xkillscreen(screen) X register struct Screen *screen; X{ X register struct BitMap *bm = NULL; X int width, height; X X /* just to make sure we aren't getting garbage */ X if(screen < 100) X return; X X while(screen->FirstWindow != NULL) /* still got windows on this screen */ X Delay(50L); /* wait a while for the window to go away */ X X X if (screen->BitMap.Depth > 2) { X bm = (struct BitMap *)screen->ExtData; X width = screen->Width; height = screen->Height; X } X X CloseScreen(screen); /* do this first. */ X X if(bm != NULL) X free_bitmap(bm, width, height); X} X X END_OF_FILE if test 5063 -ne `wc -c <'src/screen.c'`; then echo shar: \"'src/screen.c'\" unpacked with wrong size! fi # end of 'src/screen.c' fi echo shar: End of archive 2 \(of 2\). cp /dev/null ark2isdone MISSING="" for I in 1 2 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked both archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Mail submissions (sources or binaries) to <amiga@uunet.uu.net>. Mail comments to the moderator at <amiga-request@uunet.uu.net>. Post requests for sources, and general discussion to comp.sys.amiga.