git/archive-zip.c

/*
 * Copyright (c) 2006 Rene Scharfe
 */

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "config.h"
#include "archive.h"
#include "gettext.h"
#include "git-zlib.h"
#include "hex.h"
#include "streaming.h"
#include "utf8.h"
#include "object-store-ll.h"
#include "strbuf.h"
#include "userdiff.h"
#include "write-or-die.h"
#include "xdiff-interface.h"
#include "date.h"

static int zip_date;
static int zip_time;

/* We only care about the "buf" part here. */
static struct strbuf zip_dir;

static uintmax_t zip_offset;
static uint64_t zip_dir_entries;

static unsigned int max_creator_version;

#define ZIP_STREAM
#define ZIP_UTF8

enum zip_method {};

struct zip_local_header {};

struct zip_data_desc {};

struct zip64_data_desc {};

struct zip_dir_trailer {};

struct zip_extra_mtime {};

struct zip64_extra {};

struct zip64_dir_trailer {};

struct zip64_dir_trailer_locator {};

/*
 * On ARM, padding is added at the end of the struct, so a simple
 * sizeof(struct ...) reports two bytes more than the payload size
 * we're interested in.
 */
#define ZIP_LOCAL_HEADER_SIZE
#define ZIP_DATA_DESC_SIZE
#define ZIP64_DATA_DESC_SIZE
#define ZIP_DIR_HEADER_SIZE
#define ZIP_DIR_TRAILER_SIZE
#define ZIP_EXTRA_MTIME_SIZE
#define ZIP_EXTRA_MTIME_PAYLOAD_SIZE
#define ZIP64_EXTRA_SIZE
#define ZIP64_EXTRA_PAYLOAD_SIZE
#define ZIP64_DIR_TRAILER_SIZE
#define ZIP64_DIR_TRAILER_RECORD_SIZE
#define ZIP64_DIR_TRAILER_LOCATOR_SIZE

static void copy_le16(unsigned char *dest, unsigned int n)
{}

static void copy_le32(unsigned char *dest, unsigned int n)
{}

static void copy_le64(unsigned char *dest, uint64_t n)
{}

static uint64_t clamp_max(uint64_t n, uint64_t max, int *clamped)
{}

static void copy_le16_clamp(unsigned char *dest, uint64_t n, int *clamped)
{}

static void copy_le32_clamp(unsigned char *dest, uint64_t n, int *clamped)
{}

static int strbuf_add_le(struct strbuf *sb, size_t size, uintmax_t n)
{}

static uint32_t clamp32(uintmax_t n)
{}

static void *zlib_deflate_raw(void *data, unsigned long size,
			      int compression_level,
			      unsigned long *compressed_size)
{}

static void write_zip_data_desc(unsigned long size,
				unsigned long compressed_size,
				unsigned long crc)
{}

static void set_zip_header_data_desc(struct zip_local_header *header,
				     unsigned long size,
				     unsigned long compressed_size,
				     unsigned long crc)
{}

static int has_only_ascii(const char *s)
{}

static int entry_is_binary(struct index_state *istate, const char *path,
			   const void *buffer, size_t size)
{}

#define STREAM_BUFFER_SIZE

static int write_zip_entry(struct archiver_args *args,
			   const struct object_id *oid,
			   const char *path, size_t pathlen,
			   unsigned int mode,
			   void *buffer, unsigned long size)
{}

static void write_zip64_trailer(void)
{}

static void write_zip_trailer(const struct object_id *oid)
{}

static void dos_time(timestamp_t *timestamp, int *dos_date, int *dos_time)
{}

static int archive_zip_config(const char *var, const char *value,
			      const struct config_context *ctx UNUSED,
			      void *data UNUSED)
{}

static int write_zip_archive(const struct archiver *ar UNUSED,
			     struct archiver_args *args)
{}

static struct archiver zip_archiver =;

void init_zip_archiver(void)
{}