/mac/development/source/snippets/00index.txt

This list is intended to include all and only the files within this
directory.  You may find that some of the paths listed here do not
point to this directory.  That is ok; the physical paths are given here
but there may be a link in another location.

If you find any problems or you wish to add to or change the
descriptions given here, please do not hesitate to write
[email protected].

SIZE      DATE
(KBYTES)  ARCHIVED  COMPRESSION FORMAT(S)
-----------------------------------------------------------------------
/mac/development/source/snippets/12daysoxmas1.hqx
  3     2/26/94    BinHex4.0

  12 days of xmas program.

/mac/development/source/snippets/12daysoxmas2.hqx
  6     2/26/94    BinHex4.0

  Obfuscated C 12 days of xmas program.

/mac/development/source/snippets/appstartupscrn.hqx
  6     2/26/94    BinHex4.0

  Pascal code which demonstrates how to display a splash screen
  while the application is starting up and initializing.

/mac/development/source/snippets/afpmount.hqx
  4     2/26/94    BinHex4.0

  C code for mounting an appleshare file server using afp commands.

/mac/development/source/snippets/balloonhelp.hqx
 17     2/26/94    BinHex4.0

  Perl and Rez scripts for creating balloon help.

/mac/development/source/snippets/bandpass.hqx
  5     2/26/94    BinHex4.0

  C source for a band-pass filter [converts sounds between
  frequencies]

/mac/development/source/snippets/bigscroll.hqx
  3     2/26/94    BinHex4.0

  Algorithm for working with scroll bars which represent more than
  32k.

/mac/development/source/snippets/cdeftemplate1.0.cpt.hqx
 12    3/18/95    BinHex4.0,Compact1.51

  Skeleton for constructing CDEF resources in CodeWarrior C.

/mac/development/source/snippets/changesysfont.hqx
  5     2/26/94    BinHex4.0

  C functions for changing the system font and size.

/mac/development/source/snippets/changeusername.hqx
 16     2/26/94    BinHex4.0

  C functions illustrating how to change the user name for the
  system and make it stick.

/mac/development/source/snippets/convertpcdata.hqx
  3     2/26/94    BinHex4.0

  C function to convert pc doubles to Mac doubles.

/mac/development/source/snippets/copystr255.hqx
  4     2/26/94    BinHex4.0

  Demonstrating a quick way in C to copy a Str255 variable.

/mac/development/source/snippets/countlines.lex.hqx
  6     2/26/94    BinHex4.0

  Lex code for counting lines of Think C source files.

/mac/development/source/snippets/cstrtotype.hqx
  2     2/26/94    BinHex4.0

  C code to convert a C string to an OSType.

/mac/development/source/snippets/dbllinklistc.hqx
 12     2/26/94    BinHex4.0

  C code that implements a doubly linked list.

/mac/development/source/snippets/dbllinklistp.hqx
 16     2/26/94    BinHex4.0

  Pascal code that implements a doubly linked list.

/mac/development/source/snippets/defs.h.hqx
 18     2/26/94    BinHex4.0

  Bill's common header definitions.

/mac/development/source/snippets/detectdebug.hqx
 12     2/26/94    BinHex4.0

  Pascal procedure for checking for a debugger.

/mac/development/source/snippets/dialogfontsize.hqx
  4     2/26/94    BinHex4.0

  C code demonstrating how to change the font and size for DITL
  resource items, including static text items.

/mac/development/source/snippets/digitalaudio.hqx
 44     2/26/94    BinHex4.0

  C routines to read sound tracks from a CD300 and play em.

/mac/development/source/snippets/downarrow.hqx
  4     2/26/94    BinHex4.0

  C snippet showing how to draw the down arrow for a custom popup
  menu.

/mac/development/source/snippets/drawditlitem.hqx
  2     2/26/94    BinHex4.0

  Pascal function for drawing a single dialog item.

/mac/development/source/snippets/drawgoawaybox.hqx
  4     2/26/94    BinHex4.0

  C function for drawing a go away box.

/mac/development/source/snippets/editinmodeless.hqx
  2     2/26/94    BinHex4.0

  C function for implementing the standard edit functions in a
  modeless dialog.

/mac/development/source/snippets/encryptc.hqx
  4     2/26/94    BinHex4.0

  C function to encode a string.

