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
This commit is contained in:
reynaldo 2006-07-16 01:20:30 +00:00
parent 36e5e1a3fb
commit d427579f79
10 changed files with 14 additions and 14 deletions

View File

@ -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__ */

View File

@ -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;

View File

@ -1,7 +1,7 @@
#include "config.h"
#include "img_format.h"
char *vo_format_name(int format)
const char *vo_format_name(int format)
{
switch(format)
{

View File

@ -114,6 +114,6 @@ typedef struct {
int timestamp; // pts, 90000 Hz counter based
} vo_mpegpes_t;
char *vo_format_name(int format);
const char *vo_format_name(int format);
#endif

View File

@ -77,7 +77,7 @@ void print_asf_string(const char* name, char* string, int length) {
mp_msg(MSGT_HEADER,MSGL_V,"%s%s\n", name, string);
}
static char* asf_chunk_type(unsigned char* guid) {
static const char* asf_chunk_type(unsigned char* guid) {
static char tmp[60];
char *p;
int i;

View File

@ -705,7 +705,7 @@ char *rtsp_get_mrl(rtsp_t *s) {
}
char *rtsp_get_param(rtsp_t *s, char *p) {
char *rtsp_get_param(rtsp_t *s, const char *p) {
int len;
char *param;
if (!s->param)

View File

@ -72,7 +72,7 @@ void rtsp_set_session(rtsp_t *s, const char *id);
char *rtsp_get_session(rtsp_t *s);
char *rtsp_get_mrl(rtsp_t *s);
char *rtsp_get_param(rtsp_t *s, char *param);
char *rtsp_get_param(rtsp_t *s, const char *param);
/*int rtsp_peek_header (rtsp_t *this, char *data); */

View File

@ -117,7 +117,7 @@ streaming_ctrl_free( streaming_ctrl_t *streaming_ctrl ) {
// Converts an address family constant to a string
char *af2String(int af) {
const char *af2String(int af) {
switch (af) {
case AF_INET: return "AF_INET";

View File

@ -213,7 +213,7 @@ static int fcc_vl2mp(int fcc)
** Translate a video4linux2 fourcc aka pixel format
** to a human readable string.
*/
static char *pixfmt2name(int pixfmt)
static const char *pixfmt2name(int pixfmt)
{
static char unknown[24];

View File

@ -166,7 +166,7 @@ typedef struct vo_functions_s
} vo_functions_t;
char *vo_format_name(int format);
const char *vo_format_name(int format);
int vo_init(void);
vo_functions_t* init_best_video_out(char** vo_list);