From 0805c1add0e3fc951d16c27d3837bc5123842303 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 21 Dec 2016 17:41:59 +0100 Subject: Strip extraneous blank lines. --- include/mupdf/fitz/buffer.h | 1 - include/mupdf/fitz/stream.h | 2 -- include/mupdf/helpers/mu-office-lib.h | 29 ---------------------------- include/mupdf/helpers/mu-threads.h | 1 - platform/android/viewer/jni/mupdf.c | 1 - platform/gl/gl-main.c | 1 - platform/ios/Classes/MuDocumentController.m | 1 - platform/ios/Classes/MuPageViewNormal.m | 1 - platform/java/mupdf_native.c | 6 ------ platform/x11/pdfapp.c | 3 --- platform/x11/win_main.c | 1 - platform/x11/x11_image.c | 1 - scripts/find-blanks.awk | 6 ++++++ source/fitz/bitmap.c | 1 - source/fitz/colorspace.c | 4 +--- source/fitz/draw-device.c | 1 - source/fitz/draw-glyph.c | 1 - source/fitz/fitz-imp.h | 1 - source/fitz/image.c | 1 - source/fitz/load-jpx.c | 1 - source/fitz/load-pnm.c | 2 -- source/fitz/store.c | 1 - source/fitz/string.c | 1 - source/fitz/svg-device.c | 1 - source/fitz/text.c | 2 -- source/gprf/gprf-skeleton.c | 1 - source/helpers/mu-office-lib/mu-office-lib.c | 15 -------------- source/html/html-layout.c | 2 -- source/pdf/pdf-annot-edit.c | 1 - source/pdf/pdf-colorspace.c | 1 - source/pdf/pdf-device.c | 1 - source/pdf/pdf-function.c | 1 - source/pdf/pdf-layer.c | 1 - source/pdf/pdf-object.c | 1 - source/pdf/pdf-op-filter.c | 1 - source/pdf/pdf-op-run.c | 1 - source/pdf/pdf-pkcs7.c | 1 - source/pdf/pdf-repair.c | 1 - source/pdf/pdf-shade.c | 4 ---- source/pdf/pdf-write.c | 5 ----- source/pdf/pdf-xref.c | 2 -- source/tools/mudraw.c | 2 -- source/tools/pdfextract.c | 1 - source/tools/pdfinfo.c | 2 -- 44 files changed, 7 insertions(+), 108 deletions(-) create mode 100644 scripts/find-blanks.awk diff --git a/include/mupdf/fitz/buffer.h b/include/mupdf/fitz/buffer.h index 70214b21..06aa53eb 100644 --- a/include/mupdf/fitz/buffer.h +++ b/include/mupdf/fitz/buffer.h @@ -157,5 +157,4 @@ void fz_md5_buffer(fz_context *ctx, fz_buffer *buffer, unsigned char digest[16]) */ size_t fz_buffer_extract(fz_context *ctx, fz_buffer *buf, unsigned char **data); - #endif diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h index 9baf0e0f..23a649bc 100644 --- a/include/mupdf/fitz/stream.h +++ b/include/mupdf/fitz/stream.h @@ -399,7 +399,6 @@ static inline unsigned int fz_read_rbits(fz_context *ctx, fz_stream *stm, int n) x = stm->bits & ((1 << n) - 1); stm->avail -= n; stm->bits = stm->bits >> n; - } else { @@ -412,7 +411,6 @@ static inline unsigned int fz_read_rbits(fz_context *ctx, fz_stream *stm, int n) while (n > 8) { - x = (fz_read_byte(ctx, stm) << used) | x; n -= 8; used += 8; diff --git a/include/mupdf/helpers/mu-office-lib.h b/include/mupdf/helpers/mu-office-lib.h index 1c856962..8d2afbb8 100644 --- a/include/mupdf/helpers/mu-office-lib.h +++ b/include/mupdf/helpers/mu-office-lib.h @@ -40,7 +40,6 @@ #include /* For size_t */ #include "mupdf/fitz.h" /* For fz_context/fz_document/fz_page */ - /** Error type returned from most MuOffice functions * * 0 means no error @@ -52,7 +51,6 @@ */ typedef int MuError; - /** Errors returned to MuOfficeLoadingErrorFn * * Other values may also be returned. @@ -80,7 +78,6 @@ typedef enum MuOfficeDocErrorType MuOfficeDocErrorType_PasswordRequest = 0x1000 } MuOfficeDocErrorType; - /** *Structure holding the detail of the layout of a bitmap. b5g6r5 is assumed. */ @@ -92,7 +89,6 @@ typedef struct MuOfficeBitmap_s int lineSkip; } MuOfficeBitmap; - /** * Structure defining a point * @@ -147,7 +143,6 @@ typedef struct MuOfficeRenderArea_s MuOfficeBox renderArea; } MuOfficeRenderArea; - typedef struct MuOfficeLib_s MuOfficeLib; typedef struct MuOfficeDoc_s MuOfficeDoc; typedef struct MuOfficePage_s MuOfficePage; @@ -165,7 +160,6 @@ typedef struct MuOfficeRender_s MuOfficeRender; typedef void *(MuOfficeAllocFn)(void *cookie, size_t size); - /** * Callback function monitoring document loading * @@ -184,7 +178,6 @@ typedef void (MuOfficeLoadingProgressFn)(void *cookie, int pagesLoaded, int complete); - /** * Callback function used to monitor errors in the process of loading * a document. @@ -196,8 +189,6 @@ typedef void (MuOfficeLoadingProgressFn)(void *cookie, typedef void (MuOfficeLoadingErrorFn)( void *cookie, MuOfficeDocErrorType error); - - /** * Callback function used to monitor page changes * @@ -231,7 +222,6 @@ typedef enum MuOfficeDocType_IMG } MuOfficeDocType; - /** * The possible results of a save operation */ @@ -243,7 +233,6 @@ typedef enum MuOfficeSaveResult } MuOfficeSaveResult; - /** * Callback function used to monitor save operations. * @@ -254,7 +243,6 @@ MuOfficeSaveResult; typedef void (MuOfficeSaveResultFn)( void *cookie, MuOfficeSaveResult result); - /** * Create a MuOfficeLib instance. * @@ -323,7 +311,6 @@ MuError MuOfficeLib_loadDocument(MuOfficeLib *mu, void *cookie, MuOfficeDoc **pDoc); - /** * Perform MuPDF native operations on a given MuOfficeLib * instance. @@ -341,7 +328,6 @@ MuError MuOfficeLib_loadDocument(MuOfficeLib *mu, */ MuError MuOfficeLib_run(MuOfficeLib *mu, void (*fn)(fz_context *ctx, void *arg), void *arg); - /** * Provide the password for a document * @@ -356,7 +342,6 @@ MuError MuOfficeLib_run(MuOfficeLib *mu, void (*fn)(fz_context *ctx, void *arg), */ int MuOfficeDoc_providePassword(MuOfficeDoc *doc, const char *password); - /** * Return the type of an open document * @@ -366,7 +351,6 @@ int MuOfficeDoc_providePassword(MuOfficeDoc *doc, const char *password); */ MuOfficeDocType MuOfficeDoc_docType(MuOfficeDoc *doc); - /** * Return the number of pages of a document * @@ -385,7 +369,6 @@ MuOfficeDocType MuOfficeDoc_docType(MuOfficeDoc *doc); */ MuError MuOfficeDoc_getNumPages(MuOfficeDoc *doc, int *pNumPages); - /** * Determine if the document has been modified * @@ -395,7 +378,6 @@ MuError MuOfficeDoc_getNumPages(MuOfficeDoc *doc, int *pNumPages); */ int MuOfficeDoc_hasBeenModified(MuOfficeDoc *doc); - /** * Start a save operation * @@ -411,7 +393,6 @@ MuError MuOfficeDoc_save(MuOfficeDoc *doc, MuOfficeSaveResultFn *resultFn, void *cookie); - /** * Stop a document loading. The document is not destroyed, but * no further content will be read from the file. @@ -420,7 +401,6 @@ MuError MuOfficeDoc_save(MuOfficeDoc *doc, */ void MuOfficeDoc_abortLoad(MuOfficeDoc *doc); - /** * Destroy a MuOfficeDoc object. Loading of the document is shutdown * and no further callbacks will be issued for the specified object. @@ -429,7 +409,6 @@ void MuOfficeDoc_abortLoad(MuOfficeDoc *doc); */ void MuOfficeDoc_destroy(MuOfficeDoc *doc); - /** * Get a page of a document * @@ -448,7 +427,6 @@ MuError MuOfficeDoc_getPage( MuOfficeDoc *doc, void *cookie, MuOfficePage **pPage); - /** * Perform MuPDF native operations on a given document. * @@ -475,7 +453,6 @@ MuError MuOfficeDoc_getPage( MuOfficeDoc *doc, */ MuError MuOfficeDoc_run(MuOfficeDoc *doc, void (*fn)(fz_context *ctx, fz_document *doc, void *arg), void *arg); - /** * Destroy a page object * @@ -487,7 +464,6 @@ MuError MuOfficeDoc_run(MuOfficeDoc *doc, void (*fn)(fz_context *ctx, fz_documen */ void MuOfficePage_destroy(MuOfficePage *page); - /** * Get the size of a page in pixels * @@ -506,7 +482,6 @@ MuError MuOfficePage_getSize( MuOfficePage *page, float *pWidth, float *pHeight); - /** * Return the zoom factors necessary to render at to a given * size in pixels. (deprecated) @@ -525,7 +500,6 @@ MuError MuOfficePage_calculateZoom( MuOfficePage *page, float *pXZoom, float *pYZoom); - /** * Get the size of a page in pixels for a specified zoom factor * (deprecated) @@ -546,7 +520,6 @@ MuError MuOfficePage_getSizeForZoom( MuOfficePage *page, int *pWidth, int *pHeight); - /** * Perform MuPDF native operations on a given page. * @@ -573,7 +546,6 @@ MuError MuOfficePage_getSizeForZoom( MuOfficePage *page, */ MuError MuOfficePage_run(MuOfficePage *page, void (*fn)(fz_context *ctx, fz_page *page, void *arg), void *arg); - /** * Schedule the rendering of an area of document page to * an area of a bitmap. @@ -609,7 +581,6 @@ MuError MuOfficePage_render( MuOfficePage *page, void *cookie, MuOfficeRender **pRender); - /** * Destroy a render * diff --git a/include/mupdf/helpers/mu-threads.h b/include/mupdf/helpers/mu-threads.h index 7cdd817b..77ee0b6c 100644 --- a/include/mupdf/helpers/mu-threads.h +++ b/include/mupdf/helpers/mu-threads.h @@ -168,7 +168,6 @@ void mu_lock_mutex(mu_mutex *mutex); */ void mu_unlock_mutex(mu_mutex *mutex); - /* Everything under this point is implementation specific. Only people looking to extend the capabilities of this diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c index 55bcfb7a..71477b32 100644 --- a/platform/android/viewer/jni/mupdf.c +++ b/platform/android/viewer/jni/mupdf.c @@ -1541,7 +1541,6 @@ JNI_FN(MuPDFCore_textAsHtml)(JNIEnv * env, jobject thiz) if (bArray == NULL) fz_throw(ctx, FZ_ERROR_GENERIC, "Failed to make byteArray"); (*env)->SetByteArrayRegion(env, bArray, 0, len, (const jbyte *)data); - } fz_always(ctx) { diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index f708c760..05f6e686 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -287,7 +287,6 @@ void render_page(void) break; } } - } static void push_history(void) diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index ba18dee2..2a070b71 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -692,7 +692,6 @@ static void saveDoc(const char *current_path, fz_document *doc) - (void) onTick: (id)sender { - for (UIView *view in canvas.subviews) { if (view.number == current) diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m index 73a6f756..4f8a9202 100644 --- a/platform/ios/Classes/MuPageViewNormal.m +++ b/platform/ios/Classes/MuPageViewNormal.m @@ -1012,7 +1012,6 @@ static void updatePixmap(fz_document *doc, fz_display_list *page_list, fz_displa [self layoutIfNeeded]; } - } - (void) willRotate diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 722444a2..c565f932 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -4730,7 +4730,6 @@ FUN(Page_textAsHtml)(JNIEnv *env, jobject self) fz_printf(ctx, out, "\n\n"); - } fz_always(ctx) { @@ -5164,7 +5163,6 @@ FUN(Buffer_writeBytesFrom)(JNIEnv *env, jobject self, jobject jbs, jint joff, ji jni_rethrow(env, ctx); } - JNIEXPORT void JNICALL FUN(Buffer_writeBuffer)(JNIEnv *env, jobject self, jobject jbuf) { @@ -5611,7 +5609,6 @@ FUN(StructuredText_getBlocks)(JNIEnv *env, jobject self) // add this char's bbox to the containing span's bbox fz_union_rect(&sbbox, &bbox); - } // set the span's bbox @@ -5657,7 +5654,6 @@ FUN(StructuredText_getBlocks)(JNIEnv *env, jobject self) return barr; } - /* PDFDocument interface */ JNIEXPORT void JNICALL @@ -6123,7 +6119,6 @@ FUN(PDFDocument_addStreamString)(JNIEnv *env, jobject self, jstring jbuf, jobjec return to_PDFObject_safe_own(ctx, env, self, ind); } - JNIEXPORT jobject JNICALL FUN(PDFDocument_addPageBuffer)(JNIEnv *env, jobject self, jobject jmediabox, jint rotate, jobject jresources, jobject jcontents) { @@ -6828,7 +6823,6 @@ FUN(PDFObject_writeRawStreamString)(JNIEnv *env, jobject self, jstring jstr) jni_rethrow(env, ctx); } - JNIEXPORT jobject JNICALL FUN(PDFObject_resolve)(JNIEnv *env, jobject self) { diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index f421f82f..2c4c8b78 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1194,7 +1194,6 @@ void pdfapp_onkey(pdfapp_t *app, int c, int modifiers) switch (c) { - case 'q': winclose(app); break; @@ -1506,7 +1505,6 @@ void pdfapp_onkey(pdfapp_t *app, int c, int modifiers) pdfapp_search_in_direction(app, &panto, 1); loadpage = 0; break; - } if (c < '0' || c > '9') @@ -1886,7 +1884,6 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta app->selr.y1 = fz_maxi(app->sely, y) - app->pany + irect.y0; winrepaint(app); } - } void pdfapp_oncopy(pdfapp_t *app, unsigned short *ucsbuf, int ucslen) diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index e004380d..6a0d8a00 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1172,7 +1172,6 @@ viewproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_APP: pdfapp_reloadpage(&gapp); break; - } fflush(stdout); diff --git a/platform/x11/x11_image.c b/platform/x11/x11_image.c index 329a58b8..96bd298f 100644 --- a/platform/x11/x11_image.c +++ b/platform/x11/x11_image.c @@ -211,7 +211,6 @@ make_colormap(void) static void select_mode(void) { - int byteorder; int byterev; unsigned long rm, gm, bm; diff --git a/scripts/find-blanks.awk b/scripts/find-blanks.awk new file mode 100644 index 00000000..1d00609f --- /dev/null +++ b/scripts/find-blanks.awk @@ -0,0 +1,6 @@ +BEGIN { last_char = "x"; } +/^$/ { if (last_char == "{") print(FILENAME, FNR); last_char = " "; next; } +/^\s*{$/ { last_char = "{"; next; } +/ {$/ { last_char = "{"; next; } +/^\s*}$/ { if (last_char == " ") print(FILENAME, FNR); last_char = "}"; next; } + { last_char = "x"; } diff --git a/source/fitz/bitmap.c b/source/fitz/bitmap.c index f26cf935..046e7aa0 100644 --- a/source/fitz/bitmap.c +++ b/source/fitz/bitmap.c @@ -402,7 +402,6 @@ fz_band_writer *fz_new_pbm_band_writer(fz_context *ctx, fz_output *out) return writer; } - fz_band_writer *fz_new_pkm_band_writer(fz_context *ctx, fz_output *out) { fz_band_writer *writer = fz_new_band_writer(ctx, fz_band_writer, out); diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 63032951..21517db2 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -2097,9 +2097,7 @@ typedef struct fz_cached_color_converter { fz_color_converter base; fz_hash_table *hash; - -} -fz_cached_color_converter; +} fz_cached_color_converter; static void fz_cached_color_convert(fz_context *ctx, fz_color_converter *cc_, float *ds, const float *ss) { diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index c15a5296..739ee3bd 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -1458,7 +1458,6 @@ fz_draw_fill_image_mask(fz_context *ctx, fz_device *devp, fz_image *image, const fz_paint_image_with_color(state->dest, &state->scissor, state->shape, pixmap, &local_ctm, colorbv, !(devp->hints & FZ_DONT_INTERPOLATE_IMAGES), devp->flags & FZ_DEVFLAG_GRIDFIT_AS_TILED); - if (state->blendmode & FZ_BLEND_KNOCKOUT) fz_knockout_end(ctx, dev); } diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c index b3d4cb4c..bfd0af40 100644 --- a/source/fitz/draw-glyph.c +++ b/source/fitz/draw-glyph.c @@ -385,7 +385,6 @@ fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colo #endif drop_glyph_cache_entry(ctx, cache->lru_tail); } - } } unlock_and_return_val: diff --git a/source/fitz/fitz-imp.h b/source/fitz/fitz-imp.h index 169f422e..6cf488d1 100644 --- a/source/fitz/fitz-imp.h +++ b/source/fitz/fitz-imp.h @@ -89,5 +89,4 @@ void fz_new_output_context(fz_context *ctx); void fz_drop_output_context(fz_context *ctx); fz_output_context *fz_keep_output_context(fz_context *ctx); - #endif diff --git a/source/fitz/image.c b/source/fitz/image.c index 2d18a87b..c7bbb3ad 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -500,7 +500,6 @@ pixmap_image_get_pixmap(fz_context *ctx, fz_image *image_, fz_irect *subarea, in * a pointer to the original 'tile'. */ return fz_keep_pixmap(ctx, image->tile); /* That's all we can give you! */ - } static void diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index 7f9e9734..ef99d154 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -178,7 +178,6 @@ jpx_write(unsigned char * pucData, short sComponent, unsigned long ulRow, v -= sign; *p = v << (8 - bps); } - } p += n; diff --git a/source/fitz/load-pnm.c b/source/fitz/load-pnm.c index 5c8fad61..21bf939c 100644 --- a/source/fitz/load-pnm.c +++ b/source/fitz/load-pnm.c @@ -111,7 +111,6 @@ pnm_read_white(fz_context *ctx, unsigned char *p, unsigned char *e, int single_l if (p < e && iseol(*p)) p++; } - } return p; @@ -295,7 +294,6 @@ pnm_ascii_read_image(fz_context *ctx, struct info *pnm, unsigned char *p, unsign *dp++ = map_color(ctx, v, pnm->maxval, 255); } } - } return img; diff --git a/source/fitz/store.c b/source/fitz/store.c index c85ceab2..c9a07428 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -166,7 +166,6 @@ do_reap(fz_context *ctx) item->type->drop_key(ctx, item->key); fz_free(ctx, item); } - } void fz_drop_key_storable(fz_context *ctx, const fz_key_storable *sc) diff --git a/source/fitz/string.c b/source/fitz/string.c index e9d8b086..e406cb03 100644 --- a/source/fitz/string.c +++ b/source/fitz/string.c @@ -183,7 +183,6 @@ fz_format_output_path(fz_context *ctx, char *path, size_t size, const char *fmt, while (i > 0) path[n++] = num[--i]; fz_strlcpy(path + n, p, size - n); - } #define SEP(x) ((x)=='/' || (x) == 0) diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index 571ced0e..0d01ae64 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -979,7 +979,6 @@ svg_dev_end_mask(fz_context *ctx, fz_device *dev) fz_printf(ctx, out, "\"/>\n"); out = end_def(ctx, sdev); fz_printf(ctx, out, "\n", mask); - } static void diff --git a/source/fitz/text.c b/source/fitz/text.c index a0e2abc8..454963b0 100644 --- a/source/fitz/text.c +++ b/source/fitz/text.c @@ -150,7 +150,6 @@ fz_bound_text(fz_context *ctx, const fz_text *text, const fz_stroke_state *strok fz_union_rect(bbox, &gbox); } } - } } @@ -199,7 +198,6 @@ fz_clone_text(fz_context *ctx, const fz_text *text) new_span->items = fz_malloc(ctx, span->len * sizeof(*span->items)); memcpy(new_span->items, span->items, span->len * sizeof(*span->items)); span = span->next; - } } fz_catch(ctx) diff --git a/source/gprf/gprf-skeleton.c b/source/gprf/gprf-skeleton.c index 8393ff0f..23a50fbe 100644 --- a/source/gprf/gprf-skeleton.c +++ b/source/gprf/gprf-skeleton.c @@ -52,7 +52,6 @@ fz_save_gproof(fz_context *ctx, const char *pdf_file, fz_document *doc, const ch fz_write(ctx, out, pdf_file, strlen(pdf_file)+1); fz_write(ctx, out, print_profile, strlen(print_profile) + 1); fz_write(ctx, out, display_profile, strlen(display_profile) + 1); - } fz_always(ctx) { diff --git a/source/helpers/mu-office-lib/mu-office-lib.c b/source/helpers/mu-office-lib/mu-office-lib.c index e2e5f6f5..b21ca976 100644 --- a/source/helpers/mu-office-lib/mu-office-lib.c +++ b/source/helpers/mu-office-lib/mu-office-lib.c @@ -165,7 +165,6 @@ static fz_locks_context *init_muoffice_locks(MuOfficeLib *mu) return &mu->locks; } - MuError MuOfficeLib_create(MuOfficeLib **pMu) { MuOfficeLib *mu; @@ -220,7 +219,6 @@ void MuOfficeLib_destroy(MuOfficeLib *mu) Pal_Mem_free(mu); } - /** * Perform MuPDF native operations on a given MuOfficeLib * instance. @@ -486,7 +484,6 @@ int MuOfficeDoc_providePassword(MuOfficeDoc *doc, const char *password) return MuError_OK; } - /** * Return the type of an open document * @@ -499,7 +496,6 @@ MuOfficeDocType MuOfficeDoc_docType(MuOfficeDoc *doc) return /* FIXME */MuOfficeDocType_PDF; } - static void ensure_doc_loaded(MuOfficeDoc *doc) { @@ -509,7 +505,6 @@ ensure_doc_loaded(MuOfficeDoc *doc) mu_destroy_thread(&doc->thread); } - /** * Return the number of pages of a document * @@ -553,7 +548,6 @@ MuError MuOfficeDoc_getNumPages(MuOfficeDoc *doc, int *pNumPages) return err; } - /** * Determine if the document has been modified * @@ -586,7 +580,6 @@ int MuOfficeDoc_hasBeenModified(MuOfficeDoc *doc) return modified; } - /** * Start a save operation * @@ -605,7 +598,6 @@ MuError MuOfficeDoc_save( MuOfficeDoc *doc, return MuError_NotImplemented; /* FIXME */ } - /** * Stop a document loading. The document is not destroyed, but * no further content will be read from the file. @@ -624,7 +616,6 @@ void MuOfficeDoc_abortLoad(MuOfficeDoc *doc) mu_trigger_semaphore(&doc->password_sem); } - /** * Destroy a MuOfficeDoc object. Loading of the document is shutdown * and no further callbacks will be issued for the specified object. @@ -703,7 +694,6 @@ MuError MuOfficeDoc_getPage( MuOfficeDoc *doc, return err; } - /** * Perform MuPDF native operations on a given document. * @@ -758,7 +748,6 @@ MuError MuOfficeDoc_run(MuOfficeDoc *doc, void (*fn)(fz_context *ctx, fz_documen return err; } - /** * Destroy a page object * @@ -789,7 +778,6 @@ void MuOfficePage_destroy(MuOfficePage *page) fz_free(doc->ctx, page); } - /** * Get the size of a page in pixels * @@ -830,7 +818,6 @@ MuError MuOfficePage_getSize( MuOfficePage *page, return MuError_OK; } - /** * Return the zoom factors necessary to render at to a given * size in pixels. (deprecated) @@ -874,7 +861,6 @@ MuError MuOfficePage_calculateZoom( MuOfficePage *page, return MuError_OK; } - /** * Get the size of a page in pixels for a specified zoom factor * (deprecated) @@ -1056,7 +1042,6 @@ fail: fz_drop_context(ctx); } - /** * Schedule the rendering of an area of document page to * an area of a bitmap. diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 379cd3e8..91297f10 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -734,7 +734,6 @@ static void generate_boxes(fz_context *ctx, fz_xml *node, fz_html_box *top, if (href) box->href = fz_pool_strdup(ctx, g->pool, href); } - } else { @@ -2423,7 +2422,6 @@ static void fragment_cb(const uint32_t *fragment, if (data->flow->type == FLOW_SPACE) { len = 1; - } else if (data->flow->type == FLOW_BREAK || data->flow->type == FLOW_SBREAK || data->flow->type == FLOW_SHYPHEN || data->flow->type == FLOW_ANCHOR) diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c index 09937c5e..fc6629c1 100644 --- a/source/pdf/pdf-annot-edit.c +++ b/source/pdf/pdf-annot-edit.c @@ -358,7 +358,6 @@ pdf_set_annot_interior_color(fz_context *ctx, pdf_annot *annot, int n, const flo pdf_set_annot_color_imp(ctx, annot, PDF_NAME_IC, n, color); } - int pdf_annot_quad_point_count(fz_context *ctx, pdf_annot *annot) { pdf_obj *quad_points = pdf_dict_get(ctx, annot->obj, PDF_NAME_QuadPoints); diff --git a/source/pdf/pdf-colorspace.c b/source/pdf/pdf-colorspace.c index 18a4aa17..bfdaf6e9 100644 --- a/source/pdf/pdf-colorspace.c +++ b/source/pdf/pdf-colorspace.c @@ -203,7 +203,6 @@ load_indexed(fz_context *ctx, pdf_document *doc, pdf_obj *array) static fz_colorspace * pdf_load_colorspace_imp(fz_context *ctx, pdf_document *doc, pdf_obj *obj) { - if (pdf_obj_marked(ctx, obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "Recursion in colorspace definition"); diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c index f2fd75fc..6c02377c 100644 --- a/source/pdf/pdf-device.c +++ b/source/pdf/pdf-device.c @@ -145,7 +145,6 @@ pdf_dev_stroke_state(fz_context *ctx, pdf_device *pdev, const fz_stroke_state *s for (i = 0; i < stroke_state->dash_len; i++) fz_buffer_printf(ctx, gs->buf, "%c%f", (i == 0 ? '[' : ' '), stroke_state->dash_list[i]); fz_buffer_printf(ctx, gs->buf, "]%f d\n", stroke_state->dash_phase); - } fz_drop_stroke_state(ctx, gs->stroke_state); gs->stroke_state = fz_keep_stroke_state(ctx, stroke_state); diff --git a/source/pdf/pdf-function.c b/source/pdf/pdf-function.c index b319dd97..db76ba4b 100644 --- a/source/pdf/pdf-function.c +++ b/source/pdf/pdf-function.c @@ -138,7 +138,6 @@ pdf_print_ps_stack(fz_context *ctx, fz_output *out, ps_stack *st) } fz_printf(ctx, out, "\n"); - } static void diff --git a/source/pdf/pdf-layer.c b/source/pdf/pdf-layer.c index fc29c9d3..d86f16af 100644 --- a/source/pdf/pdf-layer.c +++ b/source/pdf/pdf-layer.c @@ -79,7 +79,6 @@ pdf_count_layer_configs(fz_context *ctx, pdf_document *doc) return doc->ocg->num_configs; } - static int count_entries(fz_context *ctx, pdf_obj *obj) { diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index 8d2e2ae4..81a29bc7 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -523,7 +523,6 @@ pdf_objcmp(fz_context *ctx, pdf_obj *a, pdf_obj *b) return 1; } return 0; - } return 1; } diff --git a/source/pdf/pdf-op-filter.c b/source/pdf/pdf-op-filter.c index f5a0958d..e3cbf4ce 100644 --- a/source/pdf/pdf-op-filter.c +++ b/source/pdf/pdf-op-filter.c @@ -1122,7 +1122,6 @@ pdf_drop_filter_processor(fz_context *ctx, pdf_processor *proc) pdf_processor * pdf_new_filter_processor(fz_context *ctx, pdf_processor *chain, pdf_document *doc, pdf_obj *old_rdb, pdf_obj *new_rdb) { - pdf_filter_processor *proc = pdf_new_processor(ctx, sizeof *proc); { proc->super.drop_processor = pdf_drop_filter_processor; diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 29031657..a3ea895d 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -530,7 +530,6 @@ pdf_show_image(fz_context *ctx, pdf_run_processor *pr, fz_image *image) if (!image->colorspace) { - switch (gstate->fill.kind) { case PDF_MAT_NONE: diff --git a/source/pdf/pdf-pkcs7.c b/source/pdf/pdf-pkcs7.c index fabe796f..b2139146 100644 --- a/source/pdf/pdf-pkcs7.c +++ b/source/pdf/pdf-pkcs7.c @@ -694,7 +694,6 @@ int pdf_check_signature(fz_context *ctx, pdf_document *doc, pdf_widget *widget, res = 0; fz_strlcpy(ebuf, "Not signed", ebufsize); } - } fz_always(ctx) { diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c index a68800d0..88c0be55 100644 --- a/source/pdf/pdf-repair.c +++ b/source/pdf/pdf-repair.c @@ -508,7 +508,6 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) num = 0; gen = 0; } - } if (listlen == 0) diff --git a/source/pdf/pdf-shade.c b/source/pdf/pdf-shade.c index dd0a9e0a..1689fcfc 100644 --- a/source/pdf/pdf-shade.c +++ b/source/pdf/pdf-shade.c @@ -252,7 +252,6 @@ pdf_load_mesh_params(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob static void pdf_load_type4_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_obj *dict, int funcs, fz_function **func) { - pdf_load_mesh_params(ctx, doc, shade, dict); if (funcs > 0) @@ -264,7 +263,6 @@ pdf_load_type4_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob static void pdf_load_type5_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_obj *dict, int funcs, fz_function **func) { - pdf_load_mesh_params(ctx, doc, shade, dict); if (funcs > 0) @@ -278,7 +276,6 @@ pdf_load_type5_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob static void pdf_load_type6_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_obj *dict, int funcs, fz_function **func) { - pdf_load_mesh_params(ctx, doc, shade, dict); if (funcs > 0) @@ -290,7 +287,6 @@ pdf_load_type6_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob static void pdf_load_type7_shade(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_obj *dict, int funcs, fz_function **func) { - pdf_load_mesh_params(ctx, doc, shade, dict); if (funcs > 0) diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index 645d0539..94379f4e 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -160,7 +160,6 @@ page_objects_create(fz_context *ctx) po->cap = initial_cap; po->len = 0; return po; - } static void @@ -931,7 +930,6 @@ static void page_objects_list_renumber(pdf_write_state *opts) static void mark_all(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, pdf_obj *val, int flag, int page) { - if (pdf_mark_obj(ctx, val)) return; @@ -981,7 +979,6 @@ mark_all(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, pdf_obj *val static int mark_pages(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, pdf_obj *val, int pagenum) { - if (pdf_mark_obj(ctx, val)) return pagenum; @@ -1593,7 +1590,6 @@ static void addhexfilter(fz_context *ctx, pdf_document *doc, pdf_obj *dict) pdf_dict_put(ctx, dict, PDF_NAME_Filter, f); if (dp) pdf_dict_put(ctx, dict, PDF_NAME_DecodeParms, dp); - } fz_always(ctx) { @@ -1602,7 +1598,6 @@ static void addhexfilter(fz_context *ctx, pdf_document *doc, pdf_obj *dict) } fz_catch(ctx) fz_rethrow(ctx); - } static fz_buffer *deflatebuf(fz_context *ctx, unsigned char *p, size_t n) diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index b20aaee4..88182adf 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -1812,7 +1812,6 @@ pdf_obj_read(fz_context *ctx, pdf_document *doc, fz_off_t *offset, int *nump, pd static void pdf_load_hinted_page(fz_context *ctx, pdf_document *doc, int pagenum) { - if (!doc->hints_loaded || !doc->linear_page_refs) return; @@ -1836,7 +1835,6 @@ pdf_load_hinted_page(fz_context *ctx, pdf_document *doc, int pagenum) fz_rethrow_if(ctx, FZ_ERROR_TRYLATER); /* Silently swallow the error and proceed as normal */ } - } static int diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 16163b3e..95b3440b 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -1196,7 +1196,6 @@ static inline int iswhite(int ch) ch == '\014' || ch == '\015' || ch == '\040'; } - static void apply_layer_config(fz_context *ctx, fz_document *doc, const char *lc) { pdf_document *pdoc = pdf_specifics(ctx, doc); @@ -1290,7 +1289,6 @@ static void apply_layer_config(fz_context *ctx, fz_document *doc, const char *lc } } - #ifdef MUDRAW_STANDALONE int main(int argc, char **argv) #else diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c index ff26229d..4104cc20 100644 --- a/source/tools/pdfextract.c +++ b/source/tools/pdfextract.c @@ -130,7 +130,6 @@ static void saveimage(int num) } fz_catch(ctx) fz_rethrow(ctx); - } static void savefont(pdf_obj *dict, int num) diff --git a/source/tools/pdfinfo.c b/source/tools/pdfinfo.c index e9821824..e6b37709 100644 --- a/source/tools/pdfinfo.c +++ b/source/tools/pdfinfo.c @@ -650,8 +650,6 @@ gatherresourceinfo(fz_context *ctx, globals *glo, int page, pdf_obj *rsrc, int s pdf_unmark_obj(ctx, rsrc); fz_catch(ctx) fz_rethrow(ctx); - - } static void -- cgit v1.2.3