diff options
author | Havoc Pennington <hp@redhat.com> | 2000-10-30 17:03:00 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-10-30 17:03:00 +0000 |
commit | 5190c7397c407f07d14989d32e711131aa57d39b (patch) | |
tree | 931bc10457c29d008afc5370ad70baed55db8c75 /gtk/gtktextmark.c | |
parent | ad8cdea4e8677c6c56e0cbc39ecdac7135a83824 (diff) | |
download | gtk+-5190c7397c407f07d14989d32e711131aa57d39b.tar.gz |
Massive reindentation and reformatting. Arg alignment and comments still
2000-10-30 Havoc Pennington <hp@redhat.com>
* gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c,
gtktextbuffer.h, gtktextchild.c, gtktextchild.h,
gtktextchildprivate.h, gtktextdisplay.c, gtktextdisplay.h,
gtktextiter.c, gtktextiter.h, gtktextiterprivate.h,
gtktextlayout.c, gtktextlayout.h, gtktextmark.c, gtktextmark.h,
gtktextmarkprivate.h, gtktextsegment.c, gtktextsegment.h,
gtktexttag.c, gtktexttag.h, gtktexttagprivate.h,
gtktexttagtable.c, gtktexttagtable.h, gtktexttypes.c,
gtktexttypes.h, gtktextview.c, gtktextview.h:
Massive reindentation and reformatting. Arg alignment and comments
still need fixing in various places.
Diffstat (limited to 'gtk/gtktextmark.c')
-rw-r--r-- | gtk/gtktextmark.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/gtk/gtktextmark.c b/gtk/gtktextmark.c index c2deee5e05..bf2d1f2a07 100644 --- a/gtk/gtktextmark.c +++ b/gtk/gtktextmark.c @@ -1,5 +1,5 @@ /* gtktextmark.c - mark segments - * + * * Copyright (c) 1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 2000 Red Hat, Inc. @@ -9,7 +9,7 @@ * California, Sun Microsystems, Inc., and other parties. The * following terms apply to all files associated with the software * unless explicitly disclaimed in individual files. - * + * * The authors hereby grant permission to use, copy, modify, * distribute, and license this software and its documentation for any * purpose, provided that existing copyright notices are retained in @@ -19,13 +19,13 @@ * software may be copyrighted by their authors and need not follow * the licensing terms described here, provided that the new terms are * clearly indicated on the first page of each file where they apply. - * + * * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND @@ -44,7 +44,7 @@ * foregoing, the authors grant the U.S. Government and others acting * in its behalf permission to use and distribute the software in * accordance with the terms specified in this license. - * + * */ @@ -76,12 +76,12 @@ gtk_text_mark_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gtk_text_mark_init, }; - + object_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextMark", &object_info, 0); } - + return object_type; } @@ -119,7 +119,7 @@ gtk_text_mark_finalize (GObject *obj) g_warning ("GtkTextMark being finalized while still in the buffer; " "someone removed a reference they didn't own! Crash " "impending"); - + g_free (seg->body.mark.name); g_free (seg); @@ -128,7 +128,7 @@ gtk_text_mark_finalize (GObject *obj) } gboolean -gtk_text_mark_is_visible(GtkTextMark *mark) +gtk_text_mark_is_visible (GtkTextMark *mark) { GtkTextLineSegment *seg; @@ -151,14 +151,14 @@ gboolean gtk_text_mark_get_deleted (GtkTextMark *mark) { GtkTextLineSegment *seg; - + g_return_val_if_fail (mark != NULL, FALSE); seg = mark->segment; if (seg == NULL) return TRUE; - + return seg->body.mark.tree == NULL; } @@ -166,8 +166,8 @@ gtk_text_mark_get_deleted (GtkTextMark *mark) * Macro that determines the size of a mark segment: */ -#define MSEG_SIZE ((unsigned) (G_STRUCT_OFFSET(GtkTextLineSegment, body) \ - + sizeof(GtkTextMarkBody))) +#define MSEG_SIZE ((unsigned) (G_STRUCT_OFFSET (GtkTextLineSegment, body) \ + + sizeof (GtkTextMarkBody))) GtkTextLineSegment* @@ -184,20 +184,20 @@ _gtk_mark_segment_new (GtkTextBTree *tree, mark->type = >k_text_left_mark_type; else mark->type = >k_text_right_mark_type; - + mark->byte_count = 0; mark->char_count = 0; mark->body.mark.obj = g_object_new (GTK_TYPE_TEXT_MARK, NULL); mark->body.mark.obj->segment = mark; - + mark->body.mark.tree = tree; mark->body.mark.line = NULL; mark->next = NULL; mark->body.mark.visible = FALSE; mark->body.mark.not_deleteable = FALSE; - + return mark; } @@ -218,23 +218,23 @@ static void mark_segment_check_func (GtkTextLineSegment *segPtr */ GtkTextLineSegmentClass gtk_text_right_mark_type = { - "mark", /* name */ - FALSE, /* leftGravity */ - NULL, /* splitFunc */ - mark_segment_delete_func, /* deleteFunc */ - mark_segment_cleanup_func, /* cleanupFunc */ - NULL, /* lineChangeFunc */ - mark_segment_check_func /* checkFunc */ + "mark", /* name */ + FALSE, /* leftGravity */ + NULL, /* splitFunc */ + mark_segment_delete_func, /* deleteFunc */ + mark_segment_cleanup_func, /* cleanupFunc */ + NULL, /* lineChangeFunc */ + mark_segment_check_func /* checkFunc */ }; GtkTextLineSegmentClass gtk_text_left_mark_type = { - "mark", /* name */ - TRUE, /* leftGravity */ - NULL, /* splitFunc */ - mark_segment_delete_func, /* deleteFunc */ - mark_segment_cleanup_func, /* cleanupFunc */ - NULL, /* lineChangeFunc */ - mark_segment_check_func /* checkFunc */ + "mark", /* name */ + TRUE, /* leftGravity */ + NULL, /* splitFunc */ + mark_segment_delete_func, /* deleteFunc */ + mark_segment_cleanup_func, /* cleanupFunc */ + NULL, /* lineChangeFunc */ + mark_segment_check_func /* checkFunc */ }; /* @@ -242,15 +242,15 @@ GtkTextLineSegmentClass gtk_text_left_mark_type = { * * mark_segment_delete_func -- * - * This procedure is invoked by the text B-tree code whenever - * a mark lies in a range of characters being deleted. + * This procedure is invoked by the text B-tree code whenever + * a mark lies in a range of characters being deleted. * * Results: - * Returns 1 to indicate that deletion has been rejected. + * Returns 1 to indicate that deletion has been rejected. * * Side effects: - * None (even if the whole tree is being deleted we don't - * free up the mark; it will be done elsewhere). + * None (even if the whole tree is being deleted we don't + * free up the mark; it will be done elsewhere). * *-------------------------------------------------------------- */ @@ -268,21 +268,21 @@ mark_segment_delete_func (GtkTextLineSegment *segPtr, * * mark_segment_cleanup_func -- * - * This procedure is invoked by the B-tree code whenever a - * mark segment is moved from one line to another. + * This procedure is invoked by the B-tree code whenever a + * mark segment is moved from one line to another. * * Results: - * None. + * None. * * Side effects: - * The line field of the segment gets updated. + * The line field of the segment gets updated. * *-------------------------------------------------------------- */ static GtkTextLineSegment * -mark_segment_cleanup_func(GtkTextLineSegment *seg, - GtkTextLine *line) +mark_segment_cleanup_func (GtkTextLineSegment *seg, + GtkTextLine *line) { /* not sure why Tk did this here and not in LineChangeFunc */ seg->body.mark.line = line; @@ -294,23 +294,23 @@ mark_segment_cleanup_func(GtkTextLineSegment *seg, * * mark_segment_check_func -- * - * This procedure is invoked by the B-tree code to perform - * consistency checks on mark segments. + * This procedure is invoked by the B-tree code to perform + * consistency checks on mark segments. * * Results: - * None. + * None. * * Side effects: - * The procedure panics if it detects anything wrong with - * the mark. + * The procedure panics if it detects anything wrong with + * the mark. * *-------------------------------------------------------------- */ static void -mark_segment_check_func(GtkTextLineSegment *seg, - GtkTextLine *line) +mark_segment_check_func (GtkTextLineSegment *seg, + GtkTextLine *line) { if (seg->body.mark.line != line) - g_error("mark_segment_check_func: seg->body.mark.line bogus"); + g_error ("mark_segment_check_func: seg->body.mark.line bogus"); } |