/mac/development/source/snippets/encryptp.hqx
  5     2/26/94    BinHex4.0

  Pascal routines to encrypt a string.

/mac/development/source/snippets/filesystems.hqx
 12     2/26/94    BinHex4.0

  Solution for using FSpExchangeFiles and other file systems.

/mac/development/source/snippets/fixbyteorders.hqx
  4     2/26/94    BinHex4.0

  C functions to convert little-endian numbers to the Mac's
  big-endian numbers.

/mac/development/source/snippets/flipnum.hqx
  7     2/26/94    BinHex4.0

  C functions to flip the byte orders of shorts and longs.

/mac/development/source/snippets/float2fraction.hqx
  6     2/26/94    BinHex4.0

  C function to convert a floating point number to a fraction.

/mac/development/source/snippets/float2price.hqx
  6     2/26/94    BinHex4.0

  C function to convert a floating point number to a fraction.

/mac/development/source/snippets/float2tex.hqx
  3     2/26/94    BinHex4.0

  C function to convert a double to TeX format.

/mac/development/source/snippets/folderflags.hqx
  4     2/26/94    BinHex4.0

  C function for changing the finder flags for a folder.

/mac/development/source/snippets/fp2string.hqx
  5     2/26/94    BinHex4.0

  C functions to convert between floating point numbers and strings.

/mac/development/source/snippets/fsspecsnippets.hqx
  6     2/26/94    BinHex4.0

  C functions for getting the application's FSSpec, and also getting
  the dirID of a folder from it's FSSpec.

/mac/development/source/snippets/getallvols.hqx
  3     2/26/94    BinHex4.0

  C function which determines the names of all mounted volumes.

/mac/development/source/snippets/getnetname.hqx
  3     2/26/94    BinHex4.0

  Pascal function for returning the name from the network control
  panel.

/mac/development/source/snippets/getqdglobals.hqx
  2     2/26/94    BinHex4.0

  C function to get the pointer to the application's QuickDraw
  globals.

/mac/development/source/snippets/getwindowrect.hqx
  3     2/26/94    BinHex4.0

  C function to get a window's rectangle.  This rect can then be
  saved and used to reposition and resize a window.

/mac/development/source/snippets/gmtime.hqx
  3     2/26/94    BinHex4.0

  C routine to implement gmtime (of un*x fame) on the mac.

/mac/development/source/snippets/growicononly.hqx
  3     2/26/94    BinHex4.0

  C function for drawing the grow icon for a window without also
  drawing the empty scroll bars.

/mac/development/source/snippets/growzone.hqx
  5     2/26/94    BinHex4.0

  Pascal routines for modifying the size of the application's zone.

/mac/development/source/snippets/hash1.hqx
  3     2/26/94    BinHex4.0

  C hashing function.

/mac/development/source/snippets/hash2.hqx
  4     2/26/94    BinHex4.0

  C hashing function.

/mac/development/source/snippets/hash3.hqx
  8     2/26/94    BinHex4.0

  C hashing function.

/mac/development/source/snippets/hash4.hqx
  3     2/26/94    BinHex4.0

  C hashing functions.

/mac/development/source/snippets/hash5.hqx
  2     2/26/94    BinHex4.0

  A simple C hashing macro.

/mac/development/source/snippets/heapinit.hqx
  4     2/26/94    BinHex4.0

  C function demonstrating how to change an app's heap partition
  size.

/mac/development/source/snippets/incstacksize.hqx
  4     2/26/94    BinHex4.0

  C code showing how to increase an applications stack size.

/mac/development/source/snippets/isfileordir.hqx
  3     2/26/94    BinHex4.0

  C code to determine if an FSSpec (received via Apple Events)
  points to a file or a directory/volume.

/mac/development/source/snippets/jonsinitmac.hqx
  3     2/26/94    BinHex4.0

  C function to call of the toolbox init routines as well as some
  other initialization stuff.

/mac/development/source/snippets/keydetect.hqx
  2     2/26/94    BinHex4.0

  C functions for checking if the command and option keys are
  depressed.

/mac/development/source/snippets/keyrepeats.hqx
  3     2/26/94    BinHex4.0

  C code showing how to change the keyboard repeat rate using lo-mem
  globals.

/mac/development/source/snippets/launchcoderes.hqx
  4     2/26/94    BinHex4.0

  C function for launching a code resource.

