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

BeOS compilation works fine (just remove -lm in the makefile in
./dependendies/tolua)
in the Terminal run configure with options
--prefix= prefered place to install --with-gnu-ld --enable-client=sdl
--disable-gtktest --without-x LDFLAGS and PKG_CONFIG_PATH (in case you
have pkgconfig installed with links to libraries).
Checked the patch on the source 14052 IIRC.
diff -Nur freeciv-2.1/client/gui-sdl/chatline.c freeciv-2.1_beos/client/gui-sdl/chatline.c
--- freeciv-2.1/client/gui-sdl/chatline.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/chatline.c	Sun Nov 25 16:46:09 2007
@@ -732,9 +732,11 @@
   widget_set_position(pWindow, 0, 0);
 
   /* create window background */
+  {
   SDL_Surface *pSurf = theme_get_background(theme, BACKGROUND_CONNLISTDLG);
   if (resize_window(pWindow, pSurf, NULL, Main.screen->w, Main.screen->h)) {
     FREESURFACE(pSurf);
+  }
   }
   
   pConnDlg->text_width = pWindow->size.w - adj_size(130) - adj_size(20) - adj_size(20);
diff -Nur freeciv-2.1/client/gui-sdl/citydlg.c freeciv-2.1_beos/client/gui-sdl/citydlg.c
--- freeciv-2.1/client/gui-sdl/citydlg.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/citydlg.c	Sun Nov 25 16:47:01 2007
@@ -1565,10 +1565,11 @@
   city_map_zoom = ((pBuf->w > pBuf->h) ?
                      (float)adj_size(249) / pBuf->w
                    : (float)adj_size(159) / pBuf->h);
-  
+  {
   SDL_Surface *pRet = zoomSurface(pBuf, city_map_zoom, city_map_zoom, 1);
   
   return pRet;
+  }
 }
 
 /**************************************************************************
diff -Nur freeciv-2.1/client/gui-sdl/colors.h freeciv-2.1_beos/client/gui-sdl/colors.h
--- freeciv-2.1/client/gui-sdl/colors.h	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/colors.h	Sun Nov 25 16:48:01 2007
@@ -31,6 +31,6 @@
 };
 
 struct color *color_alloc_rgba(int r, int g, int b, int a);
-SDL_Color * get_game_colorRGB(Uint32 color_offset);
+SDL_Color * get_game_colorRGB(enum color_std color_offset);
 
 #endif	/* FC__COLORS_H */
diff -Nur freeciv-2.1/client/gui-sdl/connectdlg.c freeciv-2.1_beos/client/gui-sdl/connectdlg.c
--- freeciv-2.1/client/gui-sdl/connectdlg.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/connectdlg.c	Sun Nov 25 16:48:54 2007
@@ -200,7 +200,7 @@
   }
   
   SDL_Delay(5000);
-    
+  {  
   int i;
   for (i = 0; i < 100; i++) {
     server_list = server_scan_get_servers(pServer_scan);
@@ -211,6 +211,7 @@
   }
   
   return server_list;
+  }
 }
 
 
diff -Nur freeciv-2.1/client/gui-sdl/dialogs.c freeciv-2.1_beos/client/gui-sdl/dialogs.c
--- freeciv-2.1/client/gui-sdl/dialogs.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/dialogs.c	Sun Nov 25 16:50:29 2007
@@ -2836,6 +2836,7 @@
   add_to_gui_list(ID_NATION_WIZARD_CHANGE_SEX_BUTTON, pWidget);
 
   /* ---------------------------------------------------------- */
+  {
   int i = 0;
   zoom = DEFAULT_ZOOM * 1.0;
   while (i < game.control.styles_count) {
@@ -2945,7 +2946,7 @@
     putframe(pWindow->theme, area2.x, area2.y - 1, area2.x + area2.w, area2.y + area2.h,
              map_rgba(pWindow->theme->format, *get_game_colorRGB(COLOR_THEME_NATIONDLG_FRAME)));
   }
-   
+  } 
   /* Sellected Nation Name */
   pBuf->size.x = area.x + area.w / 2 + (area.w / 2 - pBuf->size.w) / 2;
   pBuf->size.y = area.y + adj_size(46);
