diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2010-04-22 14:23:06 +0000 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2010-04-22 14:23:06 +0000 |
commit | 0c024b93d3f90e1b5f64c9bb41326337799b3adb (patch) | |
tree | 9fc212661beeefd6c29e485a130a04a439af4c7b | |
parent | 3ca991a63a1e63a5f8e3d601945e88a2d8c9b192 (diff) | |
download | ghostpdl-0c024b93d3f90e1b5f64c9bb41326337799b3adb.tar.gz |
Conform to coding style: function return values should be on a separate line.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11106 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | xps/xpshash.c | 24 | ||||
-rw-r--r-- | xps/xpsjpeg.c | 6 | ||||
-rw-r--r-- | xps/xpspage.c | 3 | ||||
-rw-r--r-- | xps/xpspng.c | 12 | ||||
-rw-r--r-- | xps/xpsutf.c | 3 | ||||
-rw-r--r-- | xps/xpsxml.c | 15 |
6 files changed, 42 insertions, 21 deletions
diff --git a/xps/xpshash.c b/xps/xpshash.c index 3c4df8077..0c996da11 100644 --- a/xps/xpshash.c +++ b/xps/xpshash.c @@ -42,14 +42,16 @@ struct xps_hash_table_s xps_hash_entry_t *entries; }; -static inline int xps_tolower(int c) +static inline int +xps_tolower(int c) { if (c >= 'A' && c <= 'Z') return c + 32; return c; } -static unsigned int xps_hash(char *s) +static unsigned int +xps_hash(char *s) { unsigned int h = 0; while (*s) @@ -57,7 +59,8 @@ static unsigned int xps_hash(char *s) return h; } -xps_hash_table_t *xps_hash_new(xps_context_t *ctx) +xps_hash_table_t * +xps_hash_new(xps_context_t *ctx) { xps_hash_table_t *table; @@ -84,7 +87,8 @@ xps_hash_table_t *xps_hash_new(xps_context_t *ctx) return table; } -static int xps_hash_double(xps_context_t *ctx, xps_hash_table_t *table) +static int +xps_hash_double(xps_context_t *ctx, xps_hash_table_t *table) { xps_hash_entry_t *old_entries; xps_hash_entry_t *new_entries; @@ -121,13 +125,15 @@ static int xps_hash_double(xps_context_t *ctx, xps_hash_table_t *table) return 0; } -void xps_hash_free(xps_context_t *ctx, xps_hash_table_t *table) +void +xps_hash_free(xps_context_t *ctx, xps_hash_table_t *table) { xps_free(ctx, table->entries); xps_free(ctx, table); } -void *xps_hash_lookup(xps_hash_table_t *table, char *key) +void * +xps_hash_lookup(xps_hash_table_t *table, char *key) { xps_hash_entry_t *entries = table->entries; unsigned int size = table->size; @@ -145,7 +151,8 @@ void *xps_hash_lookup(xps_hash_table_t *table, char *key) } } -int xps_hash_insert(xps_context_t *ctx, xps_hash_table_t *table, char *key, void *value) +int +xps_hash_insert(xps_context_t *ctx, xps_hash_table_t *table, char *key, void *value) { xps_hash_entry_t *entries; unsigned int size, pos; @@ -180,7 +187,8 @@ int xps_hash_insert(xps_context_t *ctx, xps_hash_table_t *table, char *key, void } } -void xps_hash_debug(xps_hash_table_t *table) +void +xps_hash_debug(xps_hash_table_t *table) { int i; diff --git a/xps/xpsjpeg.c b/xps/xpsjpeg.c index 7cc940c41..e86f037d8 100644 --- a/xps/xpsjpeg.c +++ b/xps/xpsjpeg.c @@ -22,13 +22,15 @@ #include "sdct.h" #include "sjpeg.h" -static int xps_report_error(stream_state * st, const char *str) +static int +xps_report_error(stream_state * st, const char *str) { (void) gs_throw1(-1, "%s", str); return 0; } -int xps_decode_jpeg(gs_memory_t *mem, byte *rbuf, int rlen, xps_image_t *image) +int +xps_decode_jpeg(gs_memory_t *mem, byte *rbuf, int rlen, xps_image_t *image) { jpeg_decompress_data jddp; stream_DCT_state state; diff --git a/xps/xpspage.c b/xps/xpspage.c index d5e01fedb..c8316fc8b 100644 --- a/xps/xpspage.c +++ b/xps/xpspage.c @@ -15,7 +15,8 @@ #include "ghostxps.h" -int xps_parse_canvas(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_item_t *root) +int +xps_parse_canvas(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_item_t *root) { xps_resource_t *new_dict = NULL; xps_item_t *node; diff --git a/xps/xpspng.c b/xps/xpspng.c index 9a6ca8558..03e5b8485 100644 --- a/xps/xpspng.c +++ b/xps/xpspng.c @@ -35,7 +35,8 @@ struct xps_png_io_s byte *lim; }; -static void xps_png_read(png_structp png, png_bytep data, png_size_t length) +static void +xps_png_read(png_structp png, png_bytep data, png_size_t length) { struct xps_png_io_s *io = png_get_io_ptr(png); if (io->ptr + length > io->lim) @@ -44,19 +45,22 @@ static void xps_png_read(png_structp png, png_bytep data, png_size_t length) io->ptr += length; } -static png_voidp xps_png_malloc(png_structp png, png_size_t size) +static png_voidp +xps_png_malloc(png_structp png, png_size_t size) { gs_memory_t *mem = png_get_mem_ptr(png); return gs_alloc_bytes(mem, size, "libpng"); } -static void xps_png_free(png_structp png, png_voidp ptr) +static void +xps_png_free(png_structp png, png_voidp ptr) { gs_memory_t *mem = png_get_mem_ptr(png); gs_free_object(mem, ptr, "libpng"); } -int xps_decode_png(gs_memory_t *mem, byte *rbuf, int rlen, xps_image_t *image) +int +xps_decode_png(gs_memory_t *mem, byte *rbuf, int rlen, xps_image_t *image) { png_structp png; png_infop info; diff --git a/xps/xpsutf.c b/xps/xpsutf.c index 3a34b334f..da29a32db 100644 --- a/xps/xpsutf.c +++ b/xps/xpsutf.c @@ -19,7 +19,8 @@ * http://tools.ietf.org/html/rfc3629 */ -int xps_utf8_to_ucs(int *p, const char *ss, int n) +int +xps_utf8_to_ucs(int *p, const char *ss, int n) { unsigned char *s = (unsigned char *)ss; diff --git a/xps/xpsxml.c b/xps/xpsxml.c index 320efa337..74300e77c 100644 --- a/xps/xpsxml.c +++ b/xps/xpsxml.c @@ -43,7 +43,8 @@ struct xps_item_s xps_item_t *next; }; -static char *skip_namespace(char *s) +static char * +skip_namespace(char *s) { char *p = strchr(s, ' '); if (p) @@ -51,7 +52,8 @@ static char *skip_namespace(char *s) return s; } -static void on_open_tag(void *zp, char *ns_name, char **atts) +static void +on_open_tag(void *zp, char *ns_name, char **atts) { xps_parser_t *parser = zp; xps_context_t *ctx = parser->ctx; @@ -155,7 +157,8 @@ static void on_open_tag(void *zp, char *ns_name, char **atts) parser->head = item; } -static void on_close_tag(void *zp, char *name) +static void +on_close_tag(void *zp, char *name) { xps_parser_t *parser = zp; @@ -166,12 +169,14 @@ static void on_close_tag(void *zp, char *name) parser->head = parser->head->up; } -static inline int is_xml_space(int c) +static inline int +is_xml_space(int c) { return c == ' ' || c == '\t' || c == '\r' || c == '\n'; } -static void on_text(void *zp, char *buf, int len) +static void +on_text(void *zp, char *buf, int len) { xps_parser_t *parser = zp; xps_context_t *ctx = parser->ctx; |