From b790c5a6bcdd890c16d21753407188ed200ce445 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 28 Jan 2008 21:53:44 -0500 Subject: [PATCH] [doc] Replace 'NOTE' by 'Note' and add it to test --- src/cairo-bentley-ottmann.c | 2 +- src/cairo-cache.c | 4 ++-- src/cairo-ft-font.c | 4 ++-- src/cairo-lzw.c | 4 ++-- src/cairo-output-stream-private.h | 2 +- src/cairo-paginated-private.h | 4 ++-- src/cairo-path.c | 2 +- src/cairo-pen.c | 4 ++-- src/cairo-scaled-font.c | 4 ++-- src/cairo-slope.c | 2 +- src/cairo-surface.c | 4 ++-- src/cairo-win32-surface.c | 4 ++-- src/cairo-xcb-surface.c | 4 ++-- src/cairo-xlib-surface.c | 4 ++-- src/cairo.c | 4 ++-- src/check-doc-syntax.sh | 7 +++++++ 16 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/cairo-bentley-ottmann.c b/src/cairo-bentley-ottmann.c index 6a591a780..1da974392 100644 --- a/src/cairo-bentley-ottmann.c +++ b/src/cairo-bentley-ottmann.c @@ -385,7 +385,7 @@ cairo_bo_event_compare (cairo_bo_event_t const *a, * need a different sense for start and stop events based on the * shortening rule. * - * NOTE: Fortunately, we get to ignore errors in the relative + * Note: Fortunately, we get to ignore errors in the relative * ordering of intersection events. This means we don't even have * to look at e2 here, nor worry about which sense of the slope * comparison test is used for intersection events. diff --git a/src/cairo-cache.c b/src/cairo-cache.c index b0d5bb069..c87e20f56 100644 --- a/src/cairo-cache.c +++ b/src/cairo-cache.c @@ -172,7 +172,7 @@ _cairo_cache_destroy (cairo_cache_t *cache) * add new entries to the cache regardless of how large the cache * grows. See _cairo_cache_thaw(). * - * NOTE: Multiple calls to _cairo_cache_freeze() will stack, in that + * Note: Multiple calls to _cairo_cache_freeze() will stack, in that * the cache will remain "frozen" until a corresponding number of * calls are made to _cairo_cache_thaw(). **/ @@ -323,7 +323,7 @@ _cairo_cache_insert (cairo_cache_t *cache, * * Remove an existing entry from the cache. * - * (NOTE: If any caller wanted access to a non-static version of this + * (Note: If any caller wanted access to a non-static version of this * function, an improved version would require only a key rather than * an entry. Fixing that would require fixing _cairo_hash_table_remove * to return (a copy of?) the entry being removed.) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index bcb41b29e..2fce865bd 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -2606,7 +2606,7 @@ cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *abstract_font) return NULL; } - /* NOTE: We deliberately release the unscaled font's mutex here, + /* Note: We deliberately release the unscaled font's mutex here, * so that we are not holding a lock across two separate calls to * cairo function, (which would give the application some * opportunity for creating deadlock. This is obviously unsafe, @@ -2634,7 +2634,7 @@ cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *abstract_font) if (scaled_font->base.status) return; - /* NOTE: We released the unscaled font's mutex at the end of + /* Note: We released the unscaled font's mutex at the end of * cairo_ft_scaled_font_lock_face, so we have to acquire it again * as _cairo_ft_unscaled_font_unlock_face expects it to be held * when we call into it. */ diff --git a/src/cairo-lzw.c b/src/cairo-lzw.c index fcf90be6f..d95da8c9a 100644 --- a/src/cairo-lzw.c +++ b/src/cairo-lzw.c @@ -113,7 +113,7 @@ _lzw_buf_grow (lzw_buf_t *buf) /* Store the lowest num_bits bits of values into buf. * - * NOTE: The bits of value above size_in_bits must be 0, (so don't lie + * Note: The bits of value above size_in_bits must be 0, (so don't lie * about the size). * * See also _lzw_buf_store_pending which must be called after the last @@ -147,7 +147,7 @@ _lzw_buf_store_bits (lzw_buf_t *buf, uint16_t value, int num_bits) /* Store the last remaining pending bits into the buffer. * - * NOTE: This function must be called after the last call to + * Note: This function must be called after the last call to * _lzw_buf_store_bits. * * Sets buf->status to either %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY. diff --git a/src/cairo-output-stream-private.h b/src/cairo-output-stream-private.h index 1fc9b8ef3..2ee43de7b 100644 --- a/src/cairo-output-stream-private.h +++ b/src/cairo-output-stream-private.h @@ -131,7 +131,7 @@ _cairo_output_stream_get_status (cairo_output_stream_t *stream); * WRITE_ERROR) while trying to create the output stream this function * returns a valid pointer to a nil output stream. * - * NOTE: Even if a nil surface is returned, the caller should still + * Note: Even if a nil surface is returned, the caller should still * call _cairo_output_stream_destroy (or _cairo_output_stream_close at * least) in order to ensure that everything is properly cleaned up. */ diff --git a/src/cairo-paginated-private.h b/src/cairo-paginated-private.h index 4b10601e5..ab2ee1df8 100644 --- a/src/cairo-paginated-private.h +++ b/src/cairo-paginated-private.h @@ -41,7 +41,7 @@ struct _cairo_paginated_surface_backend { /* Optional. Will be called once for each page. * - * NOTE: With respect to the order of drawing operations as seen + * Note: With respect to the order of drawing operations as seen * by the target, this call will occur before any drawing * operations for the relevant page. However, with respect to the * function calls as made by the user, this call will be *after* @@ -127,7 +127,7 @@ struct _cairo_paginated_surface_backend { * to distinguish fallback images from native rendering in case they * need to be handled as a special case. * - * NOTE: The paginated surface layer assumes that the target surface + * Note: The paginated surface layer assumes that the target surface * is "blank" by default at the beginning of each page, without any * need for an explicit erase operation, (as opposed to an image * surface, for example, which might have uninitialized content diff --git a/src/cairo-path.c b/src/cairo-path.c index e0b21ef70..c6639f3f4 100644 --- a/src/cairo-path.c +++ b/src/cairo-path.c @@ -363,7 +363,7 @@ _cairo_path_create_internal (cairo_path_fixed_t *path_fixed, * to cairo_path_destroy() the @path pointer is no longer valid and * should not be used further. * - * NOTE: cairo_path_destroy() should only be called with a + * Note: cairo_path_destroy() should only be called with a * pointer to a #cairo_path_t returned by a cairo function. Any path * that is created manually (ie. outside of cairo) should be destroyed * manually as well. diff --git a/src/cairo-pen.c b/src/cairo-pen.c index 629176317..cde129c5e 100644 --- a/src/cairo-pen.c +++ b/src/cairo-pen.c @@ -302,7 +302,7 @@ _cairo_pen_compute_slopes (cairo_pen_t *pen) /* * Find active pen vertex for clockwise edge of stroke at the given slope. * - * NOTE: The behavior of this function is sensitive to the sense of + * Note: The behavior of this function is sensitive to the sense of * the inequality within _cairo_slope_clockwise/_cairo_slope_counter_clockwise. * * The issue is that the slope_ccw member of one pen vertex will be @@ -336,7 +336,7 @@ _cairo_pen_find_active_cw_vertex_index (cairo_pen_t *pen, /* Find active pen vertex for counterclockwise edge of stroke at the given slope. * - * NOTE: The behavior of this function is sensitive to the sense of + * Note: The behavior of this function is sensitive to the sense of * the inequality within _cairo_slope_clockwise/_cairo_slope_counter_clockwise. */ void diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index ed01b1fe2..469b4dc8c 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -41,7 +41,7 @@ #include "cairo-scaled-font-private.h" /* - * NOTES: + * Notes: * * To store rasterizations of glyphs, we use an image surface and the * device offset to represent the glyph origin. @@ -1714,7 +1714,7 @@ _cairo_scaled_glyph_set_path (cairo_scaled_glyph_t *scaled_glyph, * get INFO_PATH with a bitmapped font), this function will return * CAIRO_INT_STATUS_UNSUPPORTED. * - * NOTE: This function must be called with scaled_font->mutex held. + * Note: This function must be called with scaled_font->mutex held. **/ cairo_int_status_t _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font, diff --git a/src/cairo-slope.c b/src/cairo-slope.c index 78664c538..e8421fc35 100644 --- a/src/cairo-slope.c +++ b/src/cairo-slope.c @@ -88,7 +88,7 @@ _cairo_slope_compare (cairo_slope_t *a, cairo_slope_t *b) /* Is a clockwise of b? * - * NOTE: The strict equality here is not significant in and of itself, + * Note: The strict equality here is not significant in and of itself, * but there are functions up above that are sensitive to it, * (cf. _cairo_pen_find_active_cw_vertex_index). */ diff --git a/src/cairo-surface.c b/src/cairo-surface.c index 074be10e0..16c48f184 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -882,7 +882,7 @@ slim_hidden_def (cairo_surface_get_device_offset); * device resolution. So this function has no effect on those * backends. * - * NOTE: The fallback resolution only takes effect at the time of + * Note: The fallback resolution only takes effect at the time of * completing a page (with cairo_show_page() or cairo_copy_page()) so * there is currently no way to have more than one fallback resolution * in effect on a single page. @@ -2005,7 +2005,7 @@ _cairo_surface_set_clip (cairo_surface_t *surface, cairo_clip_t *clip) * maximum size at the time of surface_create. So get_extents uses * that size. * - * NOTE: The coordinates returned are in "backend" space rather than + * Note: The coordinates returned are in "backend" space rather than * "surface" space. That is, they are relative to the true (0,0) * origin rather than the device_transform origin. This might seem a * bit inconsistent with other #cairo_surface_t interfaces, but all diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c index b222ef459..ca8b87c38 100644 --- a/src/cairo-win32-surface.c +++ b/src/cairo-win32-surface.c @@ -205,7 +205,7 @@ _create_dc_and_bitmap (cairo_win32_surface_t *surface, * break if we do, especially if we don't set up an image * fallback. It could be a bug with using a 24bpp pixman image * (and creating one with masks). So treat them like 32bpp. - * NOTE: This causes problems when using BitBlt/AlphaBlend/etc! + * Note: This causes problems when using BitBlt/AlphaBlend/etc! * see end of file. */ case CAIRO_FORMAT_RGB24: @@ -1261,7 +1261,7 @@ UNSUPPORTED: /* This big function tells us how to optimize operators for the * case of solid destination and constant-alpha source * - * NOTE: This function needs revisiting if we add support for + * Note: This function needs revisiting if we add support for * super-luminescent colors (a == 0, r,g,b > 0) */ static enum { DO_CLEAR, DO_SOURCE, DO_NOTHING, DO_UNSUPPORTED } diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index 39ca0de1f..f7ae9d1c7 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -1854,7 +1854,7 @@ _cairo_xcb_screen_from_visual (xcb_connection_t *c, xcb_visualtype_t *visual) * The way that colors are represented in the drawable is specified * by the provided visual. * - * NOTE: If @drawable is a window, then the function + * Note: If @drawable is a window, then the function * cairo_xcb_surface_set_size must be called whenever the size of the * window changes. * @@ -1916,7 +1916,7 @@ cairo_xcb_surface_create_for_bitmap (xcb_connection_t *c, * The way that colors are represented in the drawable is specified * by the provided picture format. * - * NOTE: If @drawable is a Window, then the function + * Note: If @drawable is a Window, then the function * cairo_xcb_surface_set_size must be called whenever the size of the * window changes. * diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index d43b5a858..0957faf55 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -2070,7 +2070,7 @@ _cairo_xlib_screen_from_visual (Display *dpy, Visual *visual) * The way that colors are represented in the drawable is specified * by the provided visual. * - * NOTE: If @drawable is a Window, then the function + * Note: If @drawable is a Window, then the function * cairo_xlib_surface_set_size must be called whenever the size of the * window changes. * @@ -2140,7 +2140,7 @@ cairo_xlib_surface_create_for_bitmap (Display *dpy, * The way that colors are represented in the drawable is specified * by the provided picture format. * - * NOTE: If @drawable is a Window, then the function + * Note: If @drawable is a Window, then the function * cairo_xlib_surface_set_size must be called whenever the size of the * window changes. * diff --git a/src/cairo.c b/src/cairo.c index 864177d5c..7d429f240 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -2959,7 +2959,7 @@ cairo_glyph_extents (cairo_t *cr, * by its advance values. This allows for easy display of a single * logical string with multiple calls to cairo_show_text(). * - * NOTE: The cairo_show_text() function call is part of what the cairo + * Note: The cairo_show_text() function call is part of what the cairo * designers call the "toy" text API. It is convenient for short demos * and simple programs, but it is not expected to be adequate for * serious text-using applications. See cairo_show_glyphs() for the @@ -3058,7 +3058,7 @@ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs) * This allows for chaining multiple calls to to cairo_text_path() * without having to set current point in between. * - * NOTE: The cairo_text_path() function call is part of what the cairo + * Note: The cairo_text_path() function call is part of what the cairo * designers call the "toy" text API. It is convenient for short demos * and simple programs, but it is not expected to be adequate for * serious text-using applications. See cairo_glyph_path() for the diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh index 17e606b94..a7e8d5a3e 100755 --- a/src/check-doc-syntax.sh +++ b/src/check-doc-syntax.sh @@ -33,4 +33,11 @@ if grep "$func_regexp" $FILES; then echo " '$func_regexp'" fi +note_regexp='NOTE' +if grep "$note_regexp" $FILES; then + status=1 + echo Error: some source files contain the string 'NOTE'. + echo Be civil and replace it by 'Note' please. +fi + exit $status