summaryrefslogtreecommitdiff
path: root/fitz/dev_null.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-04 23:35:45 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-04 23:35:45 +0200
commit7cf6ccee8c6b59d8aac17ab6e4673bcb69f5e8d2 (patch)
treeb329db03bae14fca178add9909b78b050345c140 /fitz/dev_null.c
parentefc46353676c27b24f2933dce78305796951a01e (diff)
downloadmupdf-7cf6ccee8c6b59d8aac17ab6e4673bcb69f5e8d2.tar.xz
Le Roi est mort, vive le Roi!
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
Diffstat (limited to 'fitz/dev_null.c')
-rw-r--r--fitz/dev_null.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/fitz/dev_null.c b/fitz/dev_null.c
index 2d20a966..dcb43292 100644
--- a/fitz/dev_null.c
+++ b/fitz/dev_null.c
@@ -1,29 +1,29 @@
#include "fitz.h"
-static void fz_nullfreeuser(void *user) {}
-static void fz_nullfillpath(void *user, fz_path *path, int evenodd, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
-static void fz_nullstrokepath(void *user, fz_path *path, fz_strokestate *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
-static void fz_nullclippath(void *user, fz_path *path, int evenodd, fz_matrix ctm) {}
-static void fz_nullclipstrokepath(void *user, fz_path *path, fz_strokestate *stroke, fz_matrix ctm) {}
-static void fz_nullfilltext(void *user, fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
-static void fz_nullstroketext(void *user, fz_text *text, fz_strokestate *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
-static void fz_nullcliptext(void *user, fz_text *text, fz_matrix ctm, int accumulate) {}
-static void fz_nullclipstroketext(void *user, fz_text *text, fz_strokestate *stroke, fz_matrix ctm) {}
-static void fz_nullignoretext(void *user, fz_text *text, fz_matrix ctm) {}
-static void fz_nullpopclip(void *user) {}
-static void fz_nullfillshade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) {}
-static void fz_nullfillimage(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) {}
-static void fz_nullfillimagemask(void *user, fz_pixmap *image, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
-static void fz_nullclipimagemask(void *user, fz_pixmap *image, fz_matrix ctm) {}
-static void fz_nullbeginmask(void *user, fz_rect r, int luminosity, fz_colorspace *colorspace, float *bc) {}
-static void fz_nullendmask(void *user) {}
-static void fz_nullbegingroup(void *user, fz_rect r, int isolated, int knockout, fz_blendmode blendmode, float alpha) {}
-static void fz_nullendgroup(void *user) {}
-static void fz_nullbegintile(void *user, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) {}
-static void fz_nullendtile(void *user) {}
+static void fz_null_free_user(void *user) {}
+static void fz_null_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
+static void fz_null_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
+static void fz_null_clip_path(void *user, fz_path *path, int even_odd, fz_matrix ctm) {}
+static void fz_null_clip_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm) {}
+static void fz_null_fill_text(void *user, fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
+static void fz_null_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
+static void fz_null_clip_text(void *user, fz_text *text, fz_matrix ctm, int accumulate) {}
+static void fz_null_clip_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm) {}
+static void fz_null_ignore_text(void *user, fz_text *text, fz_matrix ctm) {}
+static void fz_null_pop_clip(void *user) {}
+static void fz_null_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) {}
+static void fz_null_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) {}
+static void fz_null_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) {}
+static void fz_null_clip_image_mask(void *user, fz_pixmap *image, fz_matrix ctm) {}
+static void fz_null_begin_mask(void *user, fz_rect r, int luminosity, fz_colorspace *colorspace, float *bc) {}
+static void fz_null_end_mask(void *user) {}
+static void fz_null_begin_group(void *user, fz_rect r, int isolated, int knockout, fz_blendmode blendmode, float alpha) {}
+static void fz_null_end_group(void *user) {}
+static void fz_null_begin_tile(void *user, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm) {}
+static void fz_null_end_tile(void *user) {}
fz_device *
-fz_newdevice(void *user)
+fz_new_device(void *user)
{
fz_device *dev = fz_malloc(sizeof(fz_device));
memset(dev, 0, sizeof(fz_device));
@@ -31,41 +31,41 @@ fz_newdevice(void *user)
dev->hints = 0;
dev->user = user;
- dev->freeuser = fz_nullfreeuser;
+ dev->free_user = fz_null_free_user;
- dev->fillpath = fz_nullfillpath;
- dev->strokepath = fz_nullstrokepath;
- dev->clippath = fz_nullclippath;
- dev->clipstrokepath = fz_nullclipstrokepath;
+ dev->fill_path = fz_null_fill_path;
+ dev->stroke_path = fz_null_stroke_path;
+ dev->clip_path = fz_null_clip_path;
+ dev->clip_stroke_path = fz_null_clip_stroke_path;
- dev->filltext = fz_nullfilltext;
- dev->stroketext = fz_nullstroketext;
- dev->cliptext = fz_nullcliptext;
- dev->clipstroketext = fz_nullclipstroketext;
- dev->ignoretext = fz_nullignoretext;
+ dev->fill_text = fz_null_fill_text;
+ dev->stroke_text = fz_null_stroke_text;
+ dev->clip_text = fz_null_clip_text;
+ dev->clip_stroke_text = fz_null_clip_stroke_text;
+ dev->ignore_text = fz_null_ignore_text;
- dev->fillshade = fz_nullfillshade;
- dev->fillimage = fz_nullfillimage;
- dev->fillimagemask = fz_nullfillimagemask;
- dev->clipimagemask = fz_nullclipimagemask;
+ dev->fill_shade = fz_null_fill_shade;
+ dev->fill_image = fz_null_fill_image;
+ dev->fill_image_mask = fz_null_fill_image_mask;
+ dev->clip_image_mask = fz_null_clip_image_mask;
- dev->popclip = fz_nullpopclip;
+ dev->pop_clip = fz_null_pop_clip;
- dev->beginmask = fz_nullbeginmask;
- dev->endmask = fz_nullendmask;
- dev->begingroup = fz_nullbegingroup;
- dev->endgroup = fz_nullendgroup;
+ dev->begin_mask = fz_null_begin_mask;
+ dev->end_mask = fz_null_end_mask;
+ dev->begin_group = fz_null_begin_group;
+ dev->end_group = fz_null_end_group;
- dev->begintile = fz_nullbegintile;
- dev->endtile = fz_nullendtile;
+ dev->begin_tile = fz_null_begin_tile;
+ dev->end_tile = fz_null_end_tile;
return dev;
}
void
-fz_freedevice(fz_device *dev)
+fz_free_device(fz_device *dev)
{
- if (dev->freeuser)
- dev->freeuser(dev->user);
+ if (dev->free_user)
+ dev->free_user(dev->user);
fz_free(dev);
}