<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40616 >

> [james.mccl...@gmail.com - Thu Jan 01 02:38:33 2009]:
> 
> That patch that you attached completely fixes the problem
> with repodlgs.c, but the change to helpdata.c that was in
> the earlier patch(es) that I sent is also required to make
> that file compile.

Oh right, sorry I forgot about that. Here's a second
version of the patch that should fix that problem by
removing the macro.


> Incidentally, I have to say that I do not know for
> certain that those two fixes are sufficient to make the
> code compile for any possible configuration.  I have only
> tried to compile the configuration that comes naturally
> from the configuration script on my particular computer,
> so I have not exercised all of the code that is there.
> In particular, there appear to be a number of different
> types of clients there, none of which I have looked at
> other than the gtk one.

Well if you feel like it and have some time to burn,
you could try compiling with

./configure --enable-debug
./configure --enable-auth (maybe also --with-mysql-prefix)
./configure --enable-client=sdl

These would be the main variations of interest to test,
but it can wait if you have more pressing things to do
at the moment. ;)


-----------------------------------------------------------------------
何なのかしら?
diff --git a/client/gui-gtk-2.0/repodlgs.c b/client/gui-gtk-2.0/repodlgs.c
index 7f40ea1..1272966 100644
--- a/client/gui-gtk-2.0/repodlgs.c
+++ b/client/gui-gtk-2.0/repodlgs.c
@@ -1178,7 +1178,7 @@ void activeunits_report_dialog_update(void)
 {
   struct repoinfo {
     int active_count;
-    int upkeep[O_COUNT];
+    int upkeep[O_MAX];
     int building_count;
   };
 
diff --git a/client/helpdata.c b/client/helpdata.c
index 45850e2..2071502 100644
--- a/client/helpdata.c
+++ b/client/helpdata.c
@@ -237,42 +237,40 @@ static void insert_allows(struct req_source *psource,
   buf[0] = '\0';
 
   /* FIXME: show other data like range and survives. */
-#define COREQ_APPEND(s)							    \
-  (coreq_buf[0] != '\0'							    \
-   ? cat_snprintf(coreq_buf, sizeof(coreq_buf), Q_("?clistmore:, %s"), (s))  \
-   : sz_strlcpy(coreq_buf, (s)))
-
 
   impr_type_iterate(impr_id) {
     struct impr_type *building = improvement_by_number(impr_id);
 
     requirement_vector_iterate(&building->reqs, req) {
       if (are_req_sources_equal(psource, &req->source)) {
-	char coreq_buf[512] = "";
-
-	requirement_vector_iterate(&building->reqs, coreq) {
-	  if (!are_req_sources_equal(psource, &coreq->source)) {
-	    char buf2[512];
-
-	    COREQ_APPEND(get_req_source_text(&coreq->source,
-					     buf2, sizeof(buf2)));
-	  }
-	} requirement_vector_iterate_end;
+        char coreq_buf[512] = "";
+
+        requirement_vector_iterate(&building->reqs, coreq) {
+          if (!are_req_sources_equal(psource, &coreq->source)) {
+            char buf2[512] = "";
+
+            get_req_source_text(&coreq->source, buf2, sizeof(buf2));
+            if (coreq_buf[0] == '\0') {
+              sz_strlcpy(coreq_buf, buf2);
+            } else {
+              cat_snprintf(coreq_buf, sizeof(coreq_buf),
+                           Q_("?clistmore:, %s"), buf2);
+            }
+          }
+        } requirement_vector_iterate_end;
 
 	if (coreq_buf[0] == '\0') {
-	  cat_snprintf(buf, bufsz, _("Allows %s."),
-		       improvement_name_translation(impr_id));
-	} else {
-	  cat_snprintf(buf, bufsz, _("Allows %s (with %s)."),
-		       improvement_name_translation(impr_id),
-		       coreq_buf);
-	}
-	cat_snprintf(buf, bufsz, "\n");
+          cat_snprintf(buf, bufsz, _("Allows %s."),
+                       improvement_name_translation(impr_id));
+        } else {
+          cat_snprintf(buf, bufsz, _("Allows %s (with %s)."),
+                       improvement_name_translation(impr_id),
+                       coreq_buf);
+        }
+        cat_snprintf(buf, bufsz, "\n");
       }
     } requirement_vector_iterate_end;
   } impr_type_iterate_end;
-
-#undef COREQ_APPEND
 }
 
 /****************************************************************
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to