1 /* 2 TiMidity++ -- MIDI to WAVE converter and player 3 Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp> 4 Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 Macintosh interface for TiMidity 21 by T.Nogami <t-nogami@happy.email.ne.jp> 22 23 mac_util.h 24 */ 25 26 #ifndef MACUTIL__ 27 #define MACUTIL__ 28 29 OSErr GetFullPath( const FSSpec*, Str255 fullPath); 30 void StopAlertMessage(Str255); 31 32 void SetDialogItemValue(DialogPtr dialog, short item, short value); 33 short GetDialogItemValue(DialogPtr dialog, short item ); 34 void SetDialogTEValue(DialogRef dialog, short item, int value); 35 int GetDialogTEValue(DialogRef dialog, short item ); 36 short ToggleDialogItem(DialogPtr dialog, short item ); 37 void myGetDialogItemText(DialogPtr theDialog, short itemNo, Str255 s); 38 void mySetDialogItemText(DialogRef theDialog, short itemNo, const Str255 text); 39 void SetDialogControlTitle(DialogRef theDialog, short itemNo, const Str255 text); 40 void SetDialogItemHilite(DialogRef dialog, short item, short value); 41 void mac_TransPathSeparater(const char str[], char out[]); 42 void LDeselectAll(ListHandle); 43 void TEReadFile(char* filename, TEHandle te); 44 45 #include <errno.h> 46 #include <stdio.h> 47 48 /* CodeWarrior dose not have these macro, so I wrote */ 49 50 #define ENOENT 9990 51 #define EINVAL 9991 52 #define EINTR 9992 53 #define EPERM 9993 54 #define EACCES 9994 55 #define ENOTDIR 9995 56 #define ENOSPC dskFulErr 57 58 /*this function is very tricky. 59 Replace sys_errlist[errno] --> "error no.(errorno)" 60 Because CodeWarrior does not support sys_errlist[]. 61 If your compiler supports, you need not applend this file. 62 */ 63 //char** sys_errlist_(); 64 //#define sys_errlist sys_errlist_() 65 char* strdup(const char*); 66 //char* strncasecmp(const char*, const char*, int); 67 #define strcasecmp mac_strcasecmp 68 //#define strncasecmp mac_strncasecmp 69 int mac_strcasecmp(const char *s1, const char *s2); 70 int mac_strncasecmp(const char *s1, const char *s2, size_t n ); 71 int strtailcasecmp(const char *s1, const char *s2); 72 char* mac_fgets( char *buf, int n, FILE* file); 73 void* mac_memchr( const void *s, int c, size_t n); 74 75 /* hacking standard function */ 76 #define fgets mac_fgets 77 #define memchr mac_memchr 78 79 #endif /*MACUTIL__*/ 80