aboutsummaryrefslogtreecommitdiffhomepage
path: root/libaf
diff options
context:
space:
mode:
authorGravatar reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-16 01:20:30 +0000
committerGravatar reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-16 01:20:30 +0000
commitd427579f79d6b22ce8b65bac27651be03621d23f (patch)
tree82e51e054655f799105ea429ae90c8c92d6f4fe1 /libaf
parent36e5e1a3fbdca811942796a2487aada40aa35bd9 (diff)
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19113 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libaf')
-rw-r--r--libaf/af_format.h6
-rw-r--r--libaf/format.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/libaf/af_format.h b/libaf/af_format.h
index ab495dc634..dffd87e85e 100644
--- a/libaf/af_format.h
+++ b/libaf/af_format.h
@@ -84,11 +84,11 @@
#define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_LE
#endif
-extern int af_str2fmt(char *str);
-extern int af_str2fmt_short(char *str);
+extern int af_str2fmt(const char *str);
+extern int af_str2fmt_short(const char *str);
extern int af_fmt2bits(int format);
extern int af_bits2fmt(int bits);
extern char* af_fmt2str(int format, char* str, int size);
-extern char* af_fmt2str_short(int format);
+extern const char* af_fmt2str_short(int format);
#endif /* __af_format_h__ */
diff --git a/libaf/format.c b/libaf/format.c
index 53078d39b7..84b81b5da8 100644
--- a/libaf/format.c
+++ b/libaf/format.c
@@ -19,7 +19,7 @@
#include "help_mp.h"
// Convert from string to format
-int af_str2fmt(char* str)
+int af_str2fmt(const char* str)
{
int format=0;
// Scan for endianess
@@ -178,7 +178,7 @@ static struct {
{ NULL, 0 }
};
-char *af_fmt2str_short(int format)
+const char *af_fmt2str_short(int format)
{
int i;
@@ -189,7 +189,7 @@ char *af_fmt2str_short(int format)
return "??";
}
-int af_str2fmt_short(char* str)
+int af_str2fmt_short(const char* str)
{
int i;