Author: cazfi
Date: Tue Aug 11 17:51:07 2015
New Revision: 29461

URL: http://svn.gna.org/viewcvs/freeciv?rev=29461&view=rev
Log:
Added missing function headers to files spaceshipdlg.c - widget.c in 
client/gui-sdl2
directory. Also other cleanups.

See patch #2937

Modified:
    trunk/client/gui-sdl2/spaceshipdlg.c
    trunk/client/gui-sdl2/sprite.c
    trunk/client/gui-sdl2/themebackgrounds.c
    trunk/client/gui-sdl2/themecolors.c
    trunk/client/gui-sdl2/themespec.c
    trunk/client/gui-sdl2/unistring.c
    trunk/client/gui-sdl2/utf8string.c
    trunk/client/gui-sdl2/widget.c

Modified: trunk/client/gui-sdl2/spaceshipdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/spaceshipdlg.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/spaceshipdlg.c        (original)
+++ trunk/client/gui-sdl2/spaceshipdlg.c        Tue Aug 11 17:51:07 2015
@@ -49,9 +49,9 @@
 static struct dialog_list *dialog_list = NULL;
 static bool dialog_list_has_been_initialised = FALSE;
 
-/****************************************************************
-...
-*****************************************************************/
+/**************************************************************************
+  Find spaceship dialog related to specified player.
+**************************************************************************/
 static struct SMALL_DLG *get_spaceship_dialog(struct player *pplayer)
 {
   if (!dialog_list_has_been_initialised) {
@@ -68,6 +68,9 @@
   return NULL;
 }
 
+/**************************************************************************
+  User interacted with spaceship dialog window.
+**************************************************************************/
 static int space_dialog_window_callback(struct widget *pWindow)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
@@ -77,6 +80,9 @@
   return -1;
 }
 
+/**************************************************************************
+  User interacted with spaceship dialog close button.
+**************************************************************************/
 static int exit_space_dialog_callback(struct widget *pWidget)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
@@ -87,6 +93,9 @@
   return -1;
 }
 
+/**************************************************************************
+  User interacted with spaceship dialog launch button.
+**************************************************************************/
 static int launch_spaceship_callback(struct widget *pWidget)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {

Modified: trunk/client/gui-sdl2/sprite.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/sprite.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/sprite.c      (original)
+++ trunk/client/gui-sdl2/sprite.c      Tue Aug 11 17:51:07 2015
@@ -167,8 +167,6 @@
   FC_FREE(s);
 }
 
-/*************************************************************************/
-
 /**************************************************************************
   Create a sprite struct and fill it with SDL_Surface pointer
 **************************************************************************/

Modified: trunk/client/gui-sdl2/themebackgrounds.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/themebackgrounds.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/themebackgrounds.c    (original)
+++ trunk/client/gui-sdl2/themebackgrounds.c    Tue Aug 11 17:51:07 2015
@@ -55,6 +55,9 @@
   "wldlg",
 };
 
+/****************************************************************************
+  Read theme background system from a file.
+****************************************************************************/
 struct theme_background_system *theme_background_system_read(struct 
section_file *file)
 {
   int i;

Modified: trunk/client/gui-sdl2/themecolors.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/themecolors.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/themecolors.c (original)
+++ trunk/client/gui-sdl2/themecolors.c Tue Aug 11 17:51:07 2015
@@ -145,6 +145,9 @@
   "wldlg_frame",
 };
 
+/****************************************************************************
+  Read theme color system from a file.
+****************************************************************************/
 struct theme_color_system *theme_color_system_read(struct section_file *file)
 {
   int i;

Modified: trunk/client/gui-sdl2/themespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/themespec.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/themespec.c   (original)
+++ trunk/client/gui-sdl2/themespec.c   Tue Aug 11 17:51:07 2015
@@ -254,9 +254,9 @@
   'which' should be "themespec" or "spec".
 ***********************************************************************/
 static bool check_themespec_capabilities(struct section_file *file,
-                                       const char *which,
-                                       const char *us_capstr,
-                                       const char *filename)
+                                         const char *which,
+                                         const char *us_capstr,
+                                         const char *filename)
 {
   const char *file_capstr = secfile_lookup_str(file, "%s.options", which);
 
@@ -270,6 +270,7 @@
     log_debug("\"%s\": %s file appears incompatible:", filename, which);
     log_debug("  datafile options: %s", file_capstr);
     log_debug("  supported options: %s", us_capstr);
+
     return FALSE;
   }
 
@@ -278,6 +279,7 @@
               " that client doesn't support:", filename, which);
     log_debug("  datafile options: %s", file_capstr);
     log_debug("  supported options: %s", us_capstr);
+
     return FALSE;
   }
 
@@ -1037,7 +1039,7 @@
 }
 
 /**********************************************************************
-...
+  Free all sprites for the theme.
 ***********************************************************************/
 void theme_free_sprites(struct theme *t)
 {

Modified: trunk/client/gui-sdl2/unistring.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/unistring.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/unistring.c   (original)
+++ trunk/client/gui-sdl2/unistring.c   Tue Aug 11 17:51:07 2015
@@ -34,7 +34,7 @@
 #include "unistring.h"
 
 /**************************************************************************
-  ...
+  Return length of string in characters.
 **************************************************************************/
 size_t unistrlen(const Uint16 *pUniString)
 {
@@ -51,13 +51,14 @@
 }
 
 /**************************************************************************
-  ...
+  Copy unistring. If destination is NULL, allocates the destination buffer
+  Returns the copy.
 **************************************************************************/
 Uint16 *unistrcpy(Uint16 *pToUniString, const Uint16 *pFromUniString)
 {
   size_t size = (unistrlen(pFromUniString) + 1) << 1;
 
-  if (!pToUniString) {
+  if (pToUniString == NULL) {
     pToUniString = fc_calloc(1, size);
   }
 
@@ -65,7 +66,7 @@
 }
 
 /**************************************************************************
-  ...
+  Catenates unistrings. Destination must have enough space.
 **************************************************************************/
 Uint16 *unistrcat(Uint16 *pToUniString,
                   const Uint16 *pFromUniString)
@@ -80,7 +81,7 @@
 }
 
 /**************************************************************************
-  ...
+  Creates copy of the unistring.
 **************************************************************************/
 Uint16 *unistrdup(const Uint16 *pUniString)
 {
@@ -93,7 +94,7 @@
 /**************************************************************************
   Don't free return array, only arrays members
 **************************************************************************/
-Uint16 ** create_new_line_unistrings(const Uint16 *pUnistring)
+Uint16 **create_new_line_unistrings(const Uint16 *pUnistring)
 {
   static Uint16 *pBuf[64];
   Uint16 *pFromUnistring = (Uint16 *)pUnistring;

Modified: trunk/client/gui-sdl2/utf8string.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/utf8string.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/utf8string.c  (original)
+++ trunk/client/gui-sdl2/utf8string.c  Tue Aug 11 17:51:07 2015
@@ -10,14 +10,6 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 ***********************************************************************/
-
-/***************************************************************************
-                          unistring.c  -  description
-                             -------------------
-    begin                : Mon Jul 08 2002
-    copyright            : (C) 2002 by Rafał Bursig
-    email                : Rafał Bursig <bur...@poczta.fm>
- ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
 #include <fc_config.h>

Modified: trunk/client/gui-sdl2/widget.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/widget.c?rev=29461&r1=29460&r2=29461&view=diff
==============================================================================
--- trunk/client/gui-sdl2/widget.c      (original)
+++ trunk/client/gui-sdl2/widget.c      Tue Aug 11 17:51:07 2015
@@ -754,7 +754,7 @@
 }
 
 /**************************************************************************
-  ...
+  Undraw all widgets in the group.
 **************************************************************************/
 void undraw_group(struct widget *pBeginGroupWidgetList,
                   struct widget *pEndGroupWidgetList)
@@ -774,7 +774,7 @@
 }
 
 /**************************************************************************
-  ...
+  Move all widgets in the group by the given amounts.
 **************************************************************************/
 void set_new_group_start_pos(const struct widget *pBeginGroupWidgetList,
                              const struct widget *pEndGroupWidgetList,
@@ -861,7 +861,8 @@
 }
 
 /**************************************************************************
-  ...
+  Remove all widgets of the group from the list of displayed widgets.
+  Does not free widget memory.
 **************************************************************************/
 void del_group_of_widgets_from_gui_list(struct widget *pBeginGroupWidgetList,
                                         struct widget *pEndGroupWidgetList)
@@ -896,7 +897,7 @@
 }
 
 /**************************************************************************
-  ...
+  Set state for all the widgets in the group.
 **************************************************************************/
 void set_group_state(struct widget *pBeginGroupWidgetList,
                      struct widget *pEndGroupWidgetList, enum widget_state 
state)
@@ -913,7 +914,7 @@
 }
 
 /**************************************************************************
-  ...
+  Hide all widgets in the group.
 **************************************************************************/
 void hide_group(struct widget *pBeginGroupWidgetList,
                 struct widget *pEndGroupWidgetList)
@@ -932,7 +933,7 @@
 }
 
 /**************************************************************************
-  ...
+  Show all widgets in the group.
 **************************************************************************/
 void show_group(struct widget *pBeginGroupWidgetList,
                 struct widget *pEndGroupWidgetList)
@@ -951,7 +952,7 @@
 }
 
 /**************************************************************************
-  ...
+  Set area for all widgets in the group.
 **************************************************************************/
 void group_set_area(struct widget *pBeginGroupWidgetList,
                     struct widget *pEndGroupWidgetList,
@@ -1049,7 +1050,7 @@
 }
 
 /**************************************************************************
-  ...
+  Setup widgets vertically.
 **************************************************************************/
 int setup_vertical_widgets_position(int step,
                                     Sint16 start_x, Sint16 start_y,
@@ -1149,7 +1150,7 @@
 }
 
 /**************************************************************************
-  ...
+  Redraw background of the widget.
 **************************************************************************/
 void refresh_widget_background(struct widget *pWidget)
 {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to