home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume6 / glib / part01 / mac-mach.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-05-14  |  1.5 KB  |  71 lines

  1. /* $Id: mac-mach.h,v 1.6 89/05/06 17:13:32 lee Exp $
  2.  * GLIB - a Generic LIBrarian and editor for synths
  3.  *
  4.  * Machine dependent stuff.
  5.  *
  6.  * Macintosh version
  7.  * Steven Falco
  8.  * $Log:    mac-mach.h,v $
  9.  * Revision 1.6  89/05/06  17:13:32  lee
  10.  * rel. to comp.sources.misc
  11.  * 
  12.  */
  13.  
  14. #define macintosh
  15. /*
  16.  * You must also chose a development system.
  17.  * Currently, only MPW is supported.  See machdep.c and vt.c for more
  18.  * information.  Note that INT16 must be defined as a 16-bit (or larger)
  19.  * integer.  In MPW (my development system), a short is 16 bits.
  20.  *
  21.  * Steve Falco, moss!saf
  22.  */
  23. #define MPW   
  24. /* any others? */
  25.  
  26. /* overlay directives for compiler */
  27. #ifdef OVERLAY1
  28. #define __SEG__ over1
  29. #endif
  30. #ifdef OVERLAY2
  31. #define __SEG__ over2
  32. #endif
  33.  
  34. #include <errors.h>
  35. #include <files.h>
  36. #include <types.h>
  37. #include <segload.h>
  38. #include <strings.h>
  39. #include <vt.h>
  40. #include <mdr.h>
  41.  
  42. #define SIGNATURE 'GLIB'
  43. #define FSFCBLen  0x3f6
  44.  
  45. #define INT16 short
  46.  
  47. OSErr GetFinfo(), SetFinfo();
  48.  
  49. /*
  50.  * MPW doesn't set the file type.  This tends to be important so we
  51.  * do it manually...
  52.  */
  53. #define SET_TEXT(filename)                 \
  54. {                            \
  55.     FInfo myfinfo;                    \
  56.     switch(GetFInfo(filename, 0, &myfinfo)) {    \
  57.         case noErr:                \
  58.             myfinfo.fdType = 'TEXT';    \
  59.             myfinfo.fdCreator = SIGNATURE;    \
  60.             SetFInfo(filename, 0, &myfinfo);\
  61.             break;                \
  62.         default:                \
  63.             fprintf(stderr,"Cannot set file type for %s\n", filename); \
  64.             break;                \
  65.     }                        \
  66. }
  67.  
  68. #define STATMIDI (midi_rxst==MIDI_NE?1:0)
  69.  
  70. #define STATTXBF (midi_txst==MIDI_NE?1:0)
  71.