summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2008-04-20 12:20:52 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2008-04-20 12:20:52 +0200
commitd96fc32d1dcae224b320918c96153574fbd5ed5e (patch)
treed9d972a39fc66f998059b585240ed43d395e07ef /world
parent704339802c88bc470187bd77c4680d19108dab0b (diff)
downloadmupdf-d96fc32d1dcae224b320918c96153574fbd5ed5e.tar.xz
Adhere to common idiom when not encoundering error.
Diffstat (limited to 'world')
-rw-r--r--world/node_misc2.c18
-rw-r--r--world/node_optimize.c6
-rw-r--r--world/node_path.c18
-rw-r--r--world/node_text.c8
-rw-r--r--world/node_tree.c2
-rw-r--r--world/res_font.c12
6 files changed, 32 insertions, 32 deletions
diff --git a/world/node_misc2.c b/world/node_misc2.c
index c8986d4d..807899e7 100644
--- a/world/node_misc2.c
+++ b/world/node_misc2.c
@@ -16,7 +16,7 @@ fz_newovernode(fz_node **nodep)
fz_initnode(node, FZ_NOVER);
- return nil;
+ return fz_okay;
}
fz_rect
@@ -58,7 +58,7 @@ fz_newmasknode(fz_node **nodep)
fz_initnode(node, FZ_NMASK);
- return nil;
+ return fz_okay;
}
fz_rect
@@ -96,7 +96,7 @@ fz_newblendnode(fz_node **nodep, fz_colorspace *cs, fz_blendkind b, int k, int i
node->knockout = k;
node->isolated = i;
- return nil;
+ return fz_okay;
}
fz_rect
@@ -146,7 +146,7 @@ fz_newtransformnode(fz_node **nodep, fz_matrix m)
fz_initnode((fz_node*)node, FZ_NTRANSFORM);
node->m = m;
- return nil;
+ return fz_okay;
}
fz_rect
@@ -175,7 +175,7 @@ fz_newmetanode(fz_node **nodep, char *name, void *dict)
node->name = name;
node->dict = dict;
- return nil;
+ return fz_okay;
}
void
@@ -210,7 +210,7 @@ fz_newlinknode(fz_node **nodep, fz_tree *subtree)
fz_initnode((fz_node*)node, FZ_NLINK);
node->tree = fz_keeptree(subtree);
- return nil;
+ return fz_okay;
}
void
@@ -247,7 +247,7 @@ fz_newsolidnode(fz_node **nodep, float a, fz_colorspace *cs, int n, float *v)
for (i = 0; i < n; i++)
node->samples[i] = v[i];
- return nil;
+ return fz_okay;
}
fz_rect
@@ -279,7 +279,7 @@ fz_newimagenode(fz_node **nodep, fz_image *image)
fz_initnode((fz_node*)node, FZ_NIMAGE);
node->image = fz_keepimage(image);
- return nil;
+ return fz_okay;
}
void
@@ -316,7 +316,7 @@ fz_newshadenode(fz_node **nodep, fz_shade *shade)
fz_initnode((fz_node*)node, FZ_NSHADE);
node->shade = fz_keepshade(shade);
- return nil;
+ return fz_okay;
}
void
diff --git a/world/node_optimize.c b/world/node_optimize.c
index d284ce08..2465411b 100644
--- a/world/node_optimize.c
+++ b/world/node_optimize.c
@@ -293,7 +293,7 @@ static fz_error *clean1x1(fz_node *node)
return fz_rethrow(error, "cannot perform clean1x1 optimization");
}
- return nil;
+ return fz_okay;
}
/*
@@ -304,11 +304,11 @@ fz_error *
fz_optimizetree(fz_tree *tree)
{
if (getenv("DONTOPT"))
- return nil;
+ return fz_okay;
cleanwhite(tree->root);
cleanovers(tree->root);
cleanmasks(tree->root);
clean1x1(tree->root);
- return nil;
+ return fz_okay;
}
diff --git a/world/node_path.c b/world/node_path.c
index dfae1560..701181dc 100644
--- a/world/node_path.c
+++ b/world/node_path.c
@@ -22,7 +22,7 @@ fz_newpathnode(fz_pathnode **pathp)
path->cap = 0;
path->els = nil;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -52,7 +52,7 @@ fz_clonepathnode(fz_pathnode **pathp, fz_pathnode *oldpath)
}
memcpy(path->els, oldpath->els, sizeof(fz_pathel) * path->len);
- return nil;
+ return fz_okay;
}
void
@@ -78,7 +78,7 @@ growpath(fz_pathnode *path, int n)
path->els = newels;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -89,7 +89,7 @@ fz_moveto(fz_pathnode *path, float x, float y)
path->els[path->len++].k = FZ_MOVETO;
path->els[path->len++].v = x;
path->els[path->len++].v = y;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -100,7 +100,7 @@ fz_lineto(fz_pathnode *path, float x, float y)
path->els[path->len++].k = FZ_LINETO;
path->els[path->len++].v = x;
path->els[path->len++].v = y;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -118,7 +118,7 @@ fz_curveto(fz_pathnode *path,
path->els[path->len++].v = y2;
path->els[path->len++].v = x3;
path->els[path->len++].v = y3;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -141,7 +141,7 @@ fz_closepath(fz_pathnode *path)
if (growpath(path, 1) != nil)
return fz_outofmem;
path->els[path->len++].k = FZ_CLOSEPATH;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -167,7 +167,7 @@ fz_endpath(fz_pathnode *path, fz_pathkind paint, fz_stroke *stroke, fz_dash *das
if (path->linewidth < 0.01)
path->linewidth = 0.01;
- return nil;
+ return fz_okay;
}
static inline fz_rect boundexpand(fz_rect r, fz_point p)
@@ -340,7 +340,7 @@ fz_newdash(fz_dash **dashp, float phase, int len, float *array)
for (i = 0; i < len; i++)
dash->array[i] = array[i];
- return nil;
+ return fz_okay;
}
void
diff --git a/world/node_text.c b/world/node_text.c
index c6f19e29..b816196e 100644
--- a/world/node_text.c
+++ b/world/node_text.c
@@ -19,7 +19,7 @@ fz_newtextnode(fz_textnode **textp, fz_font *font)
text->els = nil;
*textp = text;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -50,7 +50,7 @@ fz_clonetextnode(fz_textnode **textp, fz_textnode *oldtext)
memcpy(text->els, oldtext->els, sizeof(fz_textel) * text->len);
*textp = text;
- return nil;
+ return fz_okay;
}
void
@@ -125,7 +125,7 @@ growtext(fz_textnode *text, int n)
text->els = newels;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -137,6 +137,6 @@ fz_addtext(fz_textnode *text, int cid, float x, float y)
text->els[text->len].x = x;
text->els[text->len].y = y;
text->len++;
- return nil;
+ return fz_okay;
}
diff --git a/world/node_tree.c b/world/node_tree.c
index 32d3a635..f5698bc1 100644
--- a/world/node_tree.c
+++ b/world/node_tree.c
@@ -14,7 +14,7 @@ fz_newtree(fz_tree **treep)
tree->root = nil;
tree->head = nil;
- return nil;
+ return fz_okay;
}
fz_tree *
diff --git a/world/res_font.c b/world/res_font.c
index d27d5bb4..d9c5f73a 100644
--- a/world/res_font.c
+++ b/world/res_font.c
@@ -101,7 +101,7 @@ fz_addhmtx(fz_font *font, int lo, int hi, int w)
font->hmtx[font->nhmtx].w = w;
font->nhmtx++;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -127,7 +127,7 @@ fz_addvmtx(fz_font *font, int lo, int hi, int x, int y, int w)
font->vmtx[font->nvmtx].w = w;
font->nvmtx++;
- return nil;
+ return fz_okay;
}
static int cmph(const void *a0, const void *b0)
@@ -150,7 +150,7 @@ fz_endhmtx(fz_font *font)
fz_hmtx *newmtx;
if (!font->hmtx)
- return nil;
+ return fz_okay;
qsort(font->hmtx, font->nhmtx, sizeof(fz_hmtx), cmph);
@@ -160,7 +160,7 @@ fz_endhmtx(fz_font *font)
font->hmtxcap = font->nhmtx;
font->hmtx = newmtx;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -169,7 +169,7 @@ fz_endvmtx(fz_font *font)
fz_vmtx *newmtx;
if (!font->vmtx)
- return nil;
+ return fz_okay;
qsort(font->vmtx, font->nvmtx, sizeof(fz_vmtx), cmpv);
@@ -179,7 +179,7 @@ fz_endvmtx(fz_font *font)
font->vmtxcap = font->nvmtx;
font->vmtx = newmtx;
- return nil;
+ return fz_okay;
}
fz_hmtx