Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
miniunz.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <utime.h>
#include "unzip.h"

Go to the source code of this file.

Macros

#define __USE_FILE_OFFSET64
 
#define __USE_LARGEFILE64
 
#define _LARGEFILE64_SOURCE
 
#define _FILE_OFFSET_BIT   64
 
#define FOPEN_FUNC(filename, mode)   fopen64(filename, mode)
 
#define FTELLO_FUNC(stream)   ftello64(stream)
 
#define FSEEKO_FUNC(stream, offset, origin)   fseeko64(stream, offset, origin)
 
#define CASESENSITIVITY   (0)
 
#define WRITEBUFFERSIZE   (8192)
 
#define MAXFILENAME   (256)
 

Functions

void change_file_date (char *filename, uLong dosdate, tm_unz tmu_date) const
 
int mymkdir (char *dirname) const
 
int makedir (char *newdir)
 
void do_banner ()
 
void do_help ()
 
void Display64BitsSize (ZPOS64_T n, int size_char)
 
int do_list (unzFile uf)
 
int do_extract_currentfile (unzFile uf, const int *popt_extract_without_path, int *popt_overwrite, const char *password)
 
int do_extract (unzFile uf, int opt_extract_without_path, int opt_overwrite, const char *password)
 
int do_extract_onefile (unzFile uf, const char *filename, int opt_extract_without_path, int opt_overwrite, const char *password)
 
int main (int argc, argv)
 

Macro Definition Documentation

◆ __USE_FILE_OFFSET64

#define __USE_FILE_OFFSET64

Definition at line 17 of file miniunz.c.

◆ __USE_LARGEFILE64

#define __USE_LARGEFILE64

Definition at line 20 of file miniunz.c.

◆ _FILE_OFFSET_BIT

#define _FILE_OFFSET_BIT   64

Definition at line 26 of file miniunz.c.

◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

Definition at line 23 of file miniunz.c.

◆ CASESENSITIVITY

#define CASESENSITIVITY   (0)

Definition at line 60 of file miniunz.c.

Referenced by do_extract_onefile().

◆ FOPEN_FUNC

#define FOPEN_FUNC (   filename,
  mode 
)    fopen64(filename, mode)

Definition at line 36 of file miniunz.c.

Referenced by do_extract_currentfile().

◆ FSEEKO_FUNC

#define FSEEKO_FUNC (   stream,
  offset,
  origin 
)    fseeko64(stream, offset, origin)

Definition at line 38 of file miniunz.c.

◆ FTELLO_FUNC

#define FTELLO_FUNC (   stream)    ftello64(stream)

Definition at line 37 of file miniunz.c.

◆ MAXFILENAME

#define MAXFILENAME   (256)

Definition at line 62 of file miniunz.c.

Referenced by main().

◆ WRITEBUFFERSIZE

#define WRITEBUFFERSIZE   (8192)

Definition at line 61 of file miniunz.c.

Referenced by do_extract_currentfile().

Function Documentation

◆ change_file_date()

void change_file_date ( char *  filename,
uLong  dosdate,
tm_unz  tmu_date 
) const

◆ Display64BitsSize()

void Display64BitsSize ( ZPOS64_T  n,
int  size_char 
)

Definition at line 206 of file miniunz.c.

Referenced by do_list().

◆ do_banner()

void do_banner ( )

Definition at line 188 of file miniunz.c.

Referenced by main().

◆ do_extract()

int do_extract ( unzFile  uf,
int  opt_extract_without_path,
int  opt_overwrite,
const char*  password 
)

◆ do_extract_currentfile()

int do_extract_currentfile ( unzFile  uf,
const int popt_extract_without_path,
int popt_overwrite,
const char*  password 
)

◆ do_extract_onefile()

int do_extract_onefile ( unzFile  uf,
const char*  filename,
int  opt_extract_without_path,
int  opt_overwrite,
const char*  password 
)

Definition at line 511 of file miniunz.c.

References CASESENSITIVITY, do_extract_currentfile(), password, UNZ_OK, and unzLocateFile().

Referenced by main().

◆ do_help()

void do_help ( )

Definition at line 194 of file miniunz.c.

Referenced by main().

◆ do_list()

int do_list ( unzFile  uf)

◆ main()

int main ( int  argc,
argv   
)

◆ makedir()

int makedir ( char *  newdir)

Definition at line 138 of file miniunz.c.

References free(), int, malloc(), mymkdir(), NULL, and UNZ_INTERNALERROR.

Referenced by do_extract_currentfile().

◆ mymkdir()

int mymkdir ( char*  dirname) const

Definition at line 124 of file miniunz.c.

Referenced by do_extract_currentfile(), and makedir().