diff mcabber/src/screen.c @ 281:f562b9af2de7

Add "const" specifier in prototypes It's easier then to know when variables are read-only (and shouldn't be freed).
author Mikael Berthe <mikael@lilotux.net>
date Wed, 06 Jul 2005 22:18:05 +0100
parents f5dd437c057b
children edc263a5d350
line wrap: on
line diff
--- a/mcabber/src/screen.c	Wed Jul 06 21:28:37 2005 +0100
+++ b/mcabber/src/screen.c	Wed Jul 06 22:18:05 2005 +0100
@@ -108,7 +108,7 @@
   }
 }
 
-int FindColor(char *name)
+int FindColor(const char *name)
 {
   if (!strcmp(name, "default"))
     return -1;
@@ -134,7 +134,7 @@
 
 void ParseColors(void)
 {
-  char *colors[8] = {
+  const char *colors[8] = {
     "", "",
     "general",
     "newmsg",
@@ -144,9 +144,9 @@
   };
 
   char *tmp = malloc(1024);
-  char *color;
-  char *background = settings_opt_get("color_background");
-  char *backselected = settings_opt_get("color_backselected");
+  const char *color;
+  const char *background   = settings_opt_get("color_background");
+  const char *backselected = settings_opt_get("color_backselected");
   int i = 0;
 
   // Default values