diff options
author | Andrea Canciani <ranma42@gmail.com> | 2012-02-16 00:31:47 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2012-03-29 11:03:18 +0200 |
commit | f717341ab9fec1f4a72fe18f5e712272c831d978 (patch) | |
tree | aaa6335d44b56e63f3c046c28d96092560a69502 /src/cairo-misc.c | |
parent | c0fc24c889b09b734383c9250a3663d83510479e (diff) | |
download | cairo-f717341ab9fec1f4a72fe18f5e712272c831d978.tar.gz |
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.
Diffstat (limited to 'src/cairo-misc.c')
-rw-r--r-- | src/cairo-misc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cairo-misc.c b/src/cairo-misc.c index 27c264b56..60edaae93 100644 --- a/src/cairo-misc.c +++ b/src/cairo-misc.c @@ -62,7 +62,7 @@ COMPILE_TIME_ASSERT (CAIRO_INT_STATUS_LAST_STATUS <= 127); * the mean time, it is safe to call all cairo functions normally even if the * underlying object is in an error status. This means that no error handling * code is required before or after each individual cairo function call. - */ + **/ /* Public stuff */ @@ -73,7 +73,7 @@ COMPILE_TIME_ASSERT (CAIRO_INT_STATUS_LAST_STATUS <= 127); * Provides a human-readable description of a #cairo_status_t. * * Returns: a string representation of the status - */ + **/ const char * cairo_status_to_string (cairo_status_t status) { @@ -180,7 +180,7 @@ cairo_status_to_string (cairo_status_t status) * freed using cairo_glyph_free() * * Since: 1.8 - */ + **/ cairo_glyph_t * cairo_glyph_allocate (int num_glyphs) { @@ -203,7 +203,7 @@ slim_hidden_def (cairo_glyph_allocate); * for glyphs. * * Since: 1.8 - */ + **/ void cairo_glyph_free (cairo_glyph_t *glyphs) { @@ -230,7 +230,7 @@ slim_hidden_def (cairo_glyph_free); * freed using cairo_text_cluster_free() * * Since: 1.8 - */ + **/ cairo_text_cluster_t * cairo_text_cluster_allocate (int num_clusters) { @@ -253,7 +253,7 @@ slim_hidden_def (cairo_text_cluster_allocate); * for text clusters. * * Since: 1.8 - */ + **/ void cairo_text_cluster_free (cairo_text_cluster_t *clusters) { @@ -281,7 +281,7 @@ slim_hidden_def (cairo_text_cluster_free); * %CAIRO_STATUS_INVALID_CLUSTERS on error. * The error is either invalid UTF-8 input, * or bad cluster mapping. - */ + **/ cairo_status_t _cairo_validate_text_clusters (const char *utf8, int utf8_len, |