Commit graph

13 commits

Author SHA1 Message Date
Andrea Canciani
f717341ab9 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.
2012-03-29 11:03:18 +02:00
Behdad Esfahbod
81c848c839 More typo fixes 2012-03-25 15:02:36 -04:00
Behdad Esfahbod
73cde7a0f6 Fix typos 2012-03-25 15:00:44 -04:00
Andrea Canciani
01729606fb malloc: Fix build on suncc
cairo-malloc-private.h depends on malloc() and realloc() being
declared, hence it should include stdlib.h.
2011-09-04 16:23:37 -07:00
Metal Sonic
30d358e098 Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation"
From https://bugzilla.mozilla.org/show_bug.cgi?id=507387
2010-05-06 16:07:43 -04:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Chris Wilson
791a6fa399 [memfault] Update macros to avoid namescape collision with memcheck
Basing the macro names of the memfault skin lead to a namespace
collision with memcheck. After updating the headers, update cairo's usage
to match.
2009-05-15 21:31:03 +01:00
Chris Wilson
1ae2ddc1dd [memfault] Manually inject faults when using stack allocations
Ensure that no assumptions are made that a small allocation will succeed
by manually injecting faults when we may be simply allocating from an
embedded memory pool.

The main advantage in manual fault injection is improved code coverage -
from within the test suite most allocations are handled by the embedded
memory pools.
2009-04-23 09:22:51 +01:00
Chris Wilson
e49bcde27f [malloc] Check for integer overflow when realloc'ing.
Perform similar sanity checks to Vlad's _cairo_malloc_ab() but on the
arguments to realloc instead.
2007-10-04 00:42:29 +01:00
Vladimir Vukicevic
6020f67f1a Avoid divide-by-zero when trying to allocate a 0-sized array
Fix up the _cairo_malloc_* wrappers to avoid blindly dividing by zero;
any attempt to allocate a zero-sized chunk of memory will result in
NULL.
2007-09-21 11:02:42 -07:00
Carl Worth
177a3b8a32 Remove include of cairoint.h from *-private.h header files.
These were recently added, (as part of sparse integration?), but they
break boilerplate which reaches into at least cairo-types-private.h
and cairo-scaled-font-private.h. But boilerplate cannot see cairoint.h
or else it gets the internal sybol renaming, (with the INT_ prefix),
and then all the test suite tests refuse to link.

If this change reverts some recently-added functionality, (or
cleanliness), then we'll just need to find some other way to add that
back again without the breakage.
2007-08-23 16:13:04 -07:00
Behdad Esfahbod
735757a17a [Makefile.am] Add target sparse to run sparse static source code analyzer
There are still some bits not quite working.
2007-08-22 02:58:37 -04:00
Vladimir Vukicevic
5c7d2d14d7 [fix] Avoid int overflow when allocating large buffers
This patch introduces three macros: _cairo_malloc_ab,
_cairo_malloc_abc, _cairo_malloc_ab_plus_c and replaces various calls
to malloc(a*b), malloc(a*b*c), and malloc(a*b+c) with them.  The macros
return NULL if int overflow would occur during the allocation.  See
CODING_STYLE for more information.
2007-06-29 09:46:08 -07:00