diff options
Diffstat (limited to 'backend')
28 files changed, 0 insertions, 128 deletions
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c index d799b208..ed02a35c 100644 --- a/backend/comics/comics-document.c +++ b/backend/comics/comics-document.c @@ -126,7 +126,6 @@ static void render_pixbuf_size_prepared_cb (GdkPixbufLoader *loader, static char** extract_argv (EvDocument *document, gint page); - EV_BACKEND_REGISTER_WITH_CODE (ComicsDocument, comics_document, { EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, @@ -186,7 +185,6 @@ comics_regex_quote (const gchar *unquoted_string) return g_string_free (dest, FALSE); } - /* This function manages the command for decompressing a comic book */ static gboolean comics_decompress_temp_dir (const gchar *command_decompress_tmp, @@ -627,7 +625,6 @@ comics_document_load (EvDocument *document, return TRUE; } - static gboolean comics_document_save (EvDocument *document, const char *uri, diff --git a/backend/djvu/djvu-document.c b/backend/djvu/djvu-document.c index b3e41a8d..9ed327ad 100644 --- a/backend/djvu/djvu-document.c +++ b/backend/djvu/djvu-document.c @@ -66,7 +66,6 @@ EV_BACKEND_REGISTER_WITH_CODE (DjvuDocument, djvu_document, EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION, djvu_selection_iface_init); }); - #define EV_DJVU_ERROR ev_djvu_error_quark () static GQuark @@ -256,7 +255,6 @@ djvu_document_load (EvDocument *document, return TRUE; } - static gboolean djvu_document_save (EvDocument *document, const char *uri, @@ -676,7 +674,6 @@ djvu_document_find_find_text (EvDocumentFind *document, r->y2 = height - tmp * SCALE_FACTOR; } - return matches; } diff --git a/backend/djvu/djvu-links.c b/backend/djvu/djvu-links.c index da871dac..03da5983 100644 --- a/backend/djvu/djvu-links.c +++ b/backend/djvu/djvu-links.c @@ -181,7 +181,6 @@ build_tree (const DjvuDocument *djvu_document, if (!string_from_miniexp (miniexp_car (iter), &title)) goto unknown_entry; if (!string_from_miniexp (miniexp_cadr (iter), &link_dest)) goto unknown_entry; - if (!g_utf8_validate (title, -1, NULL)) { utf8_title = str_to_utf8 (title); title_markup = g_markup_escape_text (utf8_title, -1); @@ -342,7 +341,6 @@ get_djvu_hyperlink_mapping (DjvuDocument *djvu_document, return NULL; } - gboolean djvu_links_has_document_links (EvDocumentLinks *document_links) { diff --git a/backend/djvu/djvu-text-page.c b/backend/djvu/djvu-text-page.c index 6cbf54e6..72813bd4 100644 --- a/backend/djvu/djvu-text-page.c +++ b/backend/djvu/djvu-text-page.c @@ -23,7 +23,6 @@ #include <libdjvu/miniexp.h> #include "djvu-text-page.h" - /** * djvu_text_page_selection_process: * @page: #DjvuTextPage instance @@ -117,7 +116,6 @@ djvu_text_page_limits_process (DjvuTextPage *page, } } - static void djvu_text_page_limits (DjvuTextPage *page, miniexp_t p, @@ -404,7 +402,6 @@ djvu_text_page_search (DjvuTextPage *page, g_free (search_text); } - /** * djvu_text_page_prepare_search: * @page: #DjvuTextPage instance diff --git a/backend/djvu/djvu-text-page.h b/backend/djvu/djvu-text-page.h index a25284f5..ed8f3c7a 100644 --- a/backend/djvu/djvu-text-page.h +++ b/backend/djvu/djvu-text-page.h @@ -25,7 +25,6 @@ #include <glib.h> #include <libdjvu/miniexp.h> - typedef struct _DjvuTextPage DjvuTextPage; typedef struct _DjvuTextLink DjvuTextLink; diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c index 1a84fe72..7971b662 100644 --- a/backend/dvi/dvi-document.c +++ b/backend/dvi/dvi-document.c @@ -110,7 +110,6 @@ dvi_document_load (EvDocument *document, mdvi_cairo_device_init (&dvi_document->context->device); - dvi_document->base_width = dvi_document->context->dvi_page_w * dvi_document->context->params.conv + 2 * unit2pix(dvi_document->params->dpi, MDVI_HMARGIN) / dvi_document->params->hshrink; @@ -123,7 +122,6 @@ dvi_document_load (EvDocument *document, return TRUE; } - static gboolean dvi_document_save (EvDocument *document, const char *uri, diff --git a/backend/dvi/fonts.c b/backend/dvi/fonts.c index 7c15f8d7..903eefa9 100644 --- a/backend/dvi/fonts.c +++ b/backend/dvi/fonts.c @@ -54,4 +54,3 @@ void mdvi_register_fonts (void) return; } - diff --git a/backend/dvi/mdvi-lib/afmparse.c b/backend/dvi/mdvi-lib/afmparse.c index f8d840b7..f01042d2 100644 --- a/backend/dvi/mdvi-lib/afmparse.c +++ b/backend/dvi/mdvi-lib/afmparse.c @@ -81,13 +81,10 @@ #define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0) - - /*************************** GLOBALS ***********************/ static char *ident = NULL; /* storage buffer for keywords */ - /* "shorts" for fast case statement * The values of each of these enumerated items correspond to an entry in the * table of strings defined below. Therefore, if you add a new string as @@ -175,7 +172,6 @@ static char *token(FILE *stream) } /* token */ - /*************************** linetoken *************************/ /* "linetoken" will get read all tokens until the EOL character from @@ -203,7 +199,6 @@ static char *linetoken(FILE *stream) } /* linetoken */ - /*************************** recognize *************************/ /* This function tries to match a string to a known list of @@ -234,7 +229,6 @@ static enum parseKey recognize(char *ident) } /* recognize */ - /************************* parseGlobals *****************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -401,8 +395,6 @@ static BOOL parseGlobals(FILE *fp, GlobalFontInfo *gfi) } /* parseGlobals */ - - #if 0 /* this function does not seem to be used anywhere */ /************************* initializeArray ************************/ @@ -584,7 +576,6 @@ static int parseCharWidths(FILE *fp, int *cwi) } /* parseCharWidths */ - /************************* parseCharMetrics ************************/ /* This function is called by parseFile if the caller of parseFile @@ -694,8 +685,6 @@ static int parseCharMetrics(FILE *fp, FontInfo *fi) } /* parseCharMetrics */ - - /************************* parseTrackKernData ***********************/ /* This function is called by "parseFile". It will parse the AFM File @@ -797,7 +786,6 @@ static int parseTrackKernData(FILE *fp, FontInfo *fi) } /* parseTrackKernData */ - /************************* parsePairKernData ************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -918,7 +906,6 @@ static int parsePairKernData(FILE *fp, FontInfo *fi) } /* parsePairKernData */ - /************************* parseCompCharData **************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -1043,12 +1030,8 @@ static int parseCompCharData(FILE *fp, FontInfo *fi) } /* parseCompCharData */ - - - /*************************** 'PUBLIC' FUNCTION ********************/ - /*************************** parseFile *****************************/ /* parseFile is the only 'public' procedure available. It is called @@ -1078,7 +1061,6 @@ extern int afm_parse_file(FILE *fp, FontInfo **fi, FLAGS flags) register char *keyword; /* used to store a token */ - /* storage data for the global variable ident */ ident = (char *) calloc(MAX_NAME, sizeof(char)); if (ident == NULL) {error = storageProblem; return(error);} diff --git a/backend/dvi/mdvi-lib/bitmap.c b/backend/dvi/mdvi-lib/bitmap.c index de1de6a7..877aef5d 100644 --- a/backend/dvi/mdvi-lib/bitmap.c +++ b/backend/dvi/mdvi-lib/bitmap.c @@ -117,7 +117,6 @@ static Uchar bit_swap[] = { 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; - /* * next we have three bitmap functions to convert bitmaps in LSB bit order * with 8, 16 and 32 bits per unit, to our internal format. The differences @@ -192,7 +191,6 @@ BITMAP *bitmap_convert_msb8(Uchar *data, int w, int h, int stride) return bm; } - BITMAP *bitmap_copy(BITMAP *bm) { BITMAP *nb = bitmap_alloc(bm->width, bm->height); diff --git a/backend/dvi/mdvi-lib/color.c b/backend/dvi/mdvi-lib/color.c index ef6036a9..ced9ac0c 100644 --- a/backend/dvi/mdvi-lib/color.c +++ b/backend/dvi/mdvi-lib/color.c @@ -79,7 +79,6 @@ static int cc_entries; #define GAMMA_DIFF 0.005 - /* create a color table */ Ulong *get_color_table(DviDevice *dev, int nlevels, Ulong fg, Ulong bg, double gamma, int density) diff --git a/backend/dvi/mdvi-lib/color.h b/backend/dvi/mdvi-lib/color.h index cbc3c0ef..c87c4dcf 100644 --- a/backend/dvi/mdvi-lib/color.h +++ b/backend/dvi/mdvi-lib/color.h @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef _COLOR_H_ #define _COLOR_H_ diff --git a/backend/dvi/mdvi-lib/fontmap.c b/backend/dvi/mdvi-lib/fontmap.c index 36111bd5..24b497bb 100644 --- a/backend/dvi/mdvi-lib/fontmap.c +++ b/backend/dvi/mdvi-lib/fontmap.c @@ -834,7 +834,6 @@ int mdvi_add_fontmap_file(const char *name, const char *fullpath) return 0; } - void mdvi_flush_encodings(void) { DviEncoding *enc; diff --git a/backend/dvi/mdvi-lib/hash.c b/backend/dvi/mdvi-lib/hash.c index 3327fa58..693f67f6 100644 --- a/backend/dvi/mdvi-lib/hash.c +++ b/backend/dvi/mdvi-lib/hash.c @@ -21,7 +21,6 @@ /* simple hash tables for MDVI */ - struct _DviHashBucket { DviHashBucket *next; DviHashKey key; diff --git a/backend/dvi/mdvi-lib/hash.h b/backend/dvi/mdvi-lib/hash.h index b10afd60..ed1cdfb0 100644 --- a/backend/dvi/mdvi-lib/hash.h +++ b/backend/dvi/mdvi-lib/hash.h @@ -3,7 +3,6 @@ /* Hash tables */ - typedef struct _DviHashBucket DviHashBucket; typedef struct _DviHashTable DviHashTable; @@ -18,7 +17,6 @@ typedef Ulong (*DviHashFunc) __PROTO((DviHashKey key)); typedef int (*DviHashComp) __PROTO((DviHashKey key1, DviHashKey key2)); typedef void (*DviHashFree) __PROTO((DviHashKey key, void *data)); - struct _DviHashTable { DviHashBucket **buckets; int nbucks; diff --git a/backend/dvi/mdvi-lib/mdvi.h b/backend/dvi/mdvi-lib/mdvi.h index a05f9278..a0857f3f 100644 --- a/backend/dvi/mdvi-lib/mdvi.h +++ b/backend/dvi/mdvi-lib/mdvi.h @@ -414,7 +414,6 @@ struct _DviRange { int step; /* step */ }; - typedef void (*DviSpecialHandler) __PROTO((DviContext *dvi, const char *prefix, const char *arg)); @@ -600,7 +599,6 @@ extern int font_free_unused __PROTO((DviDevice *)); extern int mdvi_encode_font __PROTO((DviParams *, DviFont *)); - /* font lookup functions */ extern int mdvi_register_font_type __PROTO((DviFontInfo *, int)); extern char **mdvi_list_font_class __PROTO((int)); diff --git a/backend/dvi/mdvi-lib/paper.h b/backend/dvi/mdvi-lib/paper.h index d42ee079..0eb2c938 100644 --- a/backend/dvi/mdvi-lib/paper.h +++ b/backend/dvi/mdvi-lib/paper.h @@ -24,7 +24,6 @@ struct _DviPaperSpec { const char *height; }; - extern int mdvi_get_paper_size __PROTO((const char *, DviPaper *)); extern DviPaperSpec* mdvi_get_paper_specs __PROTO((DviPaperClass)); extern void mdvi_free_paper_specs __PROTO((DviPaperSpec *)); diff --git a/backend/dvi/mdvi-lib/special.c b/backend/dvi/mdvi-lib/special.c index 64a1647b..93dd390e 100644 --- a/backend/dvi/mdvi-lib/special.c +++ b/backend/dvi/mdvi-lib/special.c @@ -212,7 +212,6 @@ void mdvi_flush_specials(void) { DviSpecial *sp, *list; - for(list = (DviSpecial *)specials.head; (sp = list); ) { list = sp->next; if(sp->prefix) mdvi_free(sp->prefix); diff --git a/backend/dvi/mdvi-lib/tfmfile.c b/backend/dvi/mdvi-lib/tfmfile.c index f7ba251f..52259dfb 100644 --- a/backend/dvi/mdvi-lib/tfmfile.c +++ b/backend/dvi/mdvi-lib/tfmfile.c @@ -258,7 +258,6 @@ int tfm_load_file(const char *filename, TFMInfo *info) /* allocate characters */ info->chars = xnalloc(TFMChar, size); - #ifdef WORD_LITTLE_ENDIAN /* byte-swap the three arrays at once (they are consecutive in memory) */ swap_array((Uint32 *)widths, nw + nh + nd); diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c index 52530f47..979b50a0 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -224,7 +224,6 @@ epub_document_links_has_document_links(EvDocumentLinks *document_links) return TRUE; } - typedef struct _LinksCBStruct { GtkTreeModel *model; GtkTreeIter *parent; @@ -413,7 +412,6 @@ epub_remove_temporary_dir (gchar *path_name) return (g_remove (path_name)); } - static gboolean check_mime_type (const gchar* uri, GError** error); @@ -1546,7 +1544,6 @@ epub_document_check_add_night_sheet(EvDocument *document) gchar *csspath = g_strdup_printf("%s/atrilnightstyle.css",epub_document->documentdir); - GFile *styles = g_file_new_for_path (csspath); GOutputStream *outstream = (GOutputStream*)g_file_create(styles,G_FILE_CREATE_PRIVATE,NULL,NULL); if ( g_output_stream_write((GOutputStream*)outstream,style,strlen(style),NULL,NULL) == -1 ) @@ -1620,7 +1617,6 @@ epub_document_set_index_pages(GList *index,GList *contentList) g_list_foreach(index,(GFunc)page_set_function,contentList); } - static void add_mathjax_script_node_to_file(gchar *filename, gchar *data) { @@ -1768,7 +1764,6 @@ epub_document_init (EpubDocument *epub_document) epub_document->docTitle = NULL; } - static void epub_document_finalize (GObject *object) { @@ -1810,7 +1805,6 @@ epub_document_finalize (GObject *object) G_OBJECT_CLASS (epub_document_parent_class)->finalize (object); } - static void epub_document_class_init (EpubDocumentClass *klass) { diff --git a/backend/epub/minizip/ioapi.c b/backend/epub/minizip/ioapi.c index 7f5c191b..c20d20e3 100644 --- a/backend/epub/minizip/ioapi.c +++ b/backend/epub/minizip/ioapi.c @@ -25,7 +25,6 @@ #define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) #endif - #include "ioapi.h" voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) @@ -82,8 +81,6 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; } - - static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); @@ -128,7 +125,6 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, return file; } - static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) { uLong ret; @@ -150,7 +146,6 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) return ret; } - static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) { ZPOS64_T ret; @@ -206,7 +201,6 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T return ret; } - static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) { int ret; diff --git a/backend/epub/minizip/ioapi.h b/backend/epub/minizip/ioapi.h index 7a0f44ad..eaf6b303 100644 --- a/backend/epub/minizip/ioapi.h +++ b/backend/epub/minizip/ioapi.h @@ -110,7 +110,6 @@ typedef unsigned long long int ZPOS64_T; extern "C" { #endif - #define ZLIB_FILEFUNC_SEEK_CUR (1) #define ZLIB_FILEFUNC_SEEK_END (2) #define ZLIB_FILEFUNC_SEEK_SET (0) @@ -122,7 +121,6 @@ extern "C" { #define ZLIB_FILEFUNC_MODE_EXISTING (4) #define ZLIB_FILEFUNC_MODE_CREATE (8) - #ifndef ZCALLBACK #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) #define ZCALLBACK CALLBACK @@ -131,9 +129,6 @@ extern "C" { #endif #endif - - - typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); @@ -143,7 +138,6 @@ typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stre typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); - /* here is the "old" 32 bits structure structure */ typedef struct zlib_filefunc_def_s { @@ -185,7 +179,6 @@ typedef struct zlib_filefunc64_32_def_s seek_file_func zseek32_file; } zlib_filefunc64_32_def; - #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) //#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) diff --git a/backend/epub/minizip/unzip.c b/backend/epub/minizip/unzip.c index 0a23c1e4..3c4a6415 100644 --- a/backend/epub/minizip/unzip.c +++ b/backend/epub/minizip/unzip.c @@ -12,7 +12,6 @@ For more info read MiniZip_info.txt - ------------------------------------------------------------------------------------ Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of compatibility with older software. The following is from the original crypt.c. @@ -48,7 +47,6 @@ Copyright (C) 2007-2008 Even Rouault - Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G should only read the compressed/uncompressed size from the Zip64 format if @@ -63,7 +61,6 @@ */ - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -86,20 +83,17 @@ # include <errno.h> #endif - #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ - #ifndef CASESENSITIVITYDEFAULT_NO # if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) # define CASESENSITIVITYDEFAULT_NO # endif #endif - #ifndef UNZ_BUFSIZE #define UNZ_BUFSIZE (16384) #endif @@ -118,14 +112,12 @@ #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) - /* unz_file_info_interntal contain internal info about a file in zipfile*/ typedef struct unz_file_info64_internal_s { ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ } unz_file_info64_internal; - /* file_in_zip_read_info_s contain internal information about a file in zipfile, when reading and decompress it */ typedef struct @@ -156,7 +148,6 @@ typedef struct int raw; } file_in_zip64_read_info_s; - /* unz64_s contain internal information about the zipfile */ typedef struct @@ -189,7 +180,6 @@ typedef struct # endif } unz64_s; - #ifndef NOUNCRYPT #include "crypt.h" #endif @@ -200,7 +190,6 @@ typedef struct IN assertion: the stream s has been successfully opened for reading. */ - local int unz64local_getByte OF(( const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, @@ -224,7 +213,6 @@ local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, v } } - /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ @@ -295,7 +283,6 @@ local int unz64local_getLong64 OF(( voidpf filestream, ZPOS64_T *pX)); - local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) @@ -364,7 +351,6 @@ local int strcmpcasenosensitive_internal (const char* fileName1, const char* fil } } - #ifdef CASESENSITIVITYDEFAULT_NO #define CASESENSITIVITYDEFAULTVALUE 2 #else @@ -418,7 +404,6 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) @@ -463,7 +448,6 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f return uPosFound; } - /* Locate the Central directory 64 of a zipfile (at the end, just before the global comment) @@ -486,7 +470,6 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) @@ -605,8 +588,6 @@ local unzFile unzOpenInternal (const void *path, us.z_filefunc = *pzlib_filefunc64_32_def; us.is64bitOpenFunction = is64bitOpenFunction; - - us.filestream = ZOPEN64(us.z_filefunc, path, ZLIB_FILEFUNC_MODE_READ | @@ -745,7 +726,6 @@ local unzFile unzOpenInternal (const void *path, us.pfile_in_zip_read = NULL; us.encrypted = 0; - s=(unz64_s*)ALLOC(sizeof(unz64_s)); if( s != NULL) { @@ -755,7 +735,6 @@ local unzFile unzOpenInternal (const void *path, return (unzFile)s; } - extern unzFile ZEXPORT unzOpen2 (const char *path, zlib_filefunc_def* pzlib_filefunc32_def) { @@ -814,7 +793,6 @@ extern int ZEXPORT unzClose (unzFile file) return UNZ_OK; } - /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed @@ -897,7 +875,6 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; - /* we check the magic */ if (err==UNZ_OK) { @@ -1002,7 +979,6 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, else lSeek += file_info.size_file_extra; - if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) { uLong acc = 0; @@ -1096,7 +1072,6 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, else lSeek+=file_info.size_file_comment; - if ((err==UNZ_OK) && (pfile_info!=NULL)) *pfile_info=file_info; @@ -1106,8 +1081,6 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, return err; } - - /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed @@ -1156,7 +1129,6 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, pfile_info->tmu_date = file_info64.tmu_date, - pfile_info->compressed_size = (uLong)file_info64.compressed_size; pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; @@ -1212,7 +1184,6 @@ extern int ZEXPORT unzGoToNextFile (unzFile file) return err; } - /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzStringFileNameCompare @@ -1234,7 +1205,6 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas ZPOS64_T num_fileSaved; ZPOS64_T pos_in_central_dirSaved; - if (file==NULL) return UNZ_PARAMERROR; @@ -1278,7 +1248,6 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas return err; } - /* /////////////////////////////////////////// // Contributed by Ryan Haksi (mailto://[email protected]) @@ -1391,7 +1360,6 @@ local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVa s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; - if (err==UNZ_OK) { if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) @@ -1594,7 +1562,6 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size ; - pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + iSizeVar; @@ -1626,7 +1593,6 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, } # endif - return UNZ_OK; } @@ -1687,7 +1653,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; - if (pfile_in_zip_read_info->read_buffer == NULL) return UNZ_END_OF_LIST_OF_FILE; if (len==0) @@ -1731,7 +1696,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) uReadThis)!=uReadThis) return UNZ_ERRNO; - # ifndef NOUNCRYPT if(s->encrypted) { @@ -1743,7 +1707,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) } # endif - pfile_in_zip_read_info->pos_in_zipfile += uReadThis; pfile_in_zip_read_info->rest_read_compressed-=uReadThis; @@ -1874,7 +1837,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) return err; } - /* Give the current position in uncompressed data */ @@ -1909,7 +1871,6 @@ extern ZPOS64_T ZEXPORT unztell64 (unzFile file) return pfile_in_zip_read_info->total_out_64; } - /* return 1 if the end of file was reached, 0 elsewhere */ @@ -1931,8 +1892,6 @@ extern int ZEXPORT unzeof (unzFile file) return 0; } - - /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is @@ -2007,7 +1966,6 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; - if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && (!pfile_in_zip_read_info->raw)) { @@ -2015,7 +1973,6 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) err=UNZ_CRCERROR; } - TRYFREE(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = NULL; if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) @@ -2025,7 +1982,6 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); #endif - pfile_in_zip_read_info->stream_initialised = 0; TRYFREE(pfile_in_zip_read_info); @@ -2034,7 +1990,6 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) return err; } - /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. diff --git a/backend/epub/minizip/unzip.h b/backend/epub/minizip/unzip.h index 2104e391..5c5a3f99 100644 --- a/backend/epub/minizip/unzip.h +++ b/backend/epub/minizip/unzip.h @@ -70,7 +70,6 @@ typedef unzFile__ *unzFile; typedef voidp unzFile; #endif - #define UNZ_OK (0) #define UNZ_END_OF_LIST_OF_FILE (-100) #define UNZ_ERRNO (Z_ERRNO) @@ -162,7 +161,6 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, (like 1 on Unix, 2 on Windows) */ - extern unzFile ZEXPORT unzOpen OF((const char *path)); extern unzFile ZEXPORT unzOpen64 OF((const void *path)); /* @@ -180,7 +178,6 @@ extern unzFile ZEXPORT unzOpen64 OF((const void *path)); does not describe the reality */ - extern unzFile ZEXPORT unzOpen2 OF((const char *path, zlib_filefunc_def* pzlib_filefunc_def)); /* @@ -212,7 +209,6 @@ extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, No preparation of the structure is needed return UNZ_OK if there is no problem. */ - extern int ZEXPORT unzGetGlobalComment OF((unzFile file, char *szComment, uLong uSizeBuf)); @@ -222,7 +218,6 @@ extern int ZEXPORT unzGetGlobalComment OF((unzFile file, return the number of byte copied or an error code <0 */ - /***************************************************************************/ /* Unzip package allow you browse the directory of the zipfile */ @@ -251,7 +246,6 @@ extern int ZEXPORT unzLocateFile OF((unzFile file, UNZ_END_OF_LIST_OF_FILE if the file is not found */ - /* ****************************************** */ /* Ryan supplied functions */ /* unz_file_info contain information about a file in the zipfile */ @@ -315,14 +309,12 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, (commentBufferSize is the size of the buffer) */ - /** Addition for GDAL : START */ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); /** Addition for GDAL : END */ - /***************************************************************************/ /* for reading the content of the current zipfile, you can open it, read data from it, and close it (you can close it before reading all the file) @@ -369,7 +361,6 @@ extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, but you CANNOT set method parameter as NULL */ - extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); /* Close the file in zip opened with unzOpenCurrentFile @@ -428,8 +419,6 @@ extern uLong ZEXPORT unzGetOffset (unzFile file); extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); - - #ifdef __cplusplus } #endif diff --git a/backend/pdf/ev-poppler.h b/backend/pdf/ev-poppler.h index c70fc7d0..8f98fa02 100644 --- a/backend/pdf/ev-poppler.h +++ b/backend/pdf/ev-poppler.h @@ -34,7 +34,6 @@ GType pdf_document_get_type (void) G_GNUC_CONST; G_MODULE_EXPORT GType register_atril_backend (GTypeModule *module); - G_END_DECLS #endif /* __PDF_DOCUMENT_H__ */ diff --git a/backend/pixbuf/pixbuf-document.c b/backend/pixbuf/pixbuf-document.c index a4fe88ed..92bc7097 100644 --- a/backend/pixbuf/pixbuf-document.c +++ b/backend/pixbuf/pixbuf-document.c @@ -201,7 +201,6 @@ pixbuf_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *i iface->get_dimensions = pixbuf_document_thumbnails_get_dimensions; } - static void pixbuf_document_init (PixbufDocument *pixbuf_document) { diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 2129de20..c47be57f 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -361,7 +361,6 @@ tiff_document_render_pixbuf (EvDocument *document, if (width <= 0 || height <= 0) return NULL; - if (width >= INT_MAX / 4) /* overflow */ return NULL; diff --git a/backend/tiff/tiff2ps.c b/backend/tiff/tiff2ps.c index bcbbf885..41f2fb9a 100644 --- a/backend/tiff/tiff2ps.c +++ b/backend/tiff/tiff2ps.c @@ -449,7 +449,6 @@ PlaceImage(TIFF2PSContext *ctx, double pagewidth, double pageheight, return splitpage; } - void tiff2ps_process_page(TIFF2PSContext* ctx, TIFF* tif, double pw, double ph, double lm, double bm, gboolean cnt) @@ -592,7 +591,6 @@ tiff2ps_process_page(TIFF2PSContext* ctx, TIFF* tif, double pw, double ph, } } - static char DuplexPreamble[] = "\ %%BeginFeature: *Duplex True\n\ systemdict begin\n\ diff --git a/backend/xps/xps-document.c b/backend/xps/xps-document.c index 8db7d56c..e7e9ef2b 100644 --- a/backend/xps/xps-document.c +++ b/backend/xps/xps-document.c @@ -176,7 +176,6 @@ xps_document_get_info (EvDocument *document) EV_DOCUMENT_INFO_N_PAGES | EV_DOCUMENT_INFO_PAPER_SIZE; - if (gxps_document_get_n_pages (xps->doc) > 0) { ev_document_get_page_size (document, 0, &(info->paper_width), @@ -483,7 +482,6 @@ xps_document_document_links_iface_init (EvDocumentLinksInterface *iface) iface->find_link_page = xps_document_links_find_link_page; } - /* EvDocumentPrint */ static void xps_document_print_print_page (EvDocumentPrint *document, |