made some char pointers constant
authorkramm <kramm>
Wed, 12 Nov 2008 10:32:22 +0000 (10:32 +0000)
committerkramm <kramm>
Wed, 12 Nov 2008 10:32:22 +0000 (10:32 +0000)
lib/modules/swfaction.c
lib/modules/swfbits.c
lib/modules/swffont.c
lib/modules/swftext.c
lib/mp3.c
lib/mp3.h

index 9f44d4b..f1258bd 100644 (file)
@@ -969,7 +969,7 @@ ActionTAG* action_WaitForFrame(ActionTAG*atag, U16 frame, U8 skip)
     *(U8*)&atag->tmp[2] = skip;
     return atag;
 }
-ActionTAG* action_SetTarget(ActionTAG*atag, char* target)
+ActionTAG* action_SetTarget(ActionTAG*atag, const char* target)
 {
     char*ptr = strdup(target);
     return swf_AddActionTAG(atag, ACTION_SETTARGET, (U8*)ptr, strlen(ptr)+1);
index 72e65af..90c8549 100644 (file)
@@ -326,7 +326,7 @@ void swf_SetJPEGBits2(TAG * tag, U16 width, U16 height, RGBA * bitmap, int quali
 }
 #endif
 
-void swf_GetJPEGSize(char *fname, int *width, int *height)
+void swf_GetJPEGSize(const char *fname, int *width, int *height)
 {
     struct jpeg_decompress_struct cinfo;
     struct jpeg_error_mgr jerr;
@@ -347,7 +347,7 @@ void swf_GetJPEGSize(char *fname, int *width, int *height)
     fclose(fi);
 }
 
-int swf_SetJPEGBits(TAG * t, char *fname, int quality)
+int swf_SetJPEGBits(TAG * t, const char *fname, int quality)
 {
     struct jpeg_decompress_struct cinfo;
     struct jpeg_error_mgr jerr;
index ccb1a0f..cd553b8 100644 (file)
@@ -116,7 +116,7 @@ static FT_Outline_Funcs outline_functions =
 
 static FT_Library ftlibrary = 0;
 
-SWFFONT* swf_LoadTrueTypeFont(char*filename)
+SWFFONT* swf_LoadTrueTypeFont(const char*filename)
 {
     FT_Face face;
     FT_Error error;
@@ -373,7 +373,7 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename)
 }
 #else  //HAVE_FREETYPE
 
-SWFFONT* swf_LoadTrueTypeFont(char*filename)
+SWFFONT* swf_LoadTrueTypeFont(const char*filename)
 {
     fprintf(stderr, "Warning: no freetype library- not able to load %s\n", filename);
     return 0;
@@ -389,7 +389,7 @@ static int t1lib_initialized = 0;
 
 static int counter = 0;
 
-SWFFONT* swf_LoadT1Font(char*filename)
+SWFFONT* swf_LoadT1Font(const char*filename)
 {
     SWFFONT * font;
     int nr;
@@ -539,7 +539,7 @@ SWFFONT* swf_LoadT1Font(char*filename)
 
 #else
 
-SWFFONT* swf_LoadT1Font(char*filename)
+SWFFONT* swf_LoadT1Font(const char*filename)
 {
     fprintf(stderr, "Warning: no t1lib- not able to load %s\n", filename);
     return 0;
@@ -571,7 +571,7 @@ static int isSWF(const char*filename)
     return 0;
 }
 
-SWFFONT* swf_LoadFont(char*filename)
+SWFFONT* swf_LoadFont(const char*filename)
 {
     int is_swf;
     if(filename == 0)
index ddfd761..1e689de 100644 (file)
@@ -1513,7 +1513,7 @@ void swf_WriteFont(SWFFONT * font, char *filename)
 }
 
 
-void swf_SetEditText(TAG * tag, U16 flags, SRECT r, char *text, RGBA * color, int maxlength, U16 font, U16 height, EditTextLayout * layout, char *variable)
+void swf_SetEditText(TAG * tag, U16 flags, SRECT r, const char *text, RGBA * color, int maxlength, U16 font, U16 height, EditTextLayout * layout, const char *variable)
 {
     swf_SetRect(tag, &r);
     swf_ResetWriteBits(tag);
@@ -1554,7 +1554,7 @@ void swf_SetEditText(TAG * tag, U16 flags, SRECT r, char *text, RGBA * color, in
        swf_SetString(tag, (U8*)text);
 }
 
-SRECT swf_SetDefineText(TAG * tag, SWFFONT * font, RGBA * rgb, char *text, int scale)
+SRECT swf_SetDefineText(TAG * tag, SWFFONT * font, RGBA * rgb, const char *text, int scale)
 {
     SRECT r;
     U8 gbits, abits;
@@ -1677,7 +1677,7 @@ void swf_FontCreateLayout(SWFFONT * f)
     }
 }
 
-void swf_DrawText(drawer_t * draw, SWFFONT * font, int size, char *text)
+void swf_DrawText(drawer_t * draw, SWFFONT * font, int size, const char *text)
 {
     U8 *s = (U8 *) text;
     int advance = 0;
index 8db3851..48f03d1 100644 (file)
--- a/lib/mp3.c
+++ b/lib/mp3.c
@@ -47,7 +47,7 @@ static const unsigned SR_mpeg25[4] = {11025,12000,8000,0};
 static const unsigned SR_reserved[4] = {0,0,0,0};
 static const unsigned*const SR[4] = {SR_mpeg25, SR_reserved, SR_mpeg2, SR_mpeg1};
 
-int mp3_read(struct MP3*mp3, char* filename)
+int mp3_read(struct MP3*mp3, const char* filename)
 {
     struct MP3Frame* root = 0;
     struct MP3Frame** cur = &root;
index b76f3ce..a49c9ad 100644 (file)
--- a/lib/mp3.h
+++ b/lib/mp3.h
@@ -15,5 +15,5 @@ struct MP3 {
     unsigned long   size;
 };
 
-int mp3_read(struct MP3*mp3, char* filename);
+int mp3_read(struct MP3*mp3, const char* filename);
 void mp3_clear(struct MP3*mp3);