home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Information / Digests / Alt-Sources-Mac / digest-02-94 < prev    next >
Encoding:
Text File  |  1994-12-08  |  19.6 KB  |  500 lines  |  [TEXT/R*ch]

  1. alt.sources.mac digest #2-94                      1/26/94
  2.  
  3. Today's Contents:
  4.  
  5.   [!] administrivia
  6.  
  7.   [*] antialiasedtext.cpt.hqx
  8.   [*] asyncsysbeep.cpt.hqx
  9.   [*] blazingpixels.cpt.hqx
  10.   [*] logfile.cpt.hqx
  11.   [*] newshuttle.cpt.hqx
  12.   [*] patchlib.cpt.hqx
  13.   [*] popupcdef-1.0b1.cpt.hqx
  14.   [*] speedy-mouse-ii.cpt.hqx
  15.   [*] spline.cpt.hqx
  16.   [*] toxicwaste.cpt.hqx
  17.   [*] wintershell-10d2.cpt.hqx
  18.   
  19.   [#] balloonhelp
  20.   [#] bandpass
  21.   [#] copystr255
  22.   [#] dbllinklist-c
  23.   [#] digitalaudio
  24.   [#] drawgoawaybox
  25.   [#] editinmodeless
  26.   [#] flipnums
  27.   [#] getwindowrect
  28.   [#] gmtime
  29.   [#] growicononly
  30.   [#] growzone
  31.   [#] listdir
  32.   [#] listspclkeys-c
  33.   [#] listspclkeys-p
  34.   [#] lzcompression
  35.   [#] menudraw
  36.   [#] modelessdragger
  37.   [#] mousemoved
  38.   [#] quitallapps
  39.   [#] readlocation
  40.   [#] setdialoghdrs
  41.   [#] videosync
  42.   [#] whendrawbw
  43.   [#] xprammap  
  44.  
  45.   [!] Who's Who List
  46.   
  47.   The alt.sources.mac archive is at ftpbio.bgsu.edu
  48. (129.1.252.66) in the /ftp/pub/alt.sources.mac directory.  
  49. Files listed with an [*] before them are in the main
  50. directory.  Files listed with an [#] in front of them
  51. are in the /ftp/pub/alt.sources.mac/00snippet directory.
  52. Scripts are stored in the /ftp/pub/alt.sources.mac/scripts
  53. directory.
  54.  
  55.   Also stored at the archive site are the FAQs for the
  56. Mac newsgroups in the /ftp/pub directory.  Postings to
  57. comp.sources.mac are archived in the /ftp/pub/comp.sources.mac
  58. directory.  The alt.sources.mac digests are archived in the
  59. /ftp/pub/digests directory.
  60.  
  61.   The alt.sources.mac newsgroup is for the distribution of
  62. sources only.
  63.  
  64. ************************************************************
  65.  
  66. From: dnebing@andy.bgsu.edu (Dave Nebinger)
  67. Subject: Administrivia
  68.  
  69.   Welcome to the alt.sources.mac digest.  Currently, I am
  70. the moderator of the archive.  I thought I would post this
  71. message to show everyone what has been accumulating at the
  72. archive site.
  73.  
  74.   Your contributions are highly recommended and accepted.
  75. If you don't have access to the alt.sources.mac newsgroup,
  76. you can email your contribution to me (dnebing@andy.bgsu.edu)
  77. and I will add it to the archive, or you can upload it to
  78. the /ftp/pub/incoming directory at the archive site.
  79.  
  80.   I would also recommend to those programmers posting
  81. snippets to the comp.sys.mac.* heirarchy to also crosspost
  82. them to the alt.sources.mac group so that I can make sure
  83. that it gets added to the archive.
  84.  
  85.   A new addition to the digest is the Who's Who list found at
  86. the end of the digest.  It contains the list of contributors for
  87. the digest.  It will give you, at a glance, an idea about who
  88. is supporting the alt.sources.mac group.
  89.  
  90.   There has been somewhat of a dispute about the fact that I
  91. have stored the undocumented Layer Manager stuff at the
  92. archive.  Apple's postition is that it is for their internal
  93. use only, and if anyone else uses it their package is guaranteed
  94. to break in the future.  Others disagree with this point of
  95. view and would like the information available.  So I am going
  96. to keep it in the archive, but I have added a strict warning to
  97. the snippet about this.
  98.  
  99.   There are also some new documents at ftpbio.bgsu.edu in
  100. the /ftp/pub directory.  Here you will find the FAQ's for most
  101. of the mac programming groups, as well as the ones for
  102. alt.sources.mac.  Also there is a document describing the
  103. submission policy for the archive which includes directions
  104. for posting to alt.sources.mac.  If anything is missing that
  105. you feel should be there, either email it to me or upload it
  106. to ftpbio.bgsu.edu in /ftp/pub/incoming.
  107.  
  108.   Thanks for you support, and if you have any questions,
  109. problems, or maladjustments, feel free to email me.  Also, let
  110. me know if you have any problems accessing the archive.  One
  111. user has already alerted me to an access problem that they were
  112. having.  The only way I can fix things is if I am told...
  113.  
  114.   Dave Nebinger (dnebing@andy.bgsu.edu)
  115.   
  116. ************************************************************
  117. From: Ed Wynne <arwyn@engin.umich.edu>
  118. Subject: Anti-Aliased Text
  119.  
  120. Included is a binhex 4.0 stuffit archive of Think C source
  121. code and a library to draw anti-aliased text with a small
  122. demo app.  I wrote it in the space of an afternoon so it isn't
  123. extremely robust, or probably even bug-free.  Itseems to work
  124. very well on a Centris650 and a IIsi...although, its a little 
  125. slower on the IIsi!
  126.  
  127. Currently this code has one function that mimics DrawString
  128. in every way, except it will only work with black text on a
  129. white background.  At some point I plan on adding forecolor
  130. and backcolor support and I'll repost it then if theirs any
  131. interest.
  132.  
  133. If anybody uses this code (its free...no restrictions
  134. what-so-ever!) all I ask is that you tell me of any bugs you
  135. find (so I can fix them!) or you send me a copy of your fixes.
  136.  
  137. [archived as /ftp/pub/alt.sources.mac/antialiasedtext.cpt.hqx]
  138. ============================================================
  139.  
  140. From: Ed Wynne <arwyn@engin.umich.edu>
  141. Subject: INIT source for asyncronous SysBeep
  142.  
  143. Enclosed is the source (Think C 6.0) and the compiled init that
  144. will make the System Beep totally asyncronous.  This init only
  145. takes about 650 bytes of system heap space and doesn't keep
  146. snd's loaded or sound channels continuously allocated.
  147.  
  148. It might have some compatibility problems on older macs (I don't
  149. do all of the hw config checks that apple does to get the SysBeep
  150. ID from PRAM) but it works OK on a Centris 650.  If you find a 
  151. bug, or a problem with it let me know and I'll fix it.  Or if you
  152. find a bug and decide to fix it yourself, if it isn't too much
  153. trouble please pass this info back onto me.  (I'm running it too!)
  154.  
  155. [archived as /ftp/pub/alt.sources.mac/asyncsysbeep.cpt.hqx]
  156. ============================================================
  157.  
  158. From: kenlong@netcom.com (Ken Long)
  159. Subject: BlazingPixels (descr)
  160.  
  161. Blazing Pixels is a little bit map sprite demo, written by Jay Riley, 
  162. former moderator of the BMUG Programmer's Conference.  On launch, it 
  163. implements one routine: main ().
  164.  
  165. What it does in put up a window, fill it with gray, and move the System 
  166. 'ICN#' (ID 3) around according to mouse location.  The unique thing (I 
  167. though, and what do I know?) is that it uses the absolute minimum code to 
  168. do this.  Also has a VBL synch block of code.
  169.  
  170. I split this main () routine up into 16 subroutines in a modified 
  171. version, included, that uses a resource for the 'ICN#' ID 128, for the 
  172. fun of it.  The icon is my mug.
  173.  
  174. [archived as /ftp/pub/alt.sources.mac/blazingpixels.cpt.hqx]
  175. ============================================================
  176.  
  177. From: dnebing@andy.bgsu.edu (Dave Nebinger)
  178. Subject: Log file routines
  179.  
  180. Here's a nice little, tiny, documented chunk of code for handling
  181. the creation and use of log files in your project.  It works great
  182. for those hard to debug items like bg-apps, inits, etc.
  183.  
  184. Written in Think C 6.01, requires use of FindFolder and the
  185. (at least) ansi-small library.
  186.  
  187. [archived as /ftp/pub/alt.sources.mac/logfile.cpt.hqx]
  188. ============================================================
  189.  
  190. From: kenlong@netcom.com (Ken Long)
  191. Subject: NewShuttle 1.0d3 description
  192.  
  193. NewShuttle is a C port (from Pascal) I did of "Eddy's Shuttle Viewer" - a 
  194. point plotter that draws a wire frame space shuttle with 129 "MoveTo and 
  195. LineTo" calls, according to specified and calculated (on the fly) values.
  196. Then the whole thing is erased and a new, rotated-slightly view is drawn.
  197. This goes on until mouseDown at the end of a cycle. (press and hold down.)
  198.  
  199. NewShuttle 1.0d3 is a further tweak of that same C port (posted on SUMEX 
  200. in "three-point-plotters-c").  This one draws in the whole 512x384 
  201. window, after hiding the menu bar.  I also have a duplicate draw routine, 
  202. that runs first, which takes the calculated MoveTo/LineTo coordinates, 
  203. "nums them to strings," then lists those in 7 columns on the screen.  
  204. THEN it draws the shuttle over them (in yellow if you have color).
  205.  
  206. Future fiddling will output the point coord's to a text file (just for 
  207. the fun of it) and user options to draw them or not.  Also a 
  208. screenBits.bounds calc. into the value math to do the full screen draw in 
  209. proportion on any monitor (I hate the 12" RGB anyway).  Looks funky with 
  210. a 512x384 plain window in the upper left of a 21" RGB with the menu bar 
  211. gone!  And a little, dinky line drawing in it!
  212.  
  213. In the meantime, here's this.  Just a toy, but it's C source!
  214.  
  215. [archived as /ftp/pub/alt.sources.mac/newshuttle.cpt.hqx]
  216. ============================================================
  217.  
  218. From: ari@world.std.com (Ari I Halberstadt)
  219. Subject: Re: [Q] How does one patch the trap _FrontWindow?
  220.  
  221. Following is some THINK C assembly glue which I use in all my trap
  222. patches. It uses some assembly language tricks, but I've used it to
  223. successfully patch HiliteWindow, ExitToShell, and LoadSeg. It allows
  224. the patch routine to skip execution of the original routine and to
  225. return a value as the value of the patch.  Actually, the skip flag has
  226. been tested, but the BlockMove instruction for copying the return
  227. result hasn't been tested since I just haven't had occasion to patch a
  228. routine that returns a value. The patch glue allows only head patches.
  229.  
  230. You could easily modify the glue to work from an INIT by changing the
  231. call to NewPtrClear to NewPtrSysClear, though the merits of creating
  232. pointers in the system heap are debatable. Perhaps you could make it a
  233. relocatable block with the first few instructions after saving the
  234. registers being a call to HGetState/HLock, and just before the last
  235. instruction call HSetState (use HSetState, not HUnlock, so your code
  236. is reentrant).
  237.  
  238. [archived as /ftp/pub/alt.sources.mac/patchlib.cpt.hqx]
  239. ============================================================
  240.  
  241. From: ari@world.std.com (Ari I Halberstadt)
  242. Subject: Type-in Popup CDEF
  243.  
  244. This popup CDEF is compatible with systems 6.0 and 7.0 and is similar
  245. to the standard popup CDEF supplied with system 7.0 and described in
  246. IM-VI. An additional variation code, popupTypeIn, helps support
  247. type-in popup menus by displaying only the down arrow without the
  248. current selection or title. The application still needs to support
  249. the editable text field for the type-in popup menu. Except for the
  250. popupTypeIn attribute this CDEF should be upwards compatible with
  251. the system 7.0 CDEF. The MDEF is used to draw the current selection,
  252. so that even icons in menus are properly displayed. The only major
  253. feature missing is color support, but this should not be difficult
  254. for someone to add. Full C source for THINK C 5.0.4 is included.
  255.  
  256. This software is freeware and may be included in the info-mac
  257. commercial CD-ROM. For all other commercial distribution please
  258. contact the author.
  259.  
  260. [archived as /ftp/pub/alt.sources.mac/popupcdef-1.0b1.cpt.hqx]
  261. ============================================================
  262.  
  263. From: f8dy@access.netaxs.com (Mark Pilgrim)
  264. Subject: Speedy Mouse ][ (INIT, THINK C) 0 of 1
  265.  
  266. Language: THINK C (5/6)
  267. Type: INIT
  268.  
  269. Speedy Mouse ][ will make your mouse move about twice as fast as normal,
  270. unless the caps lock is down, in which case it will be back to normal speed.
  271. After many users complaining that Speedy Mouse didn't work on their system,
  272. or it did work but conflicted with several other software packages, I have
  273. completely reworked this to come up with a sequel which, like all sequels,
  274. solves all the problems of the original but probably creates new problems
  275. in the process.
  276.  
  277. This INIT installs a vbl (a relatively easy task) and initializes a memory
  278. space before the vbl pointer so that the vbl itself can access it (a
  279. relatively easy task if you know what you're doing, which I didn't when I
  280. started).  The vbl itself finds the current 'mcky' resource in the system
  281. heap (quite a difficult task) and mucks with it, and monitors the low-mem
  282. copy of parameter RAM to notice when the mouse scaling setting has been
  283. changed (an easy but undocumented task) and re-mucks with the 'mcky' data.
  284. The upshot of it is that this INIT never touches the low-memory globals that
  285. control the actual mouse position, so it shouldn't conflict with any other
  286. software that does (like Snap-To, Quickeys, and voice navigation software).
  287. OTOH, it may have some new problems that I'm not aware of.  In any event,
  288. I heartily don't recommend any of the methods I use in here; to quote an
  289. Apple guru on csmp, "We've reserved a special place in hell for you for even
  290. THINKING about using any of this information."
  291.  
  292. [archived as /ftp/pub/alt.sources.mac/speedy-mouse-ii.cpt.hqx]
  293. ============================================================
  294.  
  295. From: foster@gaul.csd.uwo.ca (COLIN FOSTER)
  296. Subject: Spline Project 0/2
  297.  
  298. Contained in the archive are source files, Think C project, 
  299. and program for a Graphics program using Splines, prepared by
  300. Reid Ellis.  It's not exactly what was requested, but it 
  301. might be useful.
  302.  
  303.  
  304. -Colin Foster.
  305.  
  306. Colin_Foster@magic-bbs.corp.apple.com
  307.  
  308. [archived as /ftp/pub/alt.sources.mac/spline.cpt.hqx]
  309. ============================================================
  310.  
  311. From: David_K._Peck@digntn1.csgi.com
  312. Subject: Network Message CODE
  313.  
  314. Since so many people requested it, here is a copy of Toxic Waste, my network
  315. practical joke program. It also contains a copy of the code, which should be a
  316. very good example of how to send data over a Macintosh network. I hope you enjoy
  317. it!
  318.  
  319. I am a bit worried that the file is too big to send from the machine I am
  320. using; in that case, it will cut it off... and it won't work. Please tell me
  321. if it doesn't and I'll send it in smaller segments. The file name is TW.CPT,
  322. and it is 51k in size.
  323.  
  324. Send any questions, comments, or bugs to:
  325. David Peck
  326. PeckSoftware@his.com
  327.  
  328. [archived as /ftp/pub/alt.sources.mac/toxicwaste.cpt.hqx]
  329. ============================================================
  330.  
  331. From: ari@world.std.com (Ari I Halberstadt)
  332. Subject: winter-shell-10d2-c.cpt.hqx, part 01/20
  333.  
  334. Source code for a Macintosh application shell. Approximately 1.1
  335. megabytes of C source code are provided (at 27 characters per line,
  336. that's over 40000 lines). Both systems 6 and 7 are supported.  You may
  337. use this as the basis for an application, or you may extract any
  338. useful functions you find for use in your own code. There are many
  339. useful code snippets in here, and the code should prove useful for
  340. both beginner and experienced Macintosh programmers. The code was
  341. written with THINK C 5.0.4, though porting to MPW should not be too
  342. difficult; guidelines for porting are included in the file "Porting".
  343. The software is free, and may be used in any free product according to
  344. the terms described in the file "Distribution". For commercial use
  345. please contact the author.
  346.  
  347. This is the first public release. Documentation is sparse; if there is
  348. interest and as time permits I may write additional documentation.
  349.  
  350.  
  351. [archived as /ftp/pub/alt.sources.mac/wintershell-10d2.cpt.hqx]
  352.  
  353. ************************************************************
  354.  
  355. balloonhelp     Perl and Rez scripts for doing Balloon Help
  356.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  357.   Perl and Rez scripts for creating balloon help.
  358.  
  359. bandpass        Band-pass filter
  360.   Rick Walker (walker@opus.hpl.hp.com)
  361.   C source for a band-pass filter [converts sounds between
  362.   frequencies]
  363.  
  364. copystr255      Copying a Str255
  365.   Keith Rollin (keith@taligent.com)
  366.   Demonstrating a quick way in C to copy a Str255 variable.
  367.  
  368. dbllinklist-c   Doubly Linked List Code in C
  369.   Mike Russel (mgr@aggroup.aggroup.com)
  370.   C code that implements a doubly linked list.
  371.  
  372. digitalaudio    Reading digital audio with a CD300
  373.   Theo Vosse (vosse@ruls41.leidenuniv.nl)
  374.   C routines to read sound tracks from a CD300 and play em.
  375.  
  376. drawgoawaybox   Routine for drawing the go away box
  377.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  378.   C function for drawing a go away box.
  379.  
  380. editinmodeless  Implementing edit functions in a modeless dlg
  381.   Andrew McClure (andrew@cs.uwa.oz.au)
  382.   C function for implementing the standard edit functions in a
  383.   modeless dialog.
  384.  
  385. flipnums        Flip between little and big endians
  386.   Ron Hunsinger (ron_hunsinger@bmug.org)
  387.   C functions to flip the byte orders of shorts and longs.
  388.  
  389. getwindowrect   Getting a window's rectangle
  390.   Robert Mah (rmah@panix.com)
  391.   C function to get a window's rectangle.  This rect can then
  392.   be saved and used to reposition and resize a window.
  393.  
  394. gmtime          Getting the time zone of the mac.
  395.   Richard Knuckey (richard@purplex.nacjack.gen.nz)
  396.   C routine to implement gmtime (of un*x fame) on the mac.
  397.  
  398. growicononly    Drawing the Grow Icon without the empty scroll bars
  399.   Frank Manshade (frankm@and.nl)
  400.   C function for drawing the grow icon for a window without also
  401.   drawing the empty scroll bars.
  402.  
  403. growzone        Growing the app's zone
  404.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  405.   Pascal routines for modifying the size of the application's
  406.   zone.
  407.  
  408. listdir         List a volume or directory textually
  409.   Jon Wtte (d88-jwa@hemul.nada.kth.se)
  410.   C routines to list the contents of a volume/directory.
  411.   [Sorry for not being able to get your name right, Jon - Dave]
  412.  
  413. listspclkeys-c  Implementing special keys with a list
  414.   Peter Kocourek (qsi@nu91.wlink.nl)
  415.   C routines to implement the use of special keys (i.e. page
  416.   up and down) with a list.
  417.  
  418. listspclkeys-p  Implementing special keys with a list
  419.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  420.   Pascal routines to implement the use of special keys (i.e. page
  421.   up and down) with a list.
  422.  
  423. lzcompression   lz compression source
  424.   Derek Kwan (dkwan@zeus.uwaterloo.ca)
  425.   C routines to implement lzss, lz-huffman, and lz-ari code.
  426.  
  427. menudraw        Drawing on the right side of the menu
  428.   Keith Rollin (keith@taligent.com)
  429.   C routines for drawing the time on the right side of the menu.
  430.  
  431. modelessdragger FilterProc for SFPGetFile
  432.   Andrew McClure (andrew@cs.uwa.oz.au)
  433.   C FilterProc routine for SFPGetFile that allows dragging
  434.   of windows behind the SFPGetFile window.
  435.  
  436. mousemoved      Getting the location of the mouse pointer
  437.   Ken Long (kenlong@netcom.com)
  438.   C routine to get the location of the mouse and convert it to
  439.   a string which can be printed.
  440.  
  441. quitallapps     How to quit all apps...
  442.   Andrew Francke (afrancke@netcom.com)
  443.   C functions showing how to restart a mac after a given time
  444.   period has elapsed.
  445.  
  446. readlocation    ReadLocation details
  447.   Pete Resnick (resnick@cogsci.uiuc.edu)
  448.   Undocumented details for using ReadLocation.
  449.  
  450. setdialoghdrs   C glue for SetDialogXxx routines
  451.   Benjamin Herrenschmidt (benh@tatooine.fdn.org)
  452.   C glue for the GetStdFilterProc, SetDialogDefaultItem,
  453.   SetDialogCancelItem, SetDialogTracksCursor, and
  454.   StdFilterProc.
  455.  
  456. videosync       Routines for synchronized drawing
  457.   Timothy Hunt (hunt@husc7.harvard.edu)
  458.   C routines for synchronized VBLTask drawing.
  459.  
  460. whendrawbw      When to draw in color vs. b&w
  461.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  462.   Algorithm for deciding when to draw in color vs. b&w.
  463.  
  464. xprammap        Map of the extended pram
  465.   Kiselyov Oleg (oleg@ponder.csci.unt.edu)
  466.   A detailed map of the contents of the XPRAM.
  467.  
  468. ************************************************************
  469.  
  470. Who's Who in Digest #2...
  471.  
  472. The contributors to this digest are:
  473.  
  474.   Colin Foster (foster@gaul.csd.uwo.ca)
  475.   Andrew Francke (afrancke@netcom.com)
  476.   Ari I Halberstadt (ari@world.std.com)
  477.   Benjamin Herrenschmidt (benh@tatooine.fdn.org)
  478.   Ron Hunsinger (ron_hunsinger@bmug.org)
  479.   Timothy Hunt (hunt@husc7.harvard.edu)
  480.   Richard Knuckey (richard@purplex.nacjack.gen.nz)
  481.   Peter Kocourek (qsi@nu91.wlink.nl)
  482.   Derek Kwan (dkwan@zeus.uwaterloo.ca)
  483.   Peter Lewis (peter@ncrpda.curtin.edu.au)
  484.   Ken Long (kenlong@netcom.com)
  485.   Robert Mah (rmah@panix.com)
  486.   Frank Manshade (frankm@and.nl)
  487.   Andrew McClure (andrew@cs.uwa.oz.au)
  488.   Dave Nebinger (dnebing@andy.bgsu.edu)
  489.   Kiselyov Oleg (oleg@ponder.csci.unt.edu)
  490.   Carl R. Osterwald (carl_osterwald@nrel.gov)
  491.   David Peck (David_K._Peck@digntn1.csgi.com)
  492.   Mark Pilgrim (f8dy@access.netaxs.com)
  493.   Pete Resnick (resnick@cogsci.uiuc.edu)
  494.   Keith Rollin (keith@taligent.com)
  495.   Mike Russel (mgr@aggroup.aggroup.com)
  496.   Theo Vosse (vosse@ruls41.leidenuniv.nl)
  497.   Rick Walker (walker@opus.hpl.hp.com)
  498.   Jon Wtte (d88-jwa@hemul.nada.kth.se)
  499.   Ed Wynne (arwyn@engin.umich.edu)
  500.