diff -Nur freeciv-2.1/client/gui-sdl/graphics.c freeciv-2.1_beos/client/gui-sdl/graphics.c
--- freeciv-2.1/client/gui-sdl/graphics.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/graphics.c	Sun Nov 25 16:52:21 2007
@@ -3692,7 +3692,7 @@
   if (pSrc == NULL) {
     return NULL;
   }
-
+  {
   SDL_Surface *tmpSurface, *result;
 
   if (!((scale_up == FALSE) && ((new_width >= pSrc->w) && (new_height >= pSrc->h)))) {
@@ -3718,6 +3718,7 @@
   
   if (absolute_dimensions) {
     result = create_surf_alpha(new_width, new_height, SDL_SWSURFACE);
+    {
     SDL_Rect area = {
       (new_width - tmpSurface->w) / 2,
       (new_height - tmpSurface->h) / 2,
@@ -3725,11 +3726,13 @@
     };
     alphablit(tmpSurface, NULL, result, &area);
     FREESURFACE(tmpSurface);
+    }
   } else {
     result = tmpSurface;
   }
 
   return result;  
+  }
 }
 
 /* ============ FreeCiv game graphics function =========== */
diff -Nur freeciv-2.1/client/gui-sdl/inteldlg.c freeciv-2.1_beos/client/gui-sdl/inteldlg.c
--- freeciv-2.1/client/gui-sdl/inteldlg.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/inteldlg.c	Sun Nov 25 16:54:12 2007
@@ -276,6 +276,7 @@
     /* ---------- */
     
     pCapital = find_palace(p);
+    {
     struct player_research* research = get_player_research(p);
     change_ptsize16(pStr, adj_font(10));
     pStr->style &= ~TTF_STYLE_BOLD;
@@ -300,7 +301,7 @@
         (!pCapital) ? _("(Unknown)") : pCapital->name, p->economic.gold,
         p->economic.tax, p->economic.science, p->economic.luxury);
     }
-    
+    }
     copy_chars_to_string16(pStr, cBuf);
     pInfo = create_text_surf_from_str16(pStr);
     area.w = MAX(area.w, pLogo->w + adj_size(10) + pInfo->w + adj_size(20));
diff -Nur freeciv-2.1/client/gui-sdl/mapview.c freeciv-2.1_beos/client/gui-sdl/mapview.c
--- freeciv-2.1/client/gui-sdl/mapview.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/mapview.c	Sun Nov 25 16:56:02 2007
@@ -390,6 +390,7 @@
   SDL_Rect area = {0, 0, 0, 0};
   SDL_String16 *pText = create_string16(NULL, 0, 8);
   #else
+  {
   SDL_Rect area = {0, 3, 0, 0};
   SDL_String16 *pText = create_string16(NULL, 0, 10);
   #endif
@@ -460,6 +461,7 @@
   FREESTRING16(pText);
   
   queue_flush();
+  }
 }
 
 static int fucus_units_info_callback(struct widget *pWidget)
diff -Nur freeciv-2.1/client/gui-sdl/themespec.c freeciv-2.1_beos/client/gui-sdl/themespec.c
--- freeciv-2.1/client/gui-sdl/themespec.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/themespec.c	Sun Nov 25 16:57:17 2007
@@ -721,7 +721,7 @@
 
   sz_strlcpy(t->name, theme_name);
   t->priority = secfile_lookup_int(file, "themespec.priority");
-  
+  {
   char *langname = get_langname();
   if (langname) {
     if (strstr(langname, "zh_CN") != NULL) {
@@ -794,6 +794,7 @@
   FC_FREE(fname);
 
   return t;
+  }
 }
 
 
diff -Nur freeciv-2.1/client/gui-sdl/widget_button.c freeciv-2.1_beos/client/gui-sdl/widget_button.c
--- freeciv-2.1/client/gui-sdl/widget_button.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/widget_button.c	Sun Nov 25 16:57:58 2007
@@ -236,6 +236,7 @@
   }
   
   pIcon = create_icon_from_theme(pTIButton->theme2, get_wstate(pTIButton));
+  {
   SDL_Surface *pCopy_Of_Icon_Theme = pTIButton->theme2;
 
   pTIButton->theme2 = pIcon;
@@ -246,6 +247,7 @@
   pTIButton->theme2 = pCopy_Of_Icon_Theme;
 
   return iRet;
+  }
 }
 
 /**************************************************************************
diff -Nur freeciv-2.1/client/gui-sdl/widget_checkbox.c freeciv-2.1_beos/client/gui-sdl/widget_checkbox.c
--- freeciv-2.1/client/gui-sdl/widget_checkbox.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/widget_checkbox.c	Sun Nov 25 16:58:41 2007
@@ -168,7 +168,7 @@
   pTmp->pTRUE_Theme = pTheme->CBOX_Sell_Icon;
   pTmp->pFALSE_Theme = pTheme->CBOX_Unsell_Icon;
   pCBox->private_data.cbox = pTmp;
-
+  {
   struct widget *pTmpWidget = widget_new();
   /* we can't use pCBox->redraw here, because it is of type iconlabel */
   textcheckbox_baseclass_redraw = pTmpWidget->redraw;
@@ -176,6 +176,7 @@
   pCBox->redraw = redraw_textcheckbox;
   
   return pCBox;
+  }
 }
 
 int set_new_checkbox_theme(struct widget *pCBox ,
diff -Nur freeciv-2.1/client/gui-sdl/widget_scrollbar.c freeciv-2.1_beos/client/gui-sdl/widget_scrollbar.c
--- freeciv-2.1/client/gui-sdl/widget_scrollbar.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/widget_scrollbar.c	Sun Nov 25 17:00:54 2007
@@ -143,7 +143,7 @@
   if (ret != 0) {
     return ret;
   }
-  
+  {
   SDL_Surface *pVert_Surf = create_vertical_surface(pVert->theme,
 						    get_wstate(pVert),
 						    pVert->size.h);
@@ -153,6 +153,7 @@
   FREESURFACE(pVert_Surf);
 
   return ret;
+  }
 }
 
 /**************************************************************************
@@ -283,7 +284,7 @@
   if (ret != 0) {
     return ret;
   }
-  
+  {
   SDL_Surface *pHoriz_Surf = create_horizontal_surface(pHoriz->theme,
 						       get_wstate(pHoriz),
 						       pHoriz->size.w);
@@ -292,6 +293,7 @@
   FREESURFACE(pHoriz_Surf);
 
   return ret;
+  }
 }
 
 /**************************************************************************
diff -Nur freeciv-2.1/client/gui-sdl/wldlg.c freeciv-2.1_beos/client/gui-sdl/wldlg.c
--- freeciv-2.1/client/gui-sdl/wldlg.c	Sun Nov 25 08:18:32 2007
+++ freeciv-2.1_beos/client/gui-sdl/wldlg.c	Sun Nov 25 17:02:56 2007
@@ -364,6 +364,7 @@
 static void get_target_help_data(struct widget *pTarget)
 {
   assert(pTarget != NULL);
+  {
   struct city_production prod;
   
   /* redraw Target Icon */
@@ -379,7 +380,7 @@
   } else {
     popup_impr_info(prod.value);
   }
-  
+  }
 }
 
 
@@ -1177,7 +1178,7 @@
   /* create Widget Labels of worklist entries */
 
   count = 0;
-  
+  {
   struct worklist *worklist = pWorkList;
     
   worklist_iterate(worklist, prod) {
@@ -1206,6 +1207,7 @@
   }
   
   } worklist_iterate_end;
+  }
   
   if(count) {
     if(!pCity) {
diff -Nur freeciv-2.1/client/reqtree.c freeciv-2.1_beos/client/reqtree.c
--- freeciv-2.1/client/reqtree.c	Sun Nov 25 08:18:35 2007
+++ freeciv-2.1_beos/client/reqtree.c	Sun Nov 25 17:08:20 2007
@@ -922,6 +922,7 @@
    * watch out: recursion */
   if (dest_node->is_dummy) {
     assert(dest_node->nprovide > 0);
+    {
     enum reqtree_edge_type sum_type = REQTREE_EDGE;
     int i;
     for (i = 0; i < dest_node->nprovide; ++i) {
@@ -940,8 +941,9 @@
       };
     }
     return sum_type;
+    }
   }
-
+  {
   struct player_research* research = get_player_research(game.player_ptr);
 
   if (!game.player_ptr || !research) {
@@ -967,6 +969,7 @@
   }
 
   return REQTREE_EDGE;
+  }
 }
 
 /****************************************************************************
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to