Order the Code

This commit is contained in:
Edouard Dupin 2011-12-21 11:32:48 +01:00
parent c49ee5e819
commit b180bd648f
83 changed files with 200 additions and 237 deletions

View File

@ -32,7 +32,7 @@
# include <GeneratedData.h>
#elif defined(DATA_IN_APK)
# include <stdio.h>
# include <zip.h>
# include <zip/zip.h>
#endif

View File

@ -16,26 +16,17 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS :=
LOCAL_MODULE := libpng
LOCAL_SRC_FILES :=\
png.c \
pngerror.c \
pngget.c \
pngmem.c \
pngpread.c \
pngread.c \
pngrio.c \
pngrtran.c \
pngrutil.c \
pngset.c \
pngtrans.c \
pngwio.c \
pngwrite.c \
pngwtran.c \
pngwutil.c
LOCAL_CFLAGS := -DPNG_NO_LIMITS_H
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_LDLIBS := -lz
#include $(BUILD_SHARED_LIBRARY)

View File

@ -16,26 +16,17 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS :=
LOCAL_CFLAGS := -DPNG_NO_LIMITS_H
LOCAL_MODULE := libpng
LOCAL_SRC_FILES :=\
png.c \
pngerror.c \
pngget.c \
pngmem.c \
pngpread.c \
pngread.c \
pngrio.c \
pngrtran.c \
pngrutil.c \
pngset.c \
pngtrans.c \
pngwio.c \
pngwrite.c \
pngwtran.c \
pngwutil.c
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_LDLIBS := -lz
#include $(BUILD_SHARED_LIBRARY)

20
Sources/libpng/file.mk Normal file
View File

@ -0,0 +1,20 @@
FILE_LIST = png/png.c \
png/error.c \
png/get.c \
png/mem.c \
png/pread.c \
png/read.c \
png/rio.c \
png/rtran.c \
png/rutil.c \
png/set.c \
png/trans.c \
png/wio.c \
png/write.c \
png/wtran.c \
png/wutil.c

View File

@ -21,11 +21,11 @@
#ifndef PNGCONF_H
#define PNGCONF_H
/*
#ifndef PNG_NO_LIMITS_H
# include <limits.h>
# include <png/limits.h>
#endif
*/
/* Added at libpng-1.2.9 */
/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure"
@ -33,7 +33,7 @@
*/
#ifdef PNG_CONFIGURE_LIBPNG
# ifdef HAVE_CONFIG_H
# include "config.h"
# include "png/config.h"
# endif
#endif
@ -47,7 +47,7 @@
# ifndef PNG_USER_PRIVATEBUILD
# define PNG_USER_PRIVATEBUILD
# endif
# include "pngusr.h"
# include "png/usr.h"
#endif
/*

View File

@ -17,9 +17,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#include "png/priv.h"
static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr,

View File

@ -13,9 +13,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#include "png/priv.h"
png_uint_32 PNGAPI
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)

View File

@ -18,9 +18,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#include "png/priv.h"
/* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)

View File

@ -13,8 +13,8 @@
#define PNG_NO_EXTERN
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "pngpriv.h"
#include "png/png.h"
#include "png/priv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_1 Your_png_h_is_not_version_1_4_1;

View File

@ -392,7 +392,7 @@
#endif
/* Include all user configurable info, including optional assembler routines */
#include "pngconf.h"
#include "png/conf.h"
/*
* Added at libpng-1.2.8

View File

@ -12,9 +12,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Push model modes */
#define PNG_READ_SIG_MODE 0

View File

@ -15,9 +15,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Create a PNG structure for reading, and allocate any memory needed. */

View File

@ -19,9 +19,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Read the data from whatever input you are using. The default routine
* reads from a file pointer. Note that this routine sometimes gets called

View File

@ -17,9 +17,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
void PNGAPI

View File

@ -15,9 +15,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
# define png_strtod(p,a,b) strtod(a,b)
png_uint_32 PNGAPI

View File

@ -17,9 +17,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#include "png/priv.h"
#ifdef PNG_bKGD_SUPPORTED
void PNGAPI

View File

@ -12,9 +12,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#include "png/priv.h"
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Turn on BGR-to-RGB mapping */

View File

@ -19,9 +19,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Write the data to whatever output you are using. The default routine
* writes to a file pointer. Note that this routine sometimes gets called

View File

@ -13,9 +13,9 @@
/* Get internal access to png.h */
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Writes all the PNG information. This is the suggested way to use the
* library. If you have a new chunk to add, make a function to write it,

View File

@ -12,9 +12,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Transform the data according to the user's wishes. The order of
* transformations is significant.

View File

