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/win32 | |
parent | c0fc24c889b09b734383c9250a3663d83510479e (diff) |
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/win32')
-rw-r--r-- | src/win32/cairo-win32-display-surface.c | 4 | ||||
-rw-r--r-- | src/win32/cairo-win32-font.c | 4 | ||||
-rw-r--r-- | src/win32/cairo-win32-surface.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c index a44b878d..f393cbe8 100644 --- a/src/win32/cairo-win32-display-surface.c +++ b/src/win32/cairo-win32-display-surface.c @@ -86,14 +86,14 @@ * * The surface returned by the other win32 constructors is of surface type * %CAIRO_SURFACE_TYPE_WIN32 and is a raster surface type. - */ + **/ /** * CAIRO_HAS_WIN32_SURFACE: * * Defined if the Microsoft Windows surface backend is available. * This macro can be used to conditionally compile backend-specific code. - */ + **/ static const cairo_surface_backend_t cairo_win32_display_surface_backend; diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c index d85d5c94..8ad4832a 100644 --- a/src/win32/cairo-win32-font.c +++ b/src/win32/cairo-win32-font.c @@ -77,14 +77,14 @@ * * The Microsoft Windows font backend is primarily used to render text on * Microsoft Windows systems. - */ + **/ /** * CAIRO_HAS_WIN32_FONT: * * Defined if the Microsoft Windows font backend is available. * This macro can be used to conditionally compile backend-specific code. - */ + **/ const cairo_scaled_font_backend_t _cairo_win32_scaled_font_backend; diff --git a/src/win32/cairo-win32-surface.c b/src/win32/cairo-win32-surface.c index cec47a24..0dcbbf8a 100644 --- a/src/win32/cairo-win32-surface.c +++ b/src/win32/cairo-win32-surface.c @@ -80,14 +80,14 @@ * * The surface returned by the other win32 constructors is of surface type * %CAIRO_SURFACE_TYPE_WIN32 and is a raster surface type. - */ + **/ /** * CAIRO_HAS_WIN32_SURFACE: * * Defined if the Microsoft Windows surface backend is available. * This macro can be used to conditionally compile backend-specific code. - */ + **/ /** * _cairo_win32_print_gdi_error: @@ -181,7 +181,7 @@ cairo_win32_surface_get_dc (cairo_surface_t *surface) * or %NULL if the win32 surface is not a DIB. * * Since: 1.4 - */ + **/ cairo_surface_t * cairo_win32_surface_get_image (cairo_surface_t *surface) { |