/mac/development/source/snippets/launchnsendaes.hqx
  5     2/26/94    BinHex4.0

  C function to launch an application keeping the necessary
  information to send the app some apple events.

/mac/development/source/snippets/layermgr.hqx
  7     2/26/94    BinHex4.0

  C header file and sample code for using the undocumented Layer
  Manager.

/mac/development/source/snippets/listdir.hqx
  5     2/26/94    BinHex4.0

  C routines to list the contents of a volume/directory.

/mac/development/source/snippets/listspecialkeysc.hqx
  5     2/26/94    BinHex4.0

  C routines to implement the use of special keys (i.e. page up and
  down) with a list.

/mac/development/source/snippets/listspecialkeysp.hqx
  9     2/26/94    BinHex4.0

  Pascal routines to implement the use of special keys (i.e. page up
  and down) with a list.

/mac/development/source/snippets/lzcompression.hqx
 48     2/26/94    BinHex4.0

  C routines to implement lzss, lz-huffman, and lz-ari code.

/mac/development/source/snippets/makeratiorgb.hqx
  3     2/26/94    BinHex4.0

  Think C translation of assembly code from the Developer CD for
  MakeRatioRGB.

/mac/development/source/snippets/menudraw.hqx
  3     2/26/94    BinHex4.0

  C routines for drawing the time on the right side of the menu.

/mac/development/source/snippets/modelessdrag.hqx
  4     2/26/94    BinHex4.0

  C FilterProc routine for SFPGetFile that allows dragging of
  windows behind the SFPGetFile window.

/mac/development/source/snippets/mousemoved.hqx
  3     2/26/94    BinHex4.0

  C routine to get the location of the mouse and convert it to a
  string which can be printed.

/mac/development/source/snippets/openwinds.hqx
  3     2/26/94    BinHex4.0

  C function for determining the number of monitors connected to a
  mac.

/mac/development/source/snippets/packstr255.hqx
 12     2/26/94    BinHex4.0

  Pascal routines to pack strings into an 'STR#' resource.

/mac/development/source/snippets/paramstring.hqx
  5     2/26/94    BinHex4.0

  C function for doing pascal string expansions similar to the
  ParamText trap.

/mac/development/source/snippets/pascalprintf.hqx
  3     2/26/94    BinHex4.0

  A set of pascal functions which simulate the C printf routine.

/mac/development/source/snippets/patchdrawmenu.hqx
  3     2/26/94    BinHex4.0

  C function to patch DrawMenuBar

/mac/development/source/snippets/patchmbdf.hqx
  6     2/26/94    BinHex4.0

  C function to patch GetResource.

/mac/development/source/snippets/patchtrapselect.hqx
  6     2/26/94    BinHex4.0

  C/inline asm function demonstrating how to handle the patching of
  a trap and selector combination.

/mac/development/source/snippets/pbgetsetcatinfo.hqx
  5     2/26/94    BinHex4.0

v   C code demonstrating how to call PBSetCatInfo directly after
  PBGetCatInfo.

/mac/development/source/snippets/pictpreview.hqx
 27     2/26/94    BinHex4.0

  C function to make a preview resource picture which Quicktime will
  use with the StandardOpenPreview call.

/mac/development/source/snippets/printerchange.hqx
  3     2/26/94    BinHex4.0

  C code demonstrating how to programmatically change between
  printer drivers.

/mac/development/source/snippets/pstrcpy1.hqx
  6     2/26/94    BinHex4.0

  C routine to copy Pascal strings.

/mac/development/source/snippets/pstrcpy2.hqx
  3     2/26/94    BinHex4.0

  C routine to copy Pascal strings.

/mac/development/source/snippets/pstrcpy3.hqx
  3     2/26/94    BinHex4.0

  C routine to copy Pascal strings.

/mac/development/source/snippets/pstrcpy4.hqx
  2     2/26/94    BinHex4.0

  C routine to copy Pascal strings.

/mac/development/source/snippets/quitallapps.hqx
  3     2/26/94    BinHex4.0

  C functions showing how to restart a mac after a given time period
  has elapsed.

/mac/development/source/snippets/randnums.hqx
 19     2/26/94    BinHex4.0

  C functions for random numbers, including random floats, etc.

/mac/development/source/snippets/readlocation.hqx
  5     2/26/94    BinHex4.0

  Undocumented details for using ReadLocation.

/mac/development/source/snippets/refnum2fsspec.hqx
  4     2/26/94    BinHex4.0

  C code to convert a file's reference number to an FSSpec record.

/mac/development/source/snippets/resourceio.hqx
  4     2/26/94    BinHex4.0

  C functions for reading and writing preferences in 'STR '
  resources.

/mac/development/source/snippets/restart.hqx
  5     2/26/94    BinHex4.0

  Pascal code for restarting the Mac by sending the Finder
  AppleEvents.

/mac/development/source/snippets/rfc1123date.sit.hqx
 18    11/5/94     BinHex4.0,StuffIt3.50

   C code and a resource file for functions that convert between
   the ASCII version of Internet standard format (RFC 822 and 1123) date
   strings and the Macintosh time format.

/mac/development/source/snippets/rotatestring.hqx
  7     2/26/94    BinHex4.0

  C routine to rotate a Str255.

/mac/development/source/snippets/scratchditl.hqx
  8     2/26/94    BinHex4.0

  C routines for building a dialog's DITL list from scratch.

/mac/development/source/snippets/scrolldelay.hqx
  5     2/26/94    BinHex4.0

  Using _UserDelay to delay the scrolling.

/mac/development/source/snippets/scsisamplecode.sit.hqx
  4     6/19/94    BinHex4.0,StuffIt3.50

  Example code on how to send SCSI commands directly to a drive.

/mac/development/source/snippets/setdialoghdrs.hqx
  4     2/26/94    BinHex4.0

  C glue for the GetStdFilterProc, SetDialogDefaultItem,
  SetDialogCancelItem, SetDialogTracksCursor, and StdFilterProc.

/mac/development/source/snippets/stackadj.hqx
  3     2/26/94    BinHex4.0

  C code demonstrating how to adjust the size of the application's
  stack.

/mac/development/source/snippets/strings.hqx
  4     2/26/94    BinHex4.0

  Reading and writing Str255's to/from a file.

/mac/development/source/snippets/structpad.hqx
  2     2/26/94    BinHex4.0

  Think-C 5.0.4 pragma for disabling structure padding.

/mac/development/source/snippets/systemfont.hqx
  4     2/26/94    BinHex4.0

  C functions for getting and setting the system font and size using
  the lo-mem globals.

/mac/development/source/snippets/testshift.hqx
  2     2/26/94    BinHex4.0

  Inline assembly routine to check for the shift key being down or
  not.

/mac/development/source/snippets/textstylres.hqx
  5     2/26/94    BinHex4.0

  C code demonstrating how to use TEXT and styl resources in
  conjuction with a styled TE record.

/mac/development/source/snippets/timemgr.hqx
  5     2/26/94    BinHex4.0

  C source which implements some Time Mgr routines.

/mac/development/source/snippets/timemgr2.hqx
  4     2/26/94    BinHex4.0

  C functions showing how to use the time manager to increment a
  counter (for timing purposes).

/mac/development/source/snippets/touchfolder.hqx
  3     2/26/94    BinHex4.0

  Pascal procedure to force the Finder to update a folder.

/mac/development/source/snippets/videosync.hqx
  7     2/26/94    BinHex4.0

  C routines for synchronized VBLTask drawing.

/mac/development/source/snippets/wdefstuff.hqx
  8     2/26/94    BinHex4.0

  Information and code in C for WDEF creation and manipulation.

/mac/development/source/snippets/whackhandle.hqx
  4     2/26/94    BinHex4.0

  C and C++ routines for working with handles; avoids HUnlock.

/mac/development/source/snippets/whendrawbw.hqx
  4     2/26/94    BinHex4.0

  Algorithm for deciding when to draw in color vs. b&w.

/mac/development/source/snippets/windinfo.hqx
  8     2/26/94    BinHex4.0

  C functions to get some rects from a window, including
  the content rect and the drag rect.

/mac/development/source/snippets/xpraminfo.hqx
  5     2/26/94    BinHex4.0


C source for accessing the parameter ram.

/mac/development/source/snippets/xpraminfo2.hqx
  3     2/26/94    BinHex4.0

  Modula-2 source for accessing the parameter ram.  Provides a
  better interface to access the PRAM.

/mac/development/source/snippets/xprammap.hqx
  8     2/26/94    BinHex4.0

  A detailed map of the contents of the XPRAM.