diff --git a/ChangeLog b/ChangeLog index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9a4f6fa422..fb6b6455da 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Sat Mar 14 13:26:09 1998 Owen Taylor + + * gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness + warnings + + * gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1 + 1998-03-14 Federico Mena Quintero * gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index d0202ee03b..d54f618eda 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1586,12 +1586,8 @@ gtk_move_backward_character (GtkEntry *entry) /* this routine is correct only if string is state-independent-encoded */ if (0 < editable->current_pos) - { - editable->current_pos = move_backward_character (entry->text, - editable->current_pos); - if (editable->current_pos < 0) - editable->current_pos = 0; - } + editable->current_pos = move_backward_character (entry->text, + editable->current_pos); } static void diff --git a/gtk/gtkhandlebox.h b/gtk/gtkhandlebox.h index 224f977d67..58e68e25bd 100644 --- a/gtk/gtkhandlebox.h +++ b/gtk/gtkhandlebox.h @@ -50,9 +50,9 @@ struct _GtkHandleBox GdkWindow *steady_window; /* the window that stays in the parent container */ GtkWidget *float_window; GtkRequisition real_requisition; - gint is_being_dragged : 1; - gint is_onroot : 1; - gint overlap_attaches : 1; + guint is_being_dragged : 1; + guint is_onroot : 1; + guint overlap_attaches : 1; GdkCursor *fleur_cursor; gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */ diff --git a/gtk/gtktext.c b/gtk/gtktext.c index d8a42abf34..17d4d000dc 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -609,7 +609,7 @@ gtk_text_set_point (GtkText *text, { g_return_if_fail (text != NULL); g_return_if_fail (GTK_IS_TEXT (text)); - g_return_if_fail (index >= 0 && index <= TEXT_LENGTH (text)); + g_return_if_fail (index <= TEXT_LENGTH (text)); text->point = find_mark (text, index); } @@ -664,13 +664,13 @@ gtk_text_insert (GtkText *text, const char *chars, gint nchars) { - gint i; GtkEditable *editable = GTK_EDITABLE (text); gboolean frozen = FALSE; gint new_line_count = 1; guint old_height = 0; guint length; + guint i; g_return_if_fail (text != NULL); g_return_if_fail (GTK_IS_TEXT (text)); @@ -839,7 +839,9 @@ gtk_text_get_chars (GtkEditable *editable, if (end_pos < 0) end_pos = TEXT_LENGTH (text); - if ((end_pos > TEXT_LENGTH (text)) || (end_pos < start_pos)) + if ((start_pos < 0) || + (end_pos > TEXT_LENGTH (text)) || + (end_pos < start_pos)) return NULL; nchars = end_pos - start_pos;