From 95ea3c0fbabcb279e1a732ada4ac39f4b7f71d10 Mon Sep 17 00:00:00 2001 From: carlo-bramini Date: Sat, 21 Oct 2017 12:47:59 +0200 Subject: [PATCH] idlist[], badgen[] and badpgen[] made static const --- src/sfloader/fluid_defsfont.c | 10 ++++++---- src/sfloader/fluid_defsfont.h | 8 -------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c index 1580eeb3..9ba05380 100644 --- a/src/sfloader/fluid_defsfont.c +++ b/src/sfloader/fluid_defsfont.c @@ -2132,7 +2132,7 @@ static int fixup_pgen (SFData * sf); static int fixup_igen (SFData * sf); static int fixup_sample (SFData * sf); -char idlist[] = { +static const char idlist[] = { "RIFFLISTsfbkINFOsdtapdtaifilisngINAMiromiverICRDIENGIPRD" "ICOPICMTISFTsnamsmplphdrpbagpmodpgeninstibagimodigenshdr" }; @@ -2421,7 +2421,7 @@ pdtahelper (unsigned int expid, unsigned int reclen, SFChunk * chunk, int * size, FILE * fd) { unsigned int id; - char *expstr; + const char *expstr; expstr = CHNKIDSTR (expid); /* in case we need it */ @@ -3429,11 +3429,13 @@ fixup_sample (SFData * sf) #define MOD_CHUNK_OPTIMUM_AREA 256 #define GEN_CHUNK_OPTIMUM_AREA 256 -unsigned short badgen[] = { Gen_Unused1, Gen_Unused2, Gen_Unused3, Gen_Unused4, +static const unsigned short badgen[] = { + Gen_Unused1, Gen_Unused2, Gen_Unused3, Gen_Unused4, Gen_Reserved1, Gen_Reserved2, Gen_Reserved3, 0 }; -unsigned short badpgen[] = { Gen_StartAddrOfs, Gen_EndAddrOfs, Gen_StartLoopAddrOfs, +static const unsigned short badpgen[] = { + Gen_StartAddrOfs, Gen_EndAddrOfs, Gen_StartLoopAddrOfs, Gen_EndLoopAddrOfs, Gen_StartAddrCoarseOfs, Gen_EndAddrCoarseOfs, Gen_StartLoopAddrCoarseOfs, Gen_Keynum, Gen_Velocity, Gen_EndLoopAddrCoarseOfs, Gen_SampleModes, Gen_ExclusiveClass, diff --git a/src/sfloader/fluid_defsfont.h b/src/sfloader/fluid_defsfont.h index 56f87dd5..6c2757d4 100644 --- a/src/sfloader/fluid_defsfont.h +++ b/src/sfloader/fluid_defsfont.h @@ -212,11 +212,6 @@ typedef enum } Gen_Unit; -/* global data */ - -extern unsigned short badgen[]; /* list of bad generators */ -extern unsigned short badpgen[]; /* list of bad preset generators */ - /* functions */ void sfont_init_chunks (void); @@ -295,9 +290,6 @@ typedef struct _SFShdr } SFShdr; -/* data */ -extern char idlist[]; - /* functions */ SFData *sfload_file (const char * fname);