summaryrefslogtreecommitdiff
path: root/gtk/gtktextsegment.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-10-08 05:07:55 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-10-08 05:07:55 +0000
commit07e7719441f5927bc3c482717fc53f8529186e3a (patch)
tree4baea8ab1c47987dc80120c67cb16be141a16b8d /gtk/gtktextsegment.c
parente4581869b4a93ab882439673159a8f77b2396e57 (diff)
downloadgtk+-07e7719441f5927bc3c482717fc53f8529186e3a.tar.gz
Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08 Matthias Clasen <mclasen@redhat.com> * Apply a cleanup patch by Kjartan Maraas (#341812)
Diffstat (limited to 'gtk/gtktextsegment.c')
-rw-r--r--gtk/gtktextsegment.c61
1 files changed, 35 insertions, 26 deletions
diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c
index 63f3781998..71eaaf7a0a 100644
--- a/gtk/gtktextsegment.c
+++ b/gtk/gtktextsegment.c
@@ -298,6 +298,11 @@ char_segment_split_func (GtkTextLineSegment *seg, int index)
* This procedure merges adjacent character segments into
* a single character segment, if possible.
*
+ * Arguments:
+ * segPtr: Pointer to the first of two adjacent segments to
+ * join.
+ * line: Line containing segments (not used).
+ *
* Results:
* The return value is a pointer to the first segment in
* the (new) list of segments that used to start with segPtr.
@@ -310,11 +315,7 @@ char_segment_split_func (GtkTextLineSegment *seg, int index)
/* ARGSUSED */
static GtkTextLineSegment *
-char_segment_cleanup_func (segPtr, line)
- GtkTextLineSegment *segPtr; /* Pointer to first of two adjacent
- * segments to join. */
- GtkTextLine *line; /* Line containing segments (not
- * used). */
+char_segment_cleanup_func (GtkTextLineSegment *segPtr, GtkTextLine *line)
{
GtkTextLineSegment *segPtr2, *newPtr;
@@ -352,6 +353,12 @@ char_segment_cleanup_func (segPtr, line)
*
* This procedure is invoked to delete a character segment.
*
+ * Arguments:
+ * segPtr : Segment to delete
+ * line : Line containing segment
+ * treeGone : Non-zero means the entire tree is being
+ * deleted, so everything must get cleaned up.
+ *
* Results:
* Always returns 0 to indicate that the segment was deleted.
*
@@ -363,12 +370,7 @@ char_segment_cleanup_func (segPtr, line)
/* ARGSUSED */
static int
-char_segment_delete_func (segPtr, line, treeGone)
- GtkTextLineSegment *segPtr; /* Segment to delete. */
- GtkTextLine *line; /* Line containing segment. */
- int treeGone; /* Non-zero means the entire tree is
- * being deleted, so everything must
- * get cleaned up. */
+char_segment_delete_func (GtkTextLineSegment *segPtr, GtkTextLine *line, int treeGone)
{
g_free ((char*) segPtr);
return 0;
@@ -382,6 +384,10 @@ char_segment_delete_func (segPtr, line, treeGone)
* This procedure is invoked to perform consistency checks
* on character segments.
*
+ * Arguments:
+ * segPtr : Segment to check
+ * line : Line containing segment
+ *
* Results:
* None.
*
@@ -394,9 +400,7 @@ char_segment_delete_func (segPtr, line, treeGone)
/* ARGSUSED */
static void
-char_segment_check_func (segPtr, line)
- GtkTextLineSegment *segPtr; /* Segment to check. */
- GtkTextLine *line; /* Line containing segment. */
+char_segment_check_func (GtkTextLineSegment *segPtr, GtkTextLine *line)
{
char_segment_self_check (segPtr);
@@ -436,6 +440,12 @@ _gtk_toggle_segment_new (GtkTextTagInfo *info, gboolean on)
*
* This procedure is invoked to delete toggle segments.
*
+ * Arguments:
+ * segPtr : Segment to check
+ * line : Line containing segment
+ * treeGone : Non-zero means the entire tree is being
+ * deleted so everything must get cleaned up
+ *
* Results:
* Returns 1 to indicate that the segment may not be deleted,
* unless the entire B-tree is going away.
@@ -449,12 +459,7 @@ _gtk_toggle_segment_new (GtkTextTagInfo *info, gboolean on)
*/
static int
-toggle_segment_delete_func (segPtr, line, treeGone)
- GtkTextLineSegment *segPtr; /* Segment to check. */
- GtkTextLine *line; /* Line containing segment. */
- int treeGone; /* Non-zero means the entire tree is
- * being deleted, so everything must
- * get cleaned up. */
+toggle_segment_delete_func (GtkTextLineSegment *segPtr, GtkTextLine *line, int treeGone)
{
if (treeGone)
{
@@ -488,6 +493,10 @@ toggle_segment_delete_func (segPtr, line, treeGone)
* been modified in some way. It's invoked after the
* modifications are complete.
*
+ * Arguments:
+ * segPtr : Segment to check
+ * line : Line that now contains segment
+ *
* Results:
* The return value is the head segment in a new list
* that is to replace the tail of the line that used to
@@ -503,9 +512,7 @@ toggle_segment_delete_func (segPtr, line, treeGone)
*/
static GtkTextLineSegment *
-toggle_segment_cleanup_func (segPtr, line)
- GtkTextLineSegment *segPtr; /* Segment to check. */
- GtkTextLine *line; /* Line that now contains segment. */
+toggle_segment_cleanup_func (GtkTextLineSegment *segPtr, GtkTextLine *line)
{
GtkTextLineSegment *segPtr2, *prevPtr;
int counts;
@@ -563,6 +570,10 @@ toggle_segment_cleanup_func (segPtr, line)
* This procedure is invoked when a toggle segment is about
* to move from one line to another.
*
+ * Arguments:
+ * segPtr : Segment to check
+ * line : Line that used to contain segment
+ *
* Results:
* None.
*
@@ -573,9 +584,7 @@ toggle_segment_cleanup_func (segPtr, line)
*/
static void
-toggle_segment_line_change_func (segPtr, line)
- GtkTextLineSegment *segPtr; /* Segment to check. */
- GtkTextLine *line; /* Line that used to contain segment. */
+toggle_segment_line_change_func (GtkTextLineSegment *segPtr, GtkTextLine *line)
{
if (segPtr->body.toggle.inNodeCounts)
{