summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/base_hash.c2
-rw-r--r--mupdf/pdf_annot.c8
-rw-r--r--mupdf/pdf_build.c2
-rw-r--r--mupdf/pdf_cmap.c8
-rw-r--r--mupdf/pdf_colorspace1.c22
-rw-r--r--mupdf/pdf_crypt.c2
-rw-r--r--mupdf/pdf_doctor.c2
-rw-r--r--mupdf/pdf_font.c16
-rw-r--r--mupdf/pdf_fontfile.c2
-rw-r--r--mupdf/pdf_fontfilefc.c10
-rw-r--r--mupdf/pdf_fontfilems.c20
-rw-r--r--mupdf/pdf_image.c8
-rw-r--r--mupdf/pdf_nametree.c8
-rw-r--r--mupdf/pdf_outline.c4
-rw-r--r--mupdf/pdf_parse.c6
-rw-r--r--mupdf/pdf_shade.c8
-rw-r--r--mupdf/pdf_shade1.c6
-rw-r--r--mupdf/pdf_shade4.c18
-rw-r--r--mupdf/pdf_store.c4
-rw-r--r--mupdf/pdf_type3.c4
-rw-r--r--mupdf/pdf_unicode.c18
-rw-r--r--mupdf/pdf_xobject.c2
-rw-r--r--mupdf/pdf_xref.c6
-rw-r--r--raster/glyphcache.c8
-rw-r--r--raster/imagescale.c4
-rw-r--r--raster/meshdraw.c2
-rw-r--r--raster/pathfill.c2
-rw-r--r--raster/pathscan.c18
-rw-r--r--raster/pathstroke.c28
-rw-r--r--raster/pixmap.c4
-rw-r--r--raster/render.c30
-rw-r--r--stream/filt_rle.c12
-rw-r--r--stream/obj_dict.c4
-rw-r--r--stream/obj_parse.c6
-rw-r--r--stream/stm_open.c2
-rw-r--r--stream/stm_read.c2
-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
42 files changed, 186 insertions, 186 deletions
diff --git a/base/base_hash.c b/base/base_hash.c
index b43ee611..c7086ca9 100644
--- a/base/base_hash.c
+++ b/base/base_hash.c
@@ -197,7 +197,7 @@ fz_hashinsert(fz_hashtable *table, void *key, void *val)
memcpy(ents[pos].key, key, table->keylen);
ents[pos].val = val;
table->load ++;
- return nil;
+ return fz_okay;
}
if (memcmp(key, &ents[pos].key, table->keylen) == 0)
diff --git a/mupdf/pdf_annot.c b/mupdf/pdf_annot.c
index df40091b..fff8fad7 100644
--- a/mupdf/pdf_annot.c
+++ b/mupdf/pdf_annot.c
@@ -4,7 +4,7 @@
static fz_error *
loadcomment(pdf_comment **commentp, pdf_xref *xref, fz_obj *dict)
{
- return nil;
+ return fz_okay;
}
fz_error *
@@ -21,7 +21,7 @@ pdf_newlink(pdf_link **linkp, fz_rect bbox, fz_obj *dest)
link->next = nil;
*linkp = link;
- return nil;
+ return fz_okay;
}
void
@@ -141,7 +141,7 @@ pdf_loadlink(pdf_link **linkp, pdf_xref *xref, fz_obj *dict)
*linkp = link;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -204,6 +204,6 @@ pdf_loadannots(pdf_comment **cp, pdf_link **lp, pdf_xref *xref, fz_obj *annots)
*cp = comment;
*lp = link;
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c
index 522ce23a..f3e33768 100644
--- a/mupdf/pdf_build.c
+++ b/mupdf/pdf_build.c
@@ -946,7 +946,7 @@ pdf_showtext(pdf_csi *csi, fz_obj *text)
showspace(csi, - fz_toreal(item) * gstate->size / 1000.0);
}
}
- return nil;
+ return fz_okay;
}
buf = (unsigned char *)fz_tostrbuf(text);
diff --git a/mupdf/pdf_cmap.c b/mupdf/pdf_cmap.c
index 0afd4cf7..6cf351d7 100644
--- a/mupdf/pdf_cmap.c
+++ b/mupdf/pdf_cmap.c
@@ -605,7 +605,7 @@ static fz_error *lexcmap(pdf_token_e *tok, fz_stream *file, char *buf, int n, in
*tok = tokenfromkeyword(buf);
if (error)
return fz_rethrow(error, "cannot parse cmap token");
- return nil;
+ return fz_okay;
}
static fz_error *parsecmapname(pdf_cmap *cmap, fz_stream *file)
@@ -1056,7 +1056,7 @@ cleanup:
fz_error *
pdf_loadembeddedcmap(pdf_cmap **cmapp, pdf_xref *xref, fz_obj *stmref)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_obj *stmobj = stmref;
fz_stream *file;
pdf_cmap *cmap = nil;
@@ -1067,7 +1067,7 @@ pdf_loadembeddedcmap(pdf_cmap **cmapp, pdf_xref *xref, fz_obj *stmref)
if ((*cmapp = pdf_finditem(xref->store, PDF_KCMAP, stmref)))
{
pdf_keepcmap(*cmapp);
- return nil;
+ return fz_okay;
}
pdf_logfont("load embedded cmap %d %d {\n", fz_tonum(stmref), fz_togen(stmref));
@@ -1152,7 +1152,7 @@ cleanup:
fz_error *
pdf_loadsystemcmap(pdf_cmap **cmapp, char *name)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_stream *file;
char *cmapdir;
char *usecmapname;
diff --git a/mupdf/pdf_colorspace1.c b/mupdf/pdf_colorspace1.c
index 9d7c740b..4e232e30 100644
--- a/mupdf/pdf_colorspace1.c
+++ b/mupdf/pdf_colorspace1.c
@@ -276,7 +276,7 @@ loadcalgray(fz_colorspace **csp, pdf_xref *xref, fz_obj *dict)
fz_dropobj(dict);
*csp = (fz_colorspace*) cs;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -351,7 +351,7 @@ loadcalrgb(fz_colorspace **csp, pdf_xref *xref, fz_obj *dict)
fz_dropobj(dict);
*csp = (fz_colorspace*) cs;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -414,7 +414,7 @@ loadlab(fz_colorspace **csp, pdf_xref *xref, fz_obj *dict)
fz_dropobj(dict);
*csp = (fz_colorspace*) cs;
- return nil;
+ return fz_okay;
}
#endif
@@ -442,9 +442,9 @@ loadiccbased(fz_colorspace **csp, pdf_xref *xref, fz_obj *ref)
switch (n)
{
- case 1: *csp = pdf_devicegray; return nil;
- case 3: *csp = pdf_devicergb; return nil;
- case 4: *csp = pdf_devicecmyk; return nil;
+ case 1: *csp = pdf_devicegray; return fz_okay;
+ case 3: *csp = pdf_devicergb; return fz_okay;
+ case 4: *csp = pdf_devicecmyk; return fz_okay;
}
return fz_throw("syntaxerror: ICCBased must have 1, 3 or 4 components");
@@ -544,7 +544,7 @@ loadseparation(fz_colorspace **csp, pdf_xref *xref, fz_obj *array)
pdf_logrsrc("}\n");
*csp = (fz_colorspace*)cs;
- return nil;
+ return fz_okay;
}
/*
@@ -654,7 +654,7 @@ loadindexed(fz_colorspace **csp, pdf_xref *xref, fz_obj *array)
pdf_logrsrc("}\n");
*csp = (fz_colorspace*)cs;
- return nil;
+ return fz_okay;
}
/*
@@ -682,7 +682,7 @@ pdf_loadcolorspace(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj)
*csp = pdf_devicepattern;
else
return fz_throw("unknown colorspace: %s", fz_toname(obj));
- return nil;
+ return fz_okay;
}
else if (fz_isarray(obj))
@@ -734,7 +734,7 @@ pdf_loadcolorspace(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj)
if (!obj)
{
*csp = pdf_devicepattern;
- return nil;
+ return fz_okay;
}
error = pdf_resolve(&obj, xref);
@@ -750,7 +750,7 @@ pdf_loadcolorspace(fz_colorspace **csp, pdf_xref *xref, fz_obj *obj)
else
return fz_throw("syntaxerror: unknown colorspace %s", fz_toname(name));
- return nil;
+ return fz_okay;
}
}
diff --git a/mupdf/pdf_crypt.c b/mupdf/pdf_crypt.c
index 6d9c0196..8090b1b7 100644
--- a/mupdf/pdf_crypt.c
+++ b/mupdf/pdf_crypt.c
@@ -81,7 +81,7 @@ static fz_error *
pdf_parseencdict(pdf_crypt *crypt, fz_obj *enc)
{
fz_obj *obj;
- fz_error *error = nil;
+ fz_error *error = fz_okay;
obj = fz_dictgets(enc, "Filter");
if (!fz_isname(obj))
diff --git a/mupdf/pdf_doctor.c b/mupdf/pdf_doctor.c
index f9e56957..6c36391d 100644
--- a/mupdf/pdf_doctor.c
+++ b/mupdf/pdf_doctor.c
@@ -276,7 +276,7 @@ pdf_transplant(pdf_xref *dst, pdf_xref *src, fz_obj **newp, fz_obj *root)
pdf_logxref("}\n");
fz_free(map);
- return nil;
+ return fz_okay;
cleanup:
fz_free(map);
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c
index 6e5fd083..55e63afc 100644
--- a/mupdf/pdf_font.c
+++ b/mupdf/pdf_font.c
@@ -189,7 +189,7 @@ ftrender(fz_glyph *glyph, fz_font *fzfont, int cid, fz_matrix trm)
}
}
- return nil;
+ return fz_okay;
}
/*
@@ -570,7 +570,7 @@ loadsimplefont(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
pdf_logfont("}\n");
*fontp = font;
- return nil;
+ return fz_okay;
cleanup:
fz_free(etable);
@@ -756,7 +756,7 @@ loadcidfont(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref, fz_obj
else if (!strcmp(collection, "Adobe-Korea1"))
error = pdf_loadsystemcmap(&font->tottfcmap, "Adobe-Korea1-UCS2");
else
- error = nil;
+ error = fz_okay;
if (error)
return fz_rethrow(error, "cannot load system cmap %s", collection);
@@ -885,7 +885,7 @@ loadcidfont(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref, fz_obj
pdf_logfont("}\n");
*fontp = font;
- return nil;
+ return fz_okay;
cleanup:
if (widths)
@@ -934,7 +934,7 @@ loadtype0(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
if (error)
return fz_rethrow(error, "cannot load descendant font");
- return nil;
+ return fz_okay;
}
/*
@@ -999,7 +999,7 @@ pdf_loadfontdescriptor(pdf_font *font, pdf_xref *xref, fz_obj *desc, char *colle
pdf_logfont("}\n");
- return nil;
+ return fz_okay;
cleanup:
fz_dropobj(desc);
@@ -1015,7 +1015,7 @@ pdf_loadfont(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
if ((*fontp = pdf_finditem(xref->store, PDF_KFONT, ref)))
{
fz_keepfont((fz_font*)*fontp);
- return nil;
+ return fz_okay;
}
subtype = fz_toname(fz_dictgets(dict, "Subtype"));
@@ -1037,6 +1037,6 @@ pdf_loadfont(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
if (error)
return fz_rethrow(error, "cannot store font resource");
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_fontfile.c b/mupdf/pdf_fontfile.c
index 868b0341..28155086 100644
--- a/mupdf/pdf_fontfile.c
+++ b/mupdf/pdf_fontfile.c
@@ -116,7 +116,7 @@ static fz_error *initfontlibs(void)
int maj, min, pat;
if (ftlib)
- return nil;
+ return fz_okay;
fterr = FT_Init_FreeType(&ftlib);
if (fterr)
diff --git a/mupdf/pdf_fontfilefc.c b/mupdf/pdf_fontfilefc.c
index e54214ae..b0d7318b 100644
--- a/mupdf/pdf_fontfilefc.c
+++ b/mupdf/pdf_fontfilefc.c
@@ -67,7 +67,7 @@ static fz_error *initfontlibs(void)
int maj, min, pat;
if (ftlib)
- return nil;
+ return fz_okay;
fterr = FT_Init_FreeType(&ftlib);
if (fterr)
@@ -81,7 +81,7 @@ static fz_error *initfontlibs(void)
if (!fclib)
return fz_throw("fontconfig failed initialisation");
- return nil;
+ return fz_okay;
}
fz_error *
@@ -137,7 +137,7 @@ pdf_loadbuiltinfont(pdf_font *font, char *basefont)
font->ftface = face;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -255,7 +255,7 @@ pdf_loadsystemfont(pdf_font *font, char *basefont, char *collection)
font->ftface = face;
- return nil;
+ return fz_okay;
cleanup:
FcPatternDestroy(searchpat);
@@ -290,6 +290,6 @@ pdf_loadembeddedfont(pdf_font *font, pdf_xref *xref, fz_obj *stmref)
font->ftface = face;
font->fontdata = buf;
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_fontfilems.c b/mupdf/pdf_fontfilems.c
index b30bbdec..6d2e605a 100644
--- a/mupdf/pdf_fontfilems.c
+++ b/mupdf/pdf_fontfilems.c
@@ -335,7 +335,7 @@ growfontlist(pdf_fontlistMS *fl)
fl->fontmap = newitems;
fl->cap = newcap;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -359,7 +359,7 @@ insertmapping(pdf_fontlistMS *fl, char *facename, char *path, int index)
++fl->len;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -559,7 +559,7 @@ pdf_createfontlistMS()
fz_error *err;
if(fontlistMS.len != 0)
- return nil;
+ return fz_okay;
GetWindowsDirectory(szFontDir, sizeof(szFontDir));
@@ -613,7 +613,7 @@ pdf_createfontlistMS()
cleanup:
if(err)
fz_abort(err);
- return nil;
+ return fz_okay;
}
void
@@ -657,7 +657,7 @@ pdf_lookupfontMS(char *fontname, char **fontpath, int *index)
*index = fontlistMS.fontmap[0].index;
}
- return nil;
+ return fz_okay;
}
static FT_Library ftlib = nil;
@@ -669,7 +669,7 @@ static fz_error *initfontlibs(void)
fz_error *err;
if (ftlib)
- return nil;
+ return fz_okay;
fterr = FT_Init_FreeType(&ftlib);
if (fterr)
@@ -683,7 +683,7 @@ static fz_error *initfontlibs(void)
if(err)
return err;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -712,7 +712,7 @@ pdf_loadbuiltinfont(pdf_font *font, char *basefont)
font->ftface = face;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -741,7 +741,7 @@ pdf_loadsystemfont(pdf_font *font, char *basefont, char *collection)
font->ftface = face;
- return nil;
+ return fz_okay;
cleanup:
return error;
@@ -773,6 +773,6 @@ pdf_loadembeddedfont(pdf_font *font, pdf_xref *xref, fz_obj *stmref)
font->ftface = face;
font->fontdata = buf;
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_image.c b/mupdf/pdf_image.c
index 27cc7680..92bb2cea 100644
--- a/mupdf/pdf_image.c
+++ b/mupdf/pdf_image.c
@@ -167,7 +167,7 @@ pdf_loadinlineimage(pdf_image **imgp, pdf_xref *xref,
pdf_logimage("}\n");
*imgp = img;
- return nil;
+ return fz_okay;
}
static void
@@ -216,7 +216,7 @@ pdf_loadimage(pdf_image **imgp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
if ((*imgp = pdf_finditem(xref->store, PDF_KIMAGE, ref)))
{
fz_keepimage((fz_image*)*imgp);
- return nil;
+ return fz_okay;
}
img = fz_malloc(sizeof(pdf_image));
@@ -417,7 +417,7 @@ pdf_loadimage(pdf_image **imgp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
}
*imgp = img;
- return nil;
+ return fz_okay;
}
static void
@@ -538,6 +538,6 @@ pdf_loadtile(fz_image *img, fz_pixmap *tile)
fz_decodetile(tile, !img->a, src->decode);
}
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_nametree.c b/mupdf/pdf_nametree.c
index 49396c50..453b6e27 100644
--- a/mupdf/pdf_nametree.c
+++ b/mupdf/pdf_nametree.c
@@ -69,7 +69,7 @@ loadnametreenode(fz_obj *tree, pdf_xref *xref, fz_obj *node)
}
fz_dropobj(node);
- return nil;
+ return fz_okay;
}
fz_error *
@@ -92,7 +92,7 @@ pdf_loadnametree(fz_obj **dictp, pdf_xref *xref, fz_obj *root)
fz_sortdict(tree);
*dictp = tree;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -110,7 +110,7 @@ pdf_loadnametrees(pdf_xref *xref)
if (error)
return fz_rethrow(error, "cannot resolve /Dests");
xref->dests = dests;
- return nil;
+ return fz_okay;
}
/* PDF 1.2 */
@@ -133,6 +133,6 @@ pdf_loadnametrees(pdf_xref *xref)
fz_dropobj(names);
}
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_outline.c b/mupdf/pdf_outline.c
index 7bd47e51..fca01e12 100644
--- a/mupdf/pdf_outline.c
+++ b/mupdf/pdf_outline.c
@@ -59,7 +59,7 @@ loadoutline(pdf_outline **nodep, pdf_xref *xref, fz_obj *dict)
}
*nodep = node;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -100,7 +100,7 @@ pdf_loadoutline(pdf_outline **nodep, pdf_xref *xref)
pdf_logpage("}\n");
*nodep = node;
- return nil;
+ return fz_okay;
}
void
diff --git a/mupdf/pdf_parse.c b/mupdf/pdf_parse.c
index 889678a8..596a5084 100644
--- a/mupdf/pdf_parse.c
+++ b/mupdf/pdf_parse.c
@@ -109,7 +109,7 @@ pdf_toucs2(unsigned short **dstp, fz_obj *src)
fz_error *
pdf_parsearray(fz_obj **op, fz_stream *file, char *buf, int cap)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_obj *ary = nil;
fz_obj *obj = nil;
int a = 0, b = 0, n = 0;
@@ -220,7 +220,7 @@ cleanup:
fz_error *
pdf_parsedict(fz_obj **op, fz_stream *file, char *buf, int cap)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_obj *dict = nil;
fz_obj *key = nil;
fz_obj *val = nil;
@@ -352,7 +352,7 @@ fz_error *
pdf_parseindobj(fz_obj **op, fz_stream *file, char *buf, int cap,
int *ooid, int *ogid, int *ostmofs)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_obj *obj = nil;
int oid = 0, gid = 0, stmofs;
pdf_token_e tok;
diff --git a/mupdf/pdf_shade.c b/mupdf/pdf_shade.c
index da185a8c..351f6514 100644
--- a/mupdf/pdf_shade.c
+++ b/mupdf/pdf_shade.c
@@ -33,7 +33,7 @@ pdf_loadshadefunction(fz_shade *shade, pdf_xref *xref, fz_obj *shading, float t0
pdf_dropfunction(func);
}
- return nil;
+ return fz_okay;
}
void
@@ -149,7 +149,7 @@ loadshadedict(fz_shade **shadep, pdf_xref *xref, fz_obj *dict, fz_obj *ref, fz_m
pdf_logshade("}\n");
*shadep = shade;
- return nil;
+ return fz_okay;
cleanup:
fz_dropshade(shade);
@@ -165,7 +165,7 @@ pdf_loadshade(fz_shade **shadep, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
fz_obj *shd;
if ((*shadep = pdf_finditem(xref->store, PDF_KSHADE, ref)))
- return nil;
+ return fz_okay;
/*
* Type 2 pattern dictionary
@@ -225,6 +225,6 @@ pdf_loadshade(fz_shade **shadep, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
return error;
}
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_shade1.c b/mupdf/pdf_shade1.c
index e971e71f..8faec12e 100644
--- a/mupdf/pdf_shade1.c
+++ b/mupdf/pdf_shade1.c
@@ -107,7 +107,7 @@ pdf_loadtype1shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
pdf_logshade("}\n");
- return nil;
+ return fz_okay;
}
fz_error *
@@ -245,7 +245,7 @@ pdf_loadtype2shade(fz_shade *shade, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
pdf_logshade("}\n");
- return nil;
+ return fz_okay;
}
static int
@@ -389,6 +389,6 @@ pdf_loadtype3shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
pdf_logshade("}\n");
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_shade4.c b/mupdf/pdf_shade4.c
index 438e4b19..34241f66 100644
--- a/mupdf/pdf_shade4.c
+++ b/mupdf/pdf_shade4.c
@@ -33,7 +33,7 @@ pdf_loadtype4shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
unsigned int t;
float x, y;
- error = nil;
+ error = fz_okay;
ncomp = shade->cs->n;
bpcoord = fz_toint(fz_dictgets(shading, "BitsPerCoordinate"));
@@ -158,7 +158,7 @@ pdf_loadtype4shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
fz_dropbuffer(buf);
- return nil;
+ return fz_okay;
cleanup:
return error;
@@ -208,7 +208,7 @@ pdf_loadtype5shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
float *x, *y, *c[FZ_MAXCOLORS];
- error = nil;
+ error = fz_okay;
ncomp = shade->cs->n;
bpcoord = fz_toint(fz_dictgets(shading, "BitsPerCoordinate"));
@@ -322,7 +322,7 @@ pdf_loadtype5shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
fz_free(c[i]);
}
- return nil;
+ return fz_okay;
cleanup:
return error;
@@ -477,7 +477,7 @@ growshademesh(fz_shade *shade, int amount)
shade->mesh = newmesh;
shade->meshcap = newcap;
- return nil;
+ return fz_okay;
}
static inline int setvertex(float *mesh, fz_point pt, float *color, int ptr, int ncomp)
@@ -585,7 +585,7 @@ pdf_loadtype6shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
pdf_tensorpatch patch;
- error = nil;
+ error = fz_okay;
ncomp = shade->cs->n;
bpcoord = fz_toint(fz_dictgets(shading, "BitsPerCoordinate"));
@@ -671,7 +671,7 @@ pdf_loadtype6shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
shade->meshlen = j / n / 3;
- return nil;
+ return fz_okay;
cleanup:
return error;
@@ -701,7 +701,7 @@ pdf_loadtype7shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
fz_point p[16];
pdf_tensorpatch patch;
- error = nil;
+ error = fz_okay;
ncomp = shade->cs->n;
bpcoord = fz_toint(fz_dictgets(shading, "BitsPerCoordinate"));
@@ -790,7 +790,7 @@ pdf_loadtype7shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
shade->meshlen = j / n / 3;
- return nil;
+ return fz_okay;
cleanup:
return error;
diff --git a/mupdf/pdf_store.c b/mupdf/pdf_store.c
index b5b9069a..99e21017 100644
--- a/mupdf/pdf_store.c
+++ b/mupdf/pdf_store.c
@@ -189,7 +189,7 @@ pdf_removeitem(pdf_store *store, pdf_itemkind kind, fz_obj *key)
void *val;
if (key == nil)
- return nil;
+ return fz_okay;
val = nil;
@@ -238,6 +238,6 @@ pdf_removeitem(pdf_store *store, pdf_itemkind kind, fz_obj *key)
}
}
- return nil;
+ return fz_okay;
}
diff --git a/mupdf/pdf_type3.c b/mupdf/pdf_type3.c
index a4e1fa49..791b7022 100644
--- a/mupdf/pdf_type3.c
+++ b/mupdf/pdf_type3.c
@@ -60,7 +60,7 @@ t3render(fz_glyph *glyph, fz_font *fzfont, int cid, fz_matrix trm)
glyph->h = pixmap->h;
glyph->samples = pixmap->samples;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -310,7 +310,7 @@ pdf_loadtype3font(pdf_font **fontp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
pdf_logfont("}\n");
*fontp = font;
- return nil;
+ return fz_okay;
cleanup2:
if (resources)
diff --git a/mupdf/pdf_unicode.c b/mupdf/pdf_unicode.c
index d8d800f7..e2fb2f5d 100644
--- a/mupdf/pdf_unicode.c
+++ b/mupdf/pdf_unicode.c
@@ -9,7 +9,7 @@ fz_error *
pdf_loadtounicode(pdf_font *font, pdf_xref *xref,
char **strings, char *collection, fz_obj *cmapstm)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
pdf_cmap *cmap;
int cid;
int ucs;
@@ -56,14 +56,14 @@ pdf_loadtounicode(pdf_font *font, pdf_xref *xref,
}
pdf_dropcmap(cmap);
- return nil;
+ return fz_okay;
}
else if (collection)
{
pdf_logfont("tounicode cid collection\n");
- error = nil;
+ error = fz_okay;
if (!strcmp(collection, "Adobe-CNS1"))
error = pdf_loadsystemcmap(&font->tounicode, "Adobe-CNS1-UCS2");
@@ -107,11 +107,11 @@ pdf_loadtounicode(pdf_font *font, pdf_xref *xref,
font->cidtoucs[i] = '?';
}
- return nil;
+ return fz_okay;
}
pdf_logfont("tounicode impossible");
- return nil;
+ return fz_okay;
}
/*
@@ -129,7 +129,7 @@ pdf_newtextline(pdf_textline **linep)
line->cap = 0;
line->text = nil;
line->next = nil;
- return nil;
+ return fz_okay;
}
void
@@ -161,7 +161,7 @@ addtextchar(pdf_textline *line, fz_irect bbox, int c)
line->text[line->len].c = c;
line->len ++;
- return nil;
+ return fz_okay;
}
/* XXX global! not reentrant! */
@@ -275,7 +275,7 @@ extracttext(pdf_textline **line, fz_node *node, fz_matrix ctm)
return fz_rethrow(error, "cannot extract text from display node");
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -302,7 +302,7 @@ pdf_loadtextfromtree(pdf_textline **outp, fz_tree *tree, fz_matrix ctm)
}
*outp = root;
- return nil;
+ return fz_okay;
}
void
diff --git a/mupdf/pdf_xobject.c b/mupdf/pdf_xobject.c
index 9c4a0a78..e9a623f3 100644
--- a/mupdf/pdf_xobject.c
+++ b/mupdf/pdf_xobject.c
@@ -83,7 +83,7 @@ pdf_loadxobject(pdf_xobject **formp, pdf_xref *xref, fz_obj *dict, fz_obj *ref)
pdf_logrsrc("}\n");
*formp = form;
- return nil;
+ return fz_okay;
cleanup:
pdf_removeitem(xref->store, PDF_KXOBJECT, ref);
pdf_dropxobject(form);
diff --git a/mupdf/pdf_xref.c b/mupdf/pdf_xref.c
index 7564855e..1a8faf41 100644
--- a/mupdf/pdf_xref.c
+++ b/mupdf/pdf_xref.c
@@ -166,7 +166,7 @@ pdf_decryptxref(pdf_xref *xref)
if (fz_isnull(encrypt))
{
fz_dropobj(encrypt);
- return nil;
+ return fz_okay;
}
error = pdf_resolve(&id, xref);
@@ -238,7 +238,7 @@ pdf_allocobject(pdf_xref *xref, int *oidp, int *genp)
xref->table[prev].type = 'd';
xref->table[prev].ofs = next;
- return nil;
+ return fz_okay;
}
}
@@ -383,7 +383,7 @@ pdf_cacheobject(pdf_xref *xref, int oid, int gen)
x = &xref->table[oid];
if (x->obj)
- return nil;
+ return fz_okay;
if (x->type == 'f' || x->type == 'd')
{
diff --git a/raster/glyphcache.c b/raster/glyphcache.c
index 41de3b73..e2d93bc9 100644
--- a/raster/glyphcache.c
+++ b/raster/glyphcache.c
@@ -91,7 +91,7 @@ fz_newglyphcache(fz_glyphcache **arenap, int slots, int size)
arena->load = 0;
arena->used = 0;
- return nil;
+ return fz_okay;
cleanup:
fz_free(arena->hash);
@@ -344,7 +344,7 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz
ghits++;
- return nil;
+ return fz_okay;
}
gmisses++;
@@ -359,7 +359,7 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz
size = glyph->w * glyph->h;
if (size > arena->size / 6)
- return nil;
+ return fz_okay;
while (arena->load > arena->slots * 75 / 100)
{
@@ -388,6 +388,6 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz
hashinsert(arena, &key, val);
- return nil;
+ return fz_okay;
}
diff --git a/raster/imagescale.c b/raster/imagescale.c
index 7010b691..f7eedeef 100644
--- a/raster/imagescale.c
+++ b/raster/imagescale.c
@@ -268,7 +268,7 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde
}
fz_free(buf);
- return nil;
+ return fz_okay;
}
fz_error *
@@ -353,6 +353,6 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom)
fz_free(buf);
*dstp = dst;
- return nil;
+ return fz_okay;
}
diff --git a/raster/meshdraw.c b/raster/meshdraw.c
index 2c6d2c99..abdcaaa1 100644
--- a/raster/meshdraw.c
+++ b/raster/meshdraw.c
@@ -403,6 +403,6 @@ fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *destcs, fz_pixmap
fz_droppixmap(temp);
}
- return nil;
+ return fz_okay;
}
diff --git a/raster/pathfill.c b/raster/pathfill.c
index e361b9a5..3040e6a3 100644
--- a/raster/pathfill.c
+++ b/raster/pathfill.c
@@ -129,6 +129,6 @@ fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness)
return error;
}
- return nil;
+ return fz_okay;
}
diff --git a/raster/pathscan.c b/raster/pathscan.c
index 62f60fa1..67ff0456 100644
--- a/raster/pathscan.c
+++ b/raster/pathscan.c
@@ -37,7 +37,7 @@ fz_newgel(fz_gel **gelp)
gel->bbox.x0 = gel->bbox.y0 = INT_MAX;
gel->bbox.x1 = gel->bbox.y1 = INT_MIN;
- return nil;
+ return fz_okay;
}
void
@@ -125,17 +125,17 @@ fz_insertgel(fz_gel *gel, float fx0, float fy0, float fx1, float fy1)
int y1 = fz_floor(fy1 * VSCALE);
d = cliplerpy(gel->clip.y0, 0, x0, y0, x1, y1, &v);
- if (d == OUTSIDE) return nil;
+ if (d == OUTSIDE) return fz_okay;
if (d == LEAVE) { y1 = gel->clip.y0; x1 = v; }
if (d == ENTER) { y0 = gel->clip.y0; x0 = v; }
d = cliplerpy(gel->clip.y1, 1, x0, y0, x1, y1, &v);
- if (d == OUTSIDE) return nil;
+ if (d == OUTSIDE) return fz_okay;
if (d == LEAVE) { y1 = gel->clip.y1; x1 = v; }
if (d == ENTER) { y0 = gel->clip.y1; x0 = v; }
if (y0 == y1)
- return nil;
+ return fz_okay;
if (y0 > y1) {
winding = -1;
@@ -193,7 +193,7 @@ fz_insertgel(fz_gel *gel, float fx0, float fy0, float fx1, float fy1)
edge->adjup = width % dy;
}
- return nil;
+ return fz_okay;
}
void
@@ -254,7 +254,7 @@ fz_newael(fz_ael **aelp)
return fz_outofmem;
}
- return nil;
+ return fz_okay;
}
void
@@ -316,7 +316,7 @@ insertael(fz_ael *ael, fz_gel *gel, int y, int *e)
/* shell-sort the edges by increasing x */
sortael(ael->edges, ael->len);
- return nil;
+ return fz_okay;
}
static void
@@ -473,7 +473,7 @@ fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill, fz_irect clip,
assert(clip.x1 <= xmax);
if (gel->len == 0)
- return nil;
+ return fz_okay;
deltas = fz_malloc(xmax - xmin + 1);
if (!deltas)
@@ -526,6 +526,6 @@ fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill, fz_irect clip,
}
fz_free(deltas);
- return nil;
+ return fz_okay;
}
diff --git a/raster/pathstroke.c b/raster/pathstroke.c
index cafcd663..0143742c 100644
--- a/raster/pathstroke.c
+++ b/raster/pathstroke.c
@@ -82,7 +82,7 @@ arc(struct sctx *s,
error = line(s, xc + ox, yc + oy, xc + x1, yc + y1);
if (error) return error;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -102,7 +102,7 @@ linestroke(struct sctx *s, fz_point a, fz_point b)
error = line(s, b.x + dlx, b.y + dly, a.x + dlx, a.y + dly);
if (error) return error;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -128,9 +128,9 @@ linejoin(struct sctx *s, fz_point a, fz_point b, fz_point c)
dy1 = c.y - b.y;
if (dx0 * dx0 + dy0 * dy0 < FLT_EPSILON)
- return nil;
+ return fz_okay;
if (dx1 * dx1 + dy1 * dy1 < FLT_EPSILON)
- return nil;
+ return fz_okay;
scale = linewidth / sqrt(dx0 * dx0 + dy0 * dy0);
dlx0 = dy0 * scale;
@@ -205,7 +205,7 @@ linejoin(struct sctx *s, fz_point a, fz_point b, fz_point c)
}
}
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -265,7 +265,7 @@ linecap(struct sctx *s, fz_point a, fz_point b)
if (error) return error;
}
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -292,7 +292,7 @@ linedot(struct sctx *s, fz_point a)
}
error = line(s, ox, oy, a.x - linewidth, a.y);
if (error) return error;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -315,7 +315,7 @@ strokeflush(struct sctx *s)
s->dot = 0;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -331,7 +331,7 @@ strokemoveto(struct sctx *s, fz_point cur)
s->sn = 1;
s->bn = 1;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -345,7 +345,7 @@ strokelineto(struct sctx *s, fz_point cur)
if (dx * dx + dy * dy < s->flatness * s->flatness * 0.25)
{
s->dot = 1;
- return nil;
+ return fz_okay;
}
error = linestroke(s, s->seg[s->sn-1], cur);
@@ -365,7 +365,7 @@ strokelineto(struct sctx *s, fz_point cur)
if (s->bn == 1)
s->beg[s->bn++] = cur;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -395,7 +395,7 @@ strokeclosepath(struct sctx *s)
s->sn = 0;
s->dot = 0;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -546,7 +546,7 @@ dashmoveto(struct sctx *s, fz_point a)
if (s->toggle)
return strokemoveto(s, a);
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -592,7 +592,7 @@ dashlineto(struct sctx *s, fz_point b)
if (s->toggle)
return strokelineto(s, b);
- return nil;
+ return fz_okay;
}
static fz_error *
diff --git a/raster/pixmap.c b/raster/pixmap.c
index 74e2f59a..cec36014 100644
--- a/raster/pixmap.c
+++ b/raster/pixmap.c
@@ -23,7 +23,7 @@ fz_newpixmap(fz_pixmap **pixp, int x, int y, int w, int h, int n)
return fz_outofmem;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -43,7 +43,7 @@ fz_newpixmapcopy(fz_pixmap **pixp, fz_pixmap *old)
if (error)
return error;
memcpy((*pixp)->samples, old->samples, old->w * old->h * old->n);
- return nil;
+ return fz_okay;
}
void
diff --git a/raster/render.c b/raster/render.c
index 596bedab..a7c2e2f5 100644
--- a/raster/render.c
+++ b/raster/render.c
@@ -57,7 +57,7 @@ fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm, int maskonly, int gcmem)
gc->flag = 0;
*gcp = gc;
- return nil;
+ return fz_okay;
cleanup:
if (gc->model) fz_dropcolorspace(gc->model);
@@ -171,7 +171,7 @@ DEBUG("solid %s [%d %d %d %d];\n", solid->cs->name, gc->argb[0], gc->argb[1], gc
}
}
- return nil;
+ return fz_okay;
}
/*
@@ -218,7 +218,7 @@ renderpath(fz_renderer *gc, fz_pathnode *path, fz_matrix ctm)
clip = fz_intersectirects(gc->clip, gbox);
if (fz_isemptyrect(clip))
- return nil;
+ return fz_okay;
DEBUG("path %s;\n", path->paint == FZ_STROKE ? "stroke" : "fill");
@@ -321,7 +321,7 @@ text->font->name, text->len,
text->trm.a, text->trm.b, text->trm.c, text->trm.d);
if (fz_isemptyrect(clip))
- return nil;
+ return fz_okay;
if (!(gc->flag & FOVER))
{
@@ -354,7 +354,7 @@ text->trm.a, text->trm.b, text->trm.c, text->trm.d);
drawglyph(gc, gc->over, &glyph, x, y);
}
- return nil;
+ return fz_okay;
}
/*
@@ -405,7 +405,7 @@ DEBUG("image %dx%d %d+%d %s\n{\n", image->w, image->h, image->n, image->a, image
clip = fz_intersectirects(gc->clip, bbox);
if (fz_isemptyrect(clip))
- return nil;
+ return fz_okay;
calcimagescale(ctm, image->w, image->h, &dx, &dy);
@@ -543,7 +543,7 @@ DEBUG(" fover+rgb %d x %d\n", w, h);
DEBUG("}\n");
fz_droppixmap(tile);
- return nil;
+ return fz_okay;
cleanup1:
fz_droppixmap(temp);
@@ -715,7 +715,7 @@ else DEBUG("over\n{\n");
DEBUG("}\n");
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -772,7 +772,7 @@ rendermask(fz_renderer *gc, fz_masknode *mask, fz_matrix ctm)
clip = fz_intersectirects(bbox, clip);
if (fz_isemptyrect(clip))
- return nil;
+ return fz_okay;
DEBUG("mask [%d %d %d %d]\n{\n", clip.x0, clip.y0, clip.x1, clip.y1);
@@ -830,7 +830,7 @@ DEBUG("}\n");
if (shapepix) fz_droppixmap(shapepix);
if (colorpix) fz_droppixmap(colorpix);
- return nil;
+ return fz_okay;
cleanup:
if (shapepix) fz_droppixmap(shapepix);
@@ -846,7 +846,7 @@ static fz_error *
rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm)
{
if (!node)
- return nil;
+ return fz_okay;
gc->flag = FNONE;
if (gc->over)
@@ -875,10 +875,10 @@ rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm)
case FZ_NMETA:
return rendernode(gc, node->first, ctm);
case FZ_NBLEND:
- return nil;
+ return fz_okay;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -923,7 +923,7 @@ DEBUG("}\n");
*outp = gc->over;
gc->over = nil;
- return nil;
+ return fz_okay;
}
fz_error *
@@ -957,6 +957,6 @@ fz_rendertreeover(fz_renderer *gc, fz_pixmap *dest, fz_tree *tree, fz_matrix ctm
gc->over = nil;
- return nil;
+ return fz_okay;
}
diff --git a/stream/filt_rle.c b/stream/filt_rle.c
index 458bf3ba..021c3ecf 100644
--- a/stream/filt_rle.c
+++ b/stream/filt_rle.c
@@ -63,7 +63,7 @@ fprintf(stderr, "one '%c'\n", enc->buf[0]);
*out->wp++ = 0;
*out->wp++ = enc->buf[0];
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -78,7 +78,7 @@ fprintf(stderr, "same %d x '%c'\n", enc->run, enc->buf[0]);
*out->wp++ = 257 - enc->run;
*out->wp++ = enc->buf[0];
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -95,7 +95,7 @@ fprintf(stderr, "diff %d\n", enc->run);
*out->wp++ = enc->run - 1;
for (i = 0; i < enc->run; i++)
*out->wp++ = enc->buf[i];
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -109,7 +109,7 @@ fprintf(stderr, "eod\n");
#endif
*out->wp++ = 128;
- return nil;
+ return fz_okay;
}
static fz_error *
@@ -117,12 +117,12 @@ savebuf(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
switch (enc->state)
{
- case ZERO: return nil;
+ case ZERO: return fz_okay;
case ONE: return putone(enc, in, out);
case SAME: return putsame(enc, in, out);
case DIFF: return putdiff(enc, in, out);
case END: return puteod(enc, in, out);
- default: assert(!"invalid state in rle"); return nil;
+ default: assert(!"invalid state in rle"); return fz_okay;
}
}
diff --git a/stream/obj_dict.c b/stream/obj_dict.c
index a3366170..236c8a1a 100644
--- a/stream/obj_dict.c
+++ b/stream/obj_dict.c
@@ -53,7 +53,7 @@ fz_newdict(fz_obj **op, int initialcap)
obj->u.d.items[i].v = nil;
}
- return nil;
+ return fz_okay;
}
fz_error *
@@ -331,7 +331,7 @@ fz_dictputs(fz_obj *obj, char *key, fz_obj *val)
fz_dropobj(keyobj);
if (error)
return fz_rethrow(error, "cannot insert dict entry");
- return nil;
+ return fz_okay;
}
fz_error *
diff --git a/stream/obj_parse.c b/stream/obj_parse.c
index 8f43a064..48d59538 100644
--- a/stream/obj_parse.c
+++ b/stream/obj_parse.c
@@ -108,7 +108,7 @@ static fz_error *parsenumber(fz_obj **obj, char **sp)
static fz_error *parsedict(fz_obj **obj, char **sp, struct vap *v)
{
- fz_error *error = nil;
+ fz_error *error = fz_okay;
fz_obj *dict = nil;
fz_obj *key = nil;
fz_obj *val = nil;
@@ -349,7 +349,7 @@ static fz_error *parseobj(fz_obj **obj, char **sp, struct vap *v)
skipwhite(&s);
- error = nil;
+ error = fz_okay;
if (v != nil && *s == '%')
{
@@ -481,7 +481,7 @@ fz_packobj(fz_obj **op, char *fmt, ...)
if (error)
return fz_rethrow(error, "cannot parse object");
- return nil;
+ return fz_okay;
}
fz_error *
diff --git a/stream/stm_open.c b/stream/stm_open.c
index c10d1509..908b1a7b 100644
--- a/stream/stm_open.c
+++ b/stream/stm_open.c
@@ -18,7 +18,7 @@ newstm(int kind, int mode)
stm->kind = kind;
stm->mode = mode;
stm->dead = 0;
- stm->error = nil;
+ stm->error = fz_okay;
stm->buffer = nil;
stm->chain = nil;
diff --git a/stream/stm_read.c b/stream/stm_read.c
index 43bdb192..e0a6e8a1 100644
--- a/stream/stm_read.c
+++ b/stream/stm_read.c
@@ -269,7 +269,7 @@ fz_readerror(fz_stream *stm)
if (stm->error)
{
error = stm->error;
- stm->error = nil;
+ stm->error = fz_okay;
return fz_rethrow(error, "delayed read error");
}
return fz_okay;
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