From f717341ab9fec1f4a72fe18f5e712272c831d978 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Thu, 16 Feb 2012 00:31:47 +0100 Subject: doc: Make documentation comments symmetric Documentation comments should always start with "/**" and end with "**/". This is not required by gtk-doc, but it makes the documentations formatting more consistent and simplifies the checking of documentation comments. The following Python script tries to enforce this. from sys import argv from sre import search for filename in argv[1:]: in_doc = False lines = open(filename, "r").read().split("\n") for i in range(len(lines)): ls = lines[i].strip() if ls == "/**": in_doc = True elif in_doc and ls == "*/": lines[i] = " **/" if ls.endswith("*/"): in_doc = False out = open(filename, "w") out.write("\n".join(lines)) out.close() This fixes most 'documentation comment not closed with **/' warnings by check-doc-syntax.awk. --- src/cairo-path-stroke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cairo-path-stroke.c') diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c index f25cfe4f4..2d32b914e 100644 --- a/src/cairo-path-stroke.c +++ b/src/cairo-path-stroke.c @@ -184,7 +184,7 @@ _cairo_stroker_join_is_clockwise (const cairo_stroke_face_t *in, * * Return -1, 0 or 1 depending on the relative slopes of * two lines. - */ + **/ static int _cairo_slope_compare_sgn (double dx1, double dy1, double dx2, double dy2) { -- cgit v1.2.1