[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Replace 0 with FALSE and 1 with
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Feb 19, 2002 at 11:11:02AM -0800, freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> Replace 0 with FALSE and 1 with TRUE if these numbers are used in a
> boolean context.
I'm finished with this conversation and the s/int/bool/ thing. Exceptions:
- did_buy (isn't a real bool, needs fixing)
- code in the gui-* directories. The GTK client produces a lot of
false warnings because the GTK-header files are just
missleading. Small example:
client/gui-gtk/citydlg.c
gtk_progress_set_show_text(GTK_PROGRESS
(pdialog->overview.progress_label), TRUE);
and
http://developer.gnome.org/doc/API/gtk/gtkprogress.html#GTK-PROGRESS-SET-SHOW-TEXT
gtk_progress_set_show_text ()
void gtk_progress_set_show_text (GtkProgress *progress,
gint show_text);
Controls whether progress text is shown.
progress : a GtkProgress.
show_text : a boolean indicating whether the progress text is shown.
So why didn't they make show_text a boolean. After all they have a
type gboolean. At least they have fixed this error in the new 2.0
release.
Bottom line: If you have a 1 which should be TRUE, a 0 which should be
a FALSE or an int which is really an bool please report (even in gui-*
code).
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Understanding is a three-edged sword;
your side, their side, and the truth."
-- a well-known Vorlon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Replace 0 with FALSE and 1 with TRUE if thes...,
Raimar Falke <=
|
|