00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifdef USE_TIMIDITY_MIDI
00025
00026 #ifndef TIMIDITY_COMMON_H_INCLUDED
00027 #define TIMIDITY_COMMON_H_INCLUDED
00028
00029 #include "timidity.h"
00030
00031 #ifdef NS_TIMIDITY
00032 namespace NS_TIMIDITY {
00033 #endif
00034
00035 extern char *program_name, current_filename[];
00036
00037 extern FILE *msgfp;
00038
00039 struct PathList {
00040 char *path;
00041 PathList *next;
00042 };
00043
00044
00045 #define OF_SILENT 0
00046 #define OF_NORMAL 1
00047 #define OF_VERBOSE 2
00048
00049 extern FILE *open_file(const char *name, int decompress, int noise_mode);
00050 extern void add_to_pathlist(char *s);
00051 extern void close_file(FILE *fp);
00052 extern void skip(FILE *fp, size_t len);
00053 extern void *safe_malloc(size_t count);
00054
00055 template<class T> T*safe_Malloc(size_t count=1) {
00056 return static_cast<T*>(safe_malloc(count * sizeof(T)));
00057 }
00058
00059 #ifdef NS_TIMIDITY
00060 };
00061 #endif
00062
00063 #endif
00064
00065 #endif //USE_TIMIDITY_MIDI