changeset 19194:5949a654e2d4

marks some read-only char* inside structs as const, patch by Stefan Huehner, stefan At huehner-org
author reynaldo
date Thu, 27 Jul 2006 17:35:06 +0000
parents 28d25943b7cf
children e4b614cc7093
files libaf/af_karaoke.c libmpdemux/network.h libvo/gl_common.c m_option.c m_struct.h subopt-helper.h
diffstat 6 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af_karaoke.c	Thu Jul 27 10:52:40 2006 +0000
+++ b/libaf/af_karaoke.c	Thu Jul 27 17:35:06 2006 +0000
@@ -23,7 +23,7 @@
 		af->data->rate	= ((af_data_t*)arg)->rate;
 		af->data->nch	= ((af_data_t*)arg)->nch;
 		af->data->format= AF_FORMAT_FLOAT_NE;
-		af->data->bps	= 4;
+		af->data->bps	= 8;
 		return af_test_output(af,(af_data_t*)arg);
 	}
 	return AF_UNKNOWN;
@@ -41,7 +41,7 @@
 {
 	af_data_t*	c	= data;		 // Current working data
 	float*		a	= c->audio;	 // Audio data
-	int			len	= c->len/4;	 // Number of samples in current audio block 
+	int			len	= c->len/8;	 // Number of samples in current audio block 
 	int			nch	= c->nch;	 // Number of channels
 	register int  i;
 
--- a/libmpdemux/network.h	Thu Jul 27 10:52:40 2006 +0000
+++ b/libmpdemux/network.h	Thu Jul 27 17:35:06 2006 +0000
@@ -26,7 +26,7 @@
 #define BUFFER_SIZE		2048
 
 typedef struct {
-	char *mime_type;
+	const char *mime_type;
 	int demuxer_type;
 } mime_struct_t;
 
--- a/libvo/gl_common.c	Thu Jul 27 10:52:40 2006 +0000
+++ b/libvo/gl_common.c	Thu Jul 27 17:35:06 2006 +0000
@@ -89,7 +89,7 @@
 
 struct gl_name_map_struct {
   GLint value;
-  char *name;
+  const char *name;
 };
 
 #undef MAP
@@ -253,8 +253,8 @@
 
 typedef struct {
   void **funcptr;
-  char *extstr;
-  char *funcnames[7];
+  const char *extstr;
+  const char *funcnames[7];
 } extfunc_desc_t;
 
 static const extfunc_desc_t extfuncs[] = {
@@ -914,7 +914,7 @@
 }
 
 static const struct {
-  char *name;
+  const char *name;
   GLenum cur;
   GLenum max;
 } progstats[] = {
--- a/m_option.c	Thu Jul 27 10:52:40 2006 +0000
+++ b/m_option.c	Thu Jul 27 17:35:06 2006 +0000
@@ -996,7 +996,7 @@
 
 /* FIXME: snyc with img_format.h */
 static struct {
-  char* name;
+  const char* name;
   unsigned int fmt;
 } mp_imgfmt_list[] = {
   {"444p", IMGFMT_444P},
@@ -1090,7 +1090,7 @@
 
 /* FIXME: snyc with af_format.h */
 static struct {
-  char* name;
+  const char* name;
   unsigned int fmt;
 } mp_afmt_list[] = {
   // SPECIAL
--- a/m_struct.h	Thu Jul 27 10:52:40 2006 +0000
+++ b/m_struct.h	Thu Jul 27 17:35:06 2006 +0000
@@ -13,7 +13,7 @@
 /// Struct definition
 typedef struct m_struct_st {
   /// For error messages and debugging
-  char* name;
+  const char* name;
   /// size of the whole struct
   unsigned int size;
   /// Pointer to a struct filled with the default settings
--- a/subopt-helper.h	Thu Jul 27 10:52:40 2006 +0000
+++ b/subopt-helper.h	Thu Jul 27 17:35:06 2006 +0000
@@ -20,7 +20,7 @@
 /** simple structure for defining the option name, type and storage location */
 typedef struct opt_s
 {
-  char * name; ///< string that identifies the option
+  const char * name; ///< string that identifies the option
   int type;    ///< option type as defined in subopt-helper.h
   void * valp; ///< pointer to the mem where the value should be stored
   opt_test_f test; ///< argument test func ( optional )