timidity_common.h

Go to the documentation of this file.
00001 /*
00002 
00003     TiMidity -- Experimental MIDI to WAVE converter
00004     Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 
00020 
00021    common.h
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 /* Noise modes for open_file */
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

Generated on Fri Jul 27 22:27:43 2007 for pentagram by  doxygen 1.4.7