[cairo-commit] 5 commits - util/cairo-script

Bryce Harrington bryce at kemper.freedesktop.org
Thu Jun 18 12:57:30 PDT 2015


 util/cairo-script/cairo-script-file.c        |    2 
 util/cairo-script/cairo-script-hash.c        |    5 +
 util/cairo-script/cairo-script-interpreter.c |    3 -
 util/cairo-script/cairo-script-objects.c     |    2 
 util/cairo-script/cairo-script-operators.c   |    2 
 util/cairo-script/cairo-script-private.h     |    2 
 util/cairo-script/cairo-script-scanner.c     |   76 +++++++++++++--------------
 util/cairo-script/cairo-script-stack.c       |    2 
 util/cairo-script/csi-bind.c                 |   40 +++++++++++++-
 util/cairo-script/csi-exec.c                 |   40 +++++++++++++-
 util/cairo-script/csi-replay.c               |   40 +++++++++++++-
 util/cairo-script/csi-trace.c                |   40 +++++++++++++-
 12 files changed, 205 insertions(+), 49 deletions(-)

New commits:
commit b4a922f62d34973ea89495b40ce8bc6378110b9e
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Tue Jun 16 16:42:56 2015 -0700

    cairo-script: Rename struct member to avoid name collision on AIX
    
    On AIX, the token jmpbuf is a pre-processor macro.
    cairo-script-scanner.c includes a private struct with a member named
    jmpbuf which gets renamed to __jmpbuf when AIX's sys/context.h has been
    included.
    
    While judicious ordering of includes might kludge around this problem
    (by causing all references to .jmpbuf to become .__jmpbuf), it's better
    to simply select a new name for the struct member that won't suffer the
    collision.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89339
    
    Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-script/cairo-script-private.h b/util/cairo-script/cairo-script-private.h
index 6bf41b4..8d158d6 100644
--- a/util/cairo-script/cairo-script-private.h
+++ b/util/cairo-script/cairo-script-private.h
@@ -435,7 +435,7 @@ union _csi_union_object {
 };
 
 struct _csi_scanner {
-    jmp_buf jmpbuf;
+    jmp_buf jump_buffer;
     int depth;
 
     int bind;
diff --git a/util/cairo-script/cairo-script-scanner.c b/util/cairo-script/cairo-script-scanner.c
index 980c608..3dfb3a9 100644
--- a/util/cairo-script/cairo-script-scanner.c
+++ b/util/cairo-script/cairo-script-scanner.c
@@ -199,13 +199,13 @@ _buffer_grow (csi_t *ctx, csi_scanner_t *scan)
     char *base;
 
     if (_csi_unlikely (scan->buffer.size > INT_MAX / 2))
-	longjmp (scan->jmpbuf,  _csi_error (CSI_STATUS_NO_MEMORY));
+	longjmp (scan->jump_buffer,  _csi_error (CSI_STATUS_NO_MEMORY));
 
     offset = scan->buffer.ptr - scan->buffer.base;
     newsize = scan->buffer.size * 2;
     base = _csi_realloc (ctx, scan->buffer.base, newsize);
     if (_csi_unlikely (base == NULL))
-	longjmp (scan->jmpbuf,  _csi_error (CSI_STATUS_NO_MEMORY));
+	longjmp (scan->jump_buffer,  _csi_error (CSI_STATUS_NO_MEMORY));
 
     scan->buffer.base = base;
     scan->buffer.ptr  = base + offset;
@@ -441,12 +441,12 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src)
 					  &scan->procedure_stack,
 					  &scan->build_procedure);
 		if (_csi_unlikely (status))
-		    longjmp (scan->jmpbuf, status);
+		    longjmp (scan->jump_buffer, status);
 	    }
 
 	    status = csi_array_new (ctx, 0, &scan->build_procedure);
 	    if (_csi_unlikely (status))
-		longjmp (scan->jmpbuf, status);
+		longjmp (scan->jump_buffer, status);
 
 	    scan->build_procedure.type |= CSI_OBJECT_ATTR_EXECUTABLE;
 	    return;
@@ -454,7 +454,7 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src)
 	    if (_csi_unlikely
 		(scan->build_procedure.type == CSI_OBJECT_TYPE_NULL))
 	    {
-		longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+		longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 	    }
 
 	    if (scan->procedure_stack.len) {
@@ -470,7 +470,7 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src)
 		scan->build_procedure.type = CSI_OBJECT_TYPE_NULL;
 	    }
 	    if (_csi_unlikely (status))
-		longjmp (scan->jmpbuf, status);
+		longjmp (scan->jump_buffer, status);
 
 	    return;
 	}
@@ -480,19 +480,19 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src)
 	if (len >= 2 && s[1] == '/') { /* substituted name */
 	    status = csi_name_new (ctx, &obj, s + 2, len - 2);
 	    if (_csi_unlikely (status))
-		longjmp (scan->jmpbuf, status);
+		longjmp (scan->jump_buffer, status);
 
 	    status = _csi_name_lookup (ctx, obj.datum.name, &obj);
 	} else { /* literal name */
 	    status = csi_name_new (ctx, &obj, s + 1, len - 1);
 	}
 	if (_csi_unlikely (status))
-	    longjmp (scan->jmpbuf, status);
+	    longjmp (scan->jump_buffer, status);
     } else {
 	if (! _csi_parse_number (&obj, s, len)) {
 	    status = csi_name_new (ctx, &obj, s, len);
 	    if (_csi_unlikely (status))
-		longjmp (scan->jmpbuf, status);
+		longjmp (scan->jump_buffer, status);
 
 	    obj.type |= CSI_OBJECT_ATTR_EXECUTABLE;
 	}
@@ -510,7 +510,7 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src)
 	status = scan_push (ctx, &obj);
     }
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 }
 
 static void
@@ -531,7 +531,7 @@ string_end (csi_t *ctx, csi_scanner_t *scan)
 			     scan->buffer.base,
 			     scan->buffer.ptr - scan->buffer.base);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 
     if (scan->build_procedure.type != CSI_OBJECT_TYPE_NULL)
 	status = csi_array_append (ctx,
@@ -540,7 +540,7 @@ string_end (csi_t *ctx, csi_scanner_t *scan)
     else
 	status = scan_push (ctx, &obj);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 }
 
 static int
@@ -588,7 +588,7 @@ hex_end (csi_t *ctx, csi_scanner_t *scan)
 			     scan->buffer.base,
 			     scan->buffer.ptr - scan->buffer.base);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 
     if (scan->build_procedure.type != CSI_OBJECT_TYPE_NULL)
 	status = csi_array_append (ctx,
@@ -597,7 +597,7 @@ hex_end (csi_t *ctx, csi_scanner_t *scan)
     else
 	status = scan_push (ctx, &obj);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 }
 
 static void
@@ -605,7 +605,7 @@ base85_add (csi_t *ctx, csi_scanner_t *scan, int c)
 {
     if (c == 'z') {
 	if (_csi_unlikely (scan->accumulator_count != 0))
-	    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 	buffer_check (ctx, scan, 4);
 	buffer_add (&scan->buffer, 0);
@@ -613,7 +613,7 @@ base85_add (csi_t *ctx, csi_scanner_t *scan, int c)
 	buffer_add (&scan->buffer, 0);
 	buffer_add (&scan->buffer, 0);
     } else if (_csi_unlikely (c < '!' || c > 'u')) {
-	longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
     } else {
 	scan->accumulator = scan->accumulator*85 + c - '!';
 	if (++scan->accumulator_count == 5) {
@@ -641,7 +641,7 @@ base85_end (csi_t *ctx, csi_scanner_t *scan, cairo_bool_t deflate)
     case 0:
 	break;
     case 1:
-	longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 	break;
 
     case 2:
@@ -670,14 +670,14 @@ base85_end (csi_t *ctx, csi_scanner_t *scan, cairo_bool_t deflate)
 					 (Bytef *) scan->buffer.ptr - source,
 					 len);
 	if (_csi_unlikely (status))
-	    longjmp (scan->jmpbuf, status);
+	    longjmp (scan->jump_buffer, status);
     } else {
 	status = csi_string_new (ctx,
 				 &obj,
 				 scan->buffer.base,
 				 scan->buffer.ptr - scan->buffer.base);
 	if (_csi_unlikely (status))
-	    longjmp (scan->jmpbuf, status);
+	    longjmp (scan->jump_buffer, status);
     }
 
     if (scan->build_procedure.type != CSI_OBJECT_TYPE_NULL)
@@ -687,7 +687,7 @@ base85_end (csi_t *ctx, csi_scanner_t *scan, cairo_bool_t deflate)
     else
 	status = scan_push (ctx, &obj);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 }
 
 static void
@@ -764,7 +764,7 @@ base64_end (csi_t *ctx, csi_scanner_t *scan)
 			     scan->buffer.base,
 			     scan->buffer.ptr - scan->buffer.base);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 
     if (scan->build_procedure.type != CSI_OBJECT_TYPE_NULL)
 	status = csi_array_append (ctx,
@@ -773,7 +773,7 @@ base64_end (csi_t *ctx, csi_scanner_t *scan)
     else
 	status = scan_push (ctx, &obj);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 }
 
 static void
@@ -783,7 +783,7 @@ scan_read (csi_scanner_t *scan, csi_file_t *src, void *ptr, int len)
     do {
 	int ret = csi_file_read (src, data, len);
 	if (_csi_unlikely (ret == 0))
-	    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_READ_ERROR));
+	    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_READ_ERROR));
 	data += ret;
 	len -= ret;
     } while (_csi_unlikely (len));
@@ -801,7 +801,7 @@ string_read (csi_t *ctx,
 
     status = csi_string_new (ctx, obj, NULL, len);
     if (_csi_unlikely (status))
-	longjmp (scan->jmpbuf, status);
+	longjmp (scan->jump_buffer, status);
 
     if (compressed) {
 	uint32_t u32;
@@ -1015,7 +1015,7 @@ scan_none:
 	case 157:
 	case 158:
 	case 159:
-	    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 	case '#': /* PDF 1.2 escape code */
 	    {
@@ -1044,7 +1044,7 @@ scan_none:
 		status = scan_push (ctx, &obj);
 	    }
 	    if (_csi_unlikely (status))
-		longjmp (scan->jmpbuf, status);
+		longjmp (scan->jump_buffer, status);
 	}
     }
     return;
@@ -1135,7 +1135,7 @@ scan_string:
 	    next = csi_file_getc (src);
 	    switch (next) {
 	    case EOF:
-		longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+		longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 	    case 'n':
 		string_add (ctx, scan, '\n');
@@ -1229,7 +1229,7 @@ scan_string:
 	    break;
 	}
     }
-    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 scan_hex:
     buffer_reset (&scan->buffer);
@@ -1276,10 +1276,10 @@ scan_hex:
 	    break;
 
 	default:
-	    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 	}
     }
-    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 scan_base85:
     buffer_reset (&scan->buffer);
@@ -1306,7 +1306,7 @@ scan_base85:
 	    break;
 	}
     }
-    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 scan_base64:
     buffer_reset (&scan->buffer);
@@ -1324,14 +1324,14 @@ scan_base64:
 		base64_end (ctx, scan);
 		goto scan_none;
 	    }
-	    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 
 	default:
 	    base64_add (ctx, scan, c);
 	    break;
 	}
     }
-    longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_INVALID_SCRIPT));
+    longjmp (scan->jump_buffer, _csi_error (CSI_STATUS_INVALID_SCRIPT));
 }
 
 static csi_status_t
@@ -1396,7 +1396,7 @@ _csi_scan_file (csi_t *ctx, csi_file_t *src)
      */
 
     if (ctx->scanner.depth++ == 0) {
-	if ((status = setjmp (ctx->scanner.jmpbuf))) {
+	if ((status = setjmp (ctx->scanner.jump_buffer))) {
 	    ctx->scanner.depth = 0;
 	    return status;
 	}
@@ -1759,7 +1759,7 @@ _translate_push (csi_t *ctx, csi_object_t *obj)
     case CSI_OBJECT_TYPE_PATTERN:
     case CSI_OBJECT_TYPE_SCALED_FONT:
     case CSI_OBJECT_TYPE_SURFACE:
-	longjmp (ctx->scanner.jmpbuf,  _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	longjmp (ctx->scanner.jump_buffer,  _csi_error (CSI_STATUS_INVALID_SCRIPT));
 	break;
     }
 
@@ -1805,7 +1805,7 @@ _translate_execute (csi_t *ctx, csi_object_t *obj)
     case CSI_OBJECT_TYPE_PATTERN:
     case CSI_OBJECT_TYPE_SCALED_FONT:
     case CSI_OBJECT_TYPE_SURFACE:
-	longjmp (ctx->scanner.jmpbuf,  _csi_error (CSI_STATUS_INVALID_SCRIPT));
+	longjmp (ctx->scanner.jump_buffer,  _csi_error (CSI_STATUS_INVALID_SCRIPT));
 	break;
     }
 
@@ -1877,7 +1877,7 @@ _csi_translate_file (csi_t *ctx,
     csi_status_t status;
     struct _translate_closure translator;
 
-    if ((status = setjmp (ctx->scanner.jmpbuf)))
+    if ((status = setjmp (ctx->scanner.jump_buffer)))
 	return status;
 
     status = build_opcodes (ctx, &translator.opcodes);
commit 714a77e3f1c818bb5eec8c654c576d862ef6684c
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Tue Jun 16 15:18:23 2015 -0700

    cairo-script: Prefer cairo from local tree
    
    Use quoted includes rather than bracketed, to prefer linking to the
    in-tree cairo in preference to the system cairo.
    
    Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-script/cairo-script-interpreter.c b/util/cairo-script/cairo-script-interpreter.c
index f94e39a..dfce8a1 100644
--- a/util/cairo-script/cairo-script-interpreter.c
+++ b/util/cairo-script/cairo-script-interpreter.c
@@ -34,9 +34,8 @@
 
 #include "config.h"
 
-#include <cairo.h>
-
 #include "cairo-script-private.h"
+#include "cairo.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/util/cairo-script/csi-bind.c b/util/cairo-script/csi-bind.c
index e7c89a3..b2a6d69 100644
--- a/util/cairo-script/csi-bind.c
+++ b/util/cairo-script/csi-bind.c
@@ -34,8 +34,8 @@
 
 #include "config.h"
 
-#include <cairo.h>
-#include <cairo-script-interpreter.h>
+#include "cairo.h"
+#include "cairo-script-interpreter.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/util/cairo-script/csi-exec.c b/util/cairo-script/csi-exec.c
index 5a7d811..175328c 100644
--- a/util/cairo-script/csi-exec.c
+++ b/util/cairo-script/csi-exec.c
@@ -34,8 +34,8 @@
 
 #include "config.h"
 
-#include <cairo.h>
-#include <cairo-script-interpreter.h>
+#include "cairo.h"
+#include "cairo-script-interpreter.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index b6f56d0..4c66b77 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -34,8 +34,8 @@
 
 #include "config.h"
 
-#include <cairo.h>
-#include <cairo-script-interpreter.h>
+#include "cairo.h"
+#include "cairo-script-interpreter.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/util/cairo-script/csi-trace.c b/util/cairo-script/csi-trace.c
index 3a1428e..52eeade 100644
--- a/util/cairo-script/csi-trace.c
+++ b/util/cairo-script/csi-trace.c
@@ -34,8 +34,8 @@
 
 #include "config.h"
 
-#include <cairo-script.h>
-#include <cairo-script-interpreter.h>
+#include "cairo-script.h"
+#include "cairo-script-interpreter.h"
 
 #include <stdio.h>
 #include <stdlib.h>
commit 3ed581149f82b653e1987e746467ad8ae9ce3ca2
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Tue Jun 16 15:13:31 2015 -0700

    cairo-script: Cleanup boilerplate header for consistency
    
    Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-script/cairo-script-hash.c b/util/cairo-script/cairo-script-hash.c
index 69af575..58786fc 100644
--- a/util/cairo-script/cairo-script-hash.c
+++ b/util/cairo-script/cairo-script-hash.c
@@ -1,5 +1,4 @@
-/* cairo - a vector graphics library with display and print output
- *
+/* 
  * Copyright © 2004 Red Hat, Inc.
  * Copyright © 2005 Red Hat, Inc.
  *
commit d31e2418d6d9920205a154f21becca12a7b84c2a
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Tue Jun 16 15:06:59 2015 -0700

    cairo-script: Add missing copyright and boilerplate
    
    Chris wrote all of the cairo script stuff.  I'm making a guess about the
    copyright date.
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
    Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/util/cairo-script/csi-bind.c b/util/cairo-script/csi-bind.c
index 11f666a..e7c89a3 100644
--- a/util/cairo-script/csi-bind.c
+++ b/util/cairo-script/csi-bind.c
@@ -1,3 +1,36 @@
+/*
+ * Copyright © 2008 Chris Wilson <chris at chris-wilson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Chris Wilson.
+ *
+ * Contributor(s):
+ *      Chris Wilson <chris at chris-wilson.co.uk>
+ */
 
 #include "config.h"
 
diff --git a/util/cairo-script/csi-exec.c b/util/cairo-script/csi-exec.c
index 5648a95..5a7d811 100644
--- a/util/cairo-script/csi-exec.c
+++ b/util/cairo-script/csi-exec.c
@@ -1,3 +1,36 @@
+/*
+ * Copyright © 2008 Chris Wilson <chris at chris-wilson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Chris Wilson.
+ *
+ * Contributor(s):
+ *      Chris Wilson <chris at chris-wilson.co.uk>
+ */
 
 #include "config.h"
 
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index 1309985..b6f56d0 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -1,3 +1,36 @@
+/*
+ * Copyright © 2008 Chris Wilson <chris at chris-wilson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Chris Wilson.
+ *
+ * Contributor(s):
+ *      Chris Wilson <chris at chris-wilson.co.uk>
+ */
 
 #include "config.h"
 
diff --git a/util/cairo-script/csi-trace.c b/util/cairo-script/csi-trace.c
index bed7236..3a1428e 100644
--- a/util/cairo-script/csi-trace.c
+++ b/util/cairo-script/csi-trace.c
@@ -1,3 +1,36 @@
+/*
+ * Copyright © 2008 Chris Wilson <chris at chris-wilson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Chris Wilson.
+ *
+ * Contributor(s):
+ *      Chris Wilson <chris at chris-wilson.co.uk>
+ */
 
 #include "config.h"
 
commit a3b6afabf670076e093850606d89e142ddf6ea09
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Tue Jun 16 15:05:54 2015 -0700

    cairo-script: Always include config.h first thing
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
    Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/util/cairo-script/cairo-script-file.c b/util/cairo-script/cairo-script-file.c
index 0274a3e..e7c5376 100644
--- a/util/cairo-script/cairo-script-file.c
+++ b/util/cairo-script/cairo-script-file.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 #include "cairo-script-private.h"
 
 #include <stdio.h>
diff --git a/util/cairo-script/cairo-script-hash.c b/util/cairo-script/cairo-script-hash.c
index 4d11103..69af575 100644
--- a/util/cairo-script/cairo-script-hash.c
+++ b/util/cairo-script/cairo-script-hash.c
@@ -37,6 +37,8 @@
  *	Karl Tomlinson <karlt+ at karlt.net>, Mozilla Corporation
  */
 
+#include "config.h"
+
 #include "cairo-script-private.h"
 
 #include <stdlib.h>
diff --git a/util/cairo-script/cairo-script-interpreter.c b/util/cairo-script/cairo-script-interpreter.c
index 50170fc..f94e39a 100644
--- a/util/cairo-script/cairo-script-interpreter.c
+++ b/util/cairo-script/cairo-script-interpreter.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 #include <cairo.h>
 
 #include "cairo-script-private.h"
diff --git a/util/cairo-script/cairo-script-objects.c b/util/cairo-script/cairo-script-objects.c
index a625489..2d7937b 100644
--- a/util/cairo-script/cairo-script-objects.c
+++ b/util/cairo-script/cairo-script-objects.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 #include "cairo-script-private.h"
 
 #include <limits.h> /* INT_MAX */
diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index 0d6cafc..aa38823 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 /* TODO real path type */
 
 #include "cairo-script-private.h"
diff --git a/util/cairo-script/cairo-script-scanner.c b/util/cairo-script/cairo-script-scanner.c
index 84b45df..980c608 100644
--- a/util/cairo-script/cairo-script-scanner.c
+++ b/util/cairo-script/cairo-script-scanner.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 #include "cairo-script-private.h"
 
 #include <limits.h> /* INT_MAX */
diff --git a/util/cairo-script/cairo-script-stack.c b/util/cairo-script/cairo-script-stack.c
index b1d146c..ff1e91a 100644
--- a/util/cairo-script/cairo-script-stack.c
+++ b/util/cairo-script/cairo-script-stack.c
@@ -32,6 +32,8 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
+#include "config.h"
+
 #include "cairo-script-private.h"
 
 #include <limits.h> /* INT_MAX */
diff --git a/util/cairo-script/csi-bind.c b/util/cairo-script/csi-bind.c
index 91b58fb..11f666a 100644
--- a/util/cairo-script/csi-bind.c
+++ b/util/cairo-script/csi-bind.c
@@ -1,3 +1,6 @@
+
+#include "config.h"
+
 #include <cairo.h>
 #include <cairo-script-interpreter.h>
 
diff --git a/util/cairo-script/csi-exec.c b/util/cairo-script/csi-exec.c
index d30b1c9..5648a95 100644
--- a/util/cairo-script/csi-exec.c
+++ b/util/cairo-script/csi-exec.c
@@ -1,3 +1,6 @@
+
+#include "config.h"
+
 #include <cairo.h>
 #include <cairo-script-interpreter.h>
 
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index 67fed3b..1309985 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -1,3 +1,6 @@
+
+#include "config.h"
+
 #include <cairo.h>
 #include <cairo-script-interpreter.h>
 
diff --git a/util/cairo-script/csi-trace.c b/util/cairo-script/csi-trace.c
index a0466a3..bed7236 100644
--- a/util/cairo-script/csi-trace.c
+++ b/util/cairo-script/csi-trace.c
@@ -1,3 +1,6 @@
+
+#include "config.h"
+
 #include <cairo-script.h>
 #include <cairo-script-interpreter.h>
 


More information about the cairo-commit mailing list