@ -12,9 +12,9 @@
*/
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#include "png/png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
#include "png/priv.h"
/* Place a 32-bit number into a buffer in PNG byte order. We work
* with unsigned numbers for convenience, although one supported

View File

@ -17,60 +17,13 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libzip
LOCAL_SRC_FILES :=\
zip_add.c \
zip_add_dir.c \
zip_close.c \
zip_delete.c \
zip_dirent.c \
zip_entry_free.c \
zip_entry_new.c \
zip_err_str.c \
zip_error.c \
zip_error_clear.c \
zip_error_get.c \
zip_error_get_sys_type.c \
zip_error_strerror.c \
zip_error_to_str.c \
zip_fclose.c \
zip_file_error_clear.c \
zip_file_error_get.c \
zip_file_get_offset.c \
zip_file_strerror.c \
zip_filerange_crc.c \
zip_fopen.c \
zip_fopen_index.c \
zip_fread.c \
zip_free.c \
zip_get_archive_comment.c \
zip_get_archive_flag.c \
zip_get_file_comment.c \
zip_get_num_files.c \
zip_get_name.c \
zip_memdup.c \
zip_name_locate.c \
zip_new.c \
zip_open.c \
zip_rename.c \
zip_replace.c \
zip_set_archive_comment.c \
zip_set_archive_flag.c \
zip_set_file_comment.c \
zip_source_buffer.c \
zip_source_file.c \
zip_source_filep.c \
zip_source_free.c \
zip_source_function.c \
zip_source_zip.c \
zip_set_name.c \
zip_stat.c \
zip_stat_index.c \
zip_stat_init.c \
zip_strerror.c \
zip_unchange.c \
zip_unchange_all.c \
zip_unchange_archive.c \
zip_unchange_data.c
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_LDLIBS := -lz

View File

@ -17,60 +17,13 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libzip
LOCAL_SRC_FILES :=\
zip_add.c \
zip_add_dir.c \
zip_close.c \
zip_delete.c \
zip_dirent.c \
zip_entry_free.c \
zip_entry_new.c \
zip_err_str.c \
zip_error.c \
zip_error_clear.c \
zip_error_get.c \
zip_error_get_sys_type.c \
zip_error_strerror.c \
zip_error_to_str.c \
zip_fclose.c \
zip_file_error_clear.c \
zip_file_error_get.c \
zip_file_get_offset.c \
zip_file_strerror.c \
zip_filerange_crc.c \
zip_fopen.c \
zip_fopen_index.c \
zip_fread.c \
zip_free.c \
zip_get_archive_comment.c \
zip_get_archive_flag.c \
zip_get_file_comment.c \
zip_get_num_files.c \
zip_get_name.c \
zip_memdup.c \
zip_name_locate.c \
zip_new.c \
zip_open.c \
zip_rename.c \
zip_replace.c \
zip_set_archive_comment.c \
zip_set_archive_flag.c \
zip_set_file_comment.c \
zip_source_buffer.c \
zip_source_file.c \
zip_source_filep.c \
zip_source_free.c \
zip_source_function.c \
zip_source_zip.c \
zip_set_name.c \
zip_stat.c \
zip_stat_index.c \
zip_stat_init.c \
zip_strerror.c \
zip_unchange.c \
zip_unchange_all.c \
zip_unchange_archive.c \
zip_unchange_data.c
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_LDLIBS := -lz

55
Sources/libzip/file.mk Normal file
View File

@ -0,0 +1,55 @@
FILE_LIST = zip/add.c \
zip/add_dir.c \
zip/close.c \
zip/delete.c \
zip/dirent.c \
zip/entry_free.c \
zip/entry_new.c \
zip/err_str.c \
zip/error.c \
zip/error_clear.c \
zip/error_get.c \
zip/error_get_sys_type.c \
zip/error_strerror.c \
zip/error_to_str.c \
zip/fclose.c \
zip/file_error_clear.c \
zip/file_error_get.c \
zip/file_get_offset.c \
zip/file_strerror.c \
zip/filerange_crc.c \
zip/fopen.c \
zip/fopen_index.c \
zip/fread.c \
zip/free.c \
zip/get_archive_comment.c \
zip/get_archive_flag.c \
zip/get_file_comment.c \
zip/get_num_files.c \
zip/get_name.c \
zip/memdup.c \
zip/name_locate.c \
zip/new.c \
zip/open.c \
zip/rename.c \
zip/replace.c \
zip/set_archive_comment.c \
zip/set_archive_flag.c \
zip/set_file_comment.c \
zip/source_buffer.c \
zip/source_file.c \
zip/source_filep.c \
zip/source_free.c \
zip/source_function.c \
zip/source_zip.c \
zip/set_name.c \
zip/stat.c \
zip/stat_index.c \
zip/stat_init.c \
zip/strerror.c \
zip/unchange.c \
zip/unchange_all.c \
zip/unchange_archive.c \
zip/unchange_data.c

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -36,7 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -40,7 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "zipint.h"
#include "zip/int.h"
static int add_data(struct zip *, struct zip_source *, struct zip_dirent *,
FILE *);

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -40,7 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "zipint.h"
#include "zip/int.h"
static time_t _zip_d2u_time(int, int);
static char *_zip_readfpstr(FILE *, unsigned int, int, struct zip_error *);

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -3,7 +3,7 @@
from ./zip.h; make changes there.
*/
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -38,7 +38,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -38,7 +38,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -40,7 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -36,7 +36,7 @@
#include <stdio.h>
#include <errno.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"
static struct zip_file *_zip_file_new(struct zip *za);

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -40,8 +40,8 @@
#define ZIP_EXTERN __declspec(dllimport)
#endif
#include "zip.h"
#include "config.h"
#include "zip/zip.h"
#include "zip/config.h"
#ifndef HAVE_MKSTEMP
int _zip_mkstemp(char *);

View File

@ -34,7 +34,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -40,7 +40,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"
static void set_error(int *, struct zip_error *, int);
static struct zip *_zip_allocate_new(const char *, int *);

View File

@ -35,7 +35,7 @@
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -36,7 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -36,7 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"
struct read_data {
const char *buf, *data, *end;

View File

@ -36,7 +36,7 @@
#include <errno.h>
#include <stdio.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -39,7 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"
struct read_file {
char *fname; /* name of file to copy from */

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -36,7 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include "zipint.h"
#include "zip/int.h"
struct read_zip {
struct zip_file *zf;

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -33,7 +33,7 @@
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"

View File

@ -37,7 +37,7 @@
#include <stdlib.h>
#include "zipint.h"
#include "zip/int.h"
void
_zip_unchange_data(struct zip_entry *ze)