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
gzappend.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include "zlib.h"

Go to the source code of this file.

Macros

#define local   static
 
#define LGCHUNK   14
 
#define CHUNK   (1U << LGCHUNK)
 
#define DSIZE   32768U
 
#define read1(in)
 

Functions

local void bye (char *msg1, char *msg2)
 
local unsigned gcd (unsigned a, unsigned b)
 
local void rotate (unsigned char *list, unsigned len, unsigned rot)
 
local int readin (file *in)
 
local int readmore (file *in)
 
local void skip (file *in, unsigned n)
 
unsigned long read4 (file *in)
 
local void gzheader (file *in)
 
local int gzscan (char *name, z_stream *strm, int level)
 
local void gztack (char *name, int gd, z_stream *strm, int last)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ CHUNK

#define CHUNK   (1U << LGCHUNK)

Definition at line 89 of file gzappend.c.

Referenced by blast(), and gztack().

◆ DSIZE

#define DSIZE   32768U

Definition at line 90 of file gzappend.c.

◆ LGCHUNK

#define LGCHUNK   14

Definition at line 88 of file gzappend.c.

◆ local

#define local   static

Definition at line 87 of file gzappend.c.

◆ read1

#define read1 (   in)
Value:
(in->left == 0 ? readmore(in) : 0, \
in->left--, *(in->next)++)
local int readmore(file *in)
Definition: gzappend.c:192
GLint left
GLuint in

Definition at line 198 of file gzappend.c.

Referenced by gzheader(), and read4().

Function Documentation

◆ bye()

local void bye ( char *  msg1,
char *  msg2 
)

Definition at line 93 of file gzappend.c.

Referenced by gzheader(), gztack(), main(), readin(), readmore(), and skip().

◆ gcd()

local unsigned gcd ( unsigned  a,
unsigned  b 
)

Definition at line 102 of file gzappend.c.

Referenced by rotate().

◆ gzheader()

local void gzheader ( file *  in)

Definition at line 235 of file gzappend.c.

References bye(), read1, and skip().

◆ gzscan()

local int gzscan ( char *  name,
z_stream strm,
int  level 
)

Definition at line 259 of file gzappend.c.

Referenced by main().

◆ gztack()

local void gztack ( char *  name,
int  gd,
z_stream strm,
int  last 
)

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 466 of file gzappend.c.

References bye(), gzscan(), gztack(), NULL, and Z_DEFAULT_COMPRESSION.

◆ read4()

unsigned long read4 ( file *  in)

Definition at line 223 of file gzappend.c.

References long(), and read1.

◆ readin()

local int readin ( file *  in)

Definition at line 180 of file gzappend.c.

References bye(), and read().

Referenced by readmore().

◆ readmore()

local int readmore ( file *  in)

Definition at line 192 of file gzappend.c.

References bye(), and readin().

Referenced by skip().

◆ rotate()

local void rotate ( unsigned char *  list,
unsigned  len,
unsigned  rot 
)

◆ skip()

local void skip ( file *  in,
unsigned  n 
)

Definition at line 202 of file gzappend.c.

References bye(), lseek(), readmore(), and SEEK_CUR.

Referenced by bskip(), do_extract_currentfile(), extract(), gzheader(), and main().