changeset 1381:40095d413da9

Fix compilation on OpenBSD This patch fixes compilation on some BSD systems. Thanks to "undet" for the suggestion regarding DATA_DIR.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 02 Dec 2007 10:36:42 +0100
parents 605f9e1f9f76
children 1447c5296977
files mcabber/configure.ac mcabber/src/commands.c mcabber/src/jabglue.c mcabber/src/screen.c
diffstat 4 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/configure.ac	Thu Nov 29 22:40:56 2007 +0100
+++ b/mcabber/configure.ac	Sun Dec 02 10:36:42 2007 +0100
@@ -189,7 +189,7 @@
 
 # Export $datadir to the source tree.
 if test x"${datadir}" != x""; then
-    AC_DEFINE_DIR(DATA_DIR, "${datadir}", [Data files directory])
+    AC_DEFINE_DIR(DATA_DIR, "$datadir", [Data files directory])
 fi
 
 AC_ARG_ENABLE(debug,
--- a/mcabber/src/commands.c	Thu Nov 29 22:40:56 2007 +0100
+++ b/mcabber/src/commands.c	Sun Dec 02 10:36:42 2007 +0100
@@ -3427,7 +3427,7 @@
 static void do_disconnect(char *arg)
 {
   jb_disconnect();
-  AutoConnection = false;
+  AutoConnection = FALSE;
 }
 
 static void do_help(char *arg)
--- a/mcabber/src/jabglue.c	Thu Nov 29 22:40:56 2007 +0100
+++ b/mcabber/src/jabglue.c	Sun Dec 02 10:36:42 2007 +0100
@@ -1953,7 +1953,7 @@
         online = TRUE;
         update_last_use();
         // We set AutoConnection to true after the 1st successful connection
-        AutoConnection = true;
+        AutoConnection = TRUE;
         break;
 
     case JCONN_STATE_CONNECTING:
--- a/mcabber/src/screen.c	Thu Nov 29 22:40:56 2007 +0100
+++ b/mcabber/src/screen.c	Sun Dec 02 10:36:42 2007 +0100
@@ -243,10 +243,10 @@
 
 static int get_user_color(const char *color)
 {
-  bool isbright = false;
+  bool isbright = FALSE;
   int cl;
   if (!strncmp(color, "bright", 6)) {
-    isbright = true;
+    isbright = TRUE;
     color += 6;
   }
   cl = color_to_color_fg(FindColorInternal(color));
@@ -304,22 +304,22 @@
 void scr_MucNickColor(const char *nick, const char *color)
 {
   char *snick, *mnick;
-  bool need_update = false;
+  bool need_update = FALSE;
   snick = g_strdup_printf("<%s>", nick);
   mnick = g_strdup_printf("*%s ", nick);
   if (!strcmp(color, "-")) {//Remove the color
     if (nickcolors) {
       nickcolor *nc = g_hash_table_lookup(nickcolors, snick);
       if (nc) {//Have this nick already
-        nc->manual = false;
+        nc->manual = FALSE;
         nc = g_hash_table_lookup(nickcolors, mnick);
         assert(nc);//Must have both at the same time
-        nc->manual = false;
+        nc->manual = FALSE;
       }// Else -> no color saved, nothing to delete
     }
     g_free(snick);//They are not saved in the hash
     g_free(mnick);
-    need_update = true;
+    need_update = TRUE;
   } else if (!strcmp(color, "!")) {
     if (nickcolors) {
       g_free(g_hash_table_lookup(nickcolors, snick));
@@ -328,7 +328,7 @@
     }
     g_free(snick);//They are not saved in the hash
     g_free(mnick);
-    need_update = true;
+    need_update = TRUE;
   } else {
     int cl = get_user_color(color);
     if (cl < 0) {
@@ -338,14 +338,14 @@
     } else {
       nickcolor *nc = g_new(nickcolor, 1);
       ensure_string_htable(&nickcolors, NULL);
-      nc->manual = true;
+      nc->manual = TRUE;
       nc->color = cl;
       //Free the struct, if any there already
       g_free(g_hash_table_lookup(nickcolors, mnick));
       //Save the new ones
       g_hash_table_replace(nickcolors, mnick, nc);
       g_hash_table_replace(nickcolors, snick, nc);
-      need_update = true;
+      need_update = TRUE;
     }
   }
   if (need_update && chatmode &&
@@ -1084,7 +1084,7 @@
           char *snick = g_strdup(line->text), *mnick = g_strdup(line->text);
           nickcolor *nc = g_new(nickcolor, 1);
           nc->color = nickcols[random() % nickcolcount];
-          nc->manual = false;
+          nc->manual = FALSE;
           *snick = '<';
           snick[strlen(snick)-1] = '>';
           *mnick = '*';
@@ -2090,7 +2090,7 @@
   // We're moving to another buddy.  We're thus inactive wrt current_buddy.
   set_chatstate(0);
   // We don't want the chatstate to be changed again right now.
-  lock_chatstate = true;
+  lock_chatstate = TRUE;
 
   prev_st = buddy_getstatus(BUDDATA(current_buddy), NULL);
   buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE);
@@ -3707,7 +3707,7 @@
   int key = kcode.value;
   int display_char = FALSE;
 
-  lock_chatstate = false;
+  lock_chatstate = FALSE;
 
   switch (kcode.mcode) {
     case 0: