changeset 37031:2c8fbf453871

menu: Add a few "const" to string arguments.
author reimar
date Sun, 06 Apr 2014 17:56:13 +0000
parents 5e89e80fa241
children 4c7ab9a4f3cd
files libmenu/menu.c libmenu/menu.h
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/menu.c	Sun Apr 06 17:17:42 2014 +0000
+++ b/libmenu/menu.c	Sun Apr 06 17:56:13 2014 +0000
@@ -230,7 +230,7 @@
 #define BUF_STEP 1024
 #define BUF_MIN 128
 #define BUF_MAX BUF_STEP*1024
-int menu_init(struct MPContext *mpctx, char* cfg_file) {
+int menu_init(struct MPContext *mpctx, const char* cfg_file) {
   char* buffer = NULL;
   int bl = BUF_STEP, br = 0;
   int f = 0, fd = -1;
@@ -313,7 +313,7 @@
   return 0;
 }
 
-menu_t* menu_open(char *name) {
+menu_t* menu_open(const char *name) {
   menu_t* m;
   int i;
 
--- a/libmenu/menu.h	Sun Apr 06 17:17:42 2014 +0000
+++ b/libmenu/menu.h	Sun Apr 06 17:56:13 2014 +0000
@@ -82,11 +82,11 @@
 #define MENU_CMD_CLICK 11
 
 /// Global init/uninit
-int menu_init(struct MPContext *mpctx, char* cfg_file);
+int menu_init(struct MPContext *mpctx, const char* cfg_file);
 void menu_uninit(void);
 
 /// Open a menu defined in the config file
-menu_t* menu_open(char *name);
+menu_t* menu_open(const char *name);
 
 void menu_draw(menu_t* menu,mp_image_t* mpi);
 void menu_read_cmd(menu_t* menu,int cmd);