changeset 31876:c52e80f24086

Add const qualifiers to function string arguments as appropriate.
author reimar
date Wed, 11 Aug 2010 20:44:29 +0000
parents ac6e48baa03d
children e30fe0cb79cd
files stream/stream_dvd.c stream/stream_dvd.h stream/stream_dvdnav.c stream/stream_dvdnav.h
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Wed Aug 11 01:14:37 2010 +0000
+++ b/stream/stream_dvd.c	Wed Aug 11 20:44:29 2010 +0000
@@ -162,7 +162,7 @@
   return 0;
 }
 
-int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
+int dvd_aid_from_lang(stream_t *stream, const unsigned char* lang) {
   dvd_priv_t *d=stream->priv;
   int code,i;
   if(lang) {
@@ -206,7 +206,7 @@
   return 0;
 }
 
-int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) {
+int dvd_sid_from_lang(stream_t *stream, const unsigned char* lang) {
   dvd_priv_t *d=stream->priv;
   int code,i;
   while(lang && strlen(lang)>=2) {
--- a/stream/stream_dvd.h	Wed Aug 11 01:14:37 2010 +0000
+++ b/stream/stream_dvd.h	Wed Aug 11 20:44:29 2010 +0000
@@ -59,8 +59,8 @@
 int dvd_number_of_subs(stream_t *stream);
 int dvd_lang_from_aid(stream_t *stream, int id);
 int dvd_lang_from_sid(stream_t *stream, int id);
-int dvd_aid_from_lang(stream_t *stream, unsigned char* lang);
-int dvd_sid_from_lang(stream_t *stream, unsigned char* lang);
+int dvd_aid_from_lang(stream_t *stream, const unsigned char* lang);
+int dvd_sid_from_lang(stream_t *stream, const unsigned char* lang);
 int dvd_chapter_from_cell(dvd_priv_t *dvd,int title,int cell);
 int dvd_parse_chapter_range(const m_option_t *conf, const char *range);
 
--- a/stream/stream_dvdnav.c	Wed Aug 11 01:14:37 2010 +0000
+++ b/stream/stream_dvdnav.c	Wed Aug 11 20:44:29 2010 +0000
@@ -733,7 +733,7 @@
  * \param lang: 2-characters language code[s], eventually separated by spaces of commas
  * \return -1 on error, current subtitle id if successful
  */
-int mp_dvdnav_aid_from_lang(stream_t *stream, unsigned char *language) {
+int mp_dvdnav_aid_from_lang(stream_t *stream, const unsigned char *language) {
   dvdnav_priv_t * priv = stream->priv;
   int k;
   uint8_t lg;
@@ -785,7 +785,7 @@
  * \param lang: 2-characters language code[s], eventually separated by spaces of commas
  * \return -1 on error, current subtitle id if successful
  */
-int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
+int mp_dvdnav_sid_from_lang(stream_t *stream, const unsigned char *language) {
   dvdnav_priv_t * priv = stream->priv;
   uint8_t lg, k;
   uint16_t lang, lcode;
--- a/stream/stream_dvdnav.h	Wed Aug 11 01:14:37 2010 +0000
+++ b/stream/stream_dvdnav.h	Wed Aug 11 20:44:29 2010 +0000
@@ -30,9 +30,9 @@
 
 int mp_dvdnav_number_of_subs(stream_t *stream);
 int mp_dvdnav_aid_from_audio_num(stream_t *stream, int audio_num);
-int mp_dvdnav_aid_from_lang(stream_t *stream, unsigned char *language);
+int mp_dvdnav_aid_from_lang(stream_t *stream, const unsigned char *language);
 int mp_dvdnav_lang_from_aid(stream_t *stream, int id, unsigned char *buf);
-int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language);
+int mp_dvdnav_sid_from_lang(stream_t *stream, const unsigned char *language);
 int mp_dvdnav_lang_from_sid(stream_t *stream, int sid, unsigned char *buf);
 void mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button);
 void mp_dvdnav_update_mouse_pos(stream_t *stream, int32_t x, int32_t y, int* button);