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

Go to the source code of this file.

Macros

#define READ_8(adr)   ((unsigned char)*(adr))
 
#define READ_16(adr)   ( READ_8(adr) | (READ_8(adr+1) << 8) )
 
#define READ_32(adr)   ( READ_16(adr) | (READ_16((adr)+2) << 16) )
 
#define WRITE_8(buff, n)
 
#define WRITE_16(buff, n)
 
#define WRITE_32(buff, n)
 

Functions

int ZEXPORT unzRepair (char *file, const char *fileOut, const char *fileOutTmp, uLong *nRecovered, uLong *bytesRecovered) const
 

Macro Definition Documentation

◆ READ_16

#define READ_16 (   adr)    ( READ_8(adr) | (READ_8(adr+1) << 8) )

Definition at line 15 of file mztools.c.

Referenced by unzRepair().

◆ READ_32

#define READ_32 (   adr)    ( READ_16(adr) | (READ_16((adr)+2) << 16) )

Definition at line 16 of file mztools.c.

Referenced by unzRepair().

◆ READ_8

#define READ_8 (   adr)    ((unsigned char)*(adr))

Definition at line 14 of file mztools.c.

◆ WRITE_16

#define WRITE_16 (   buff,
  n 
)
Value:
do { \
WRITE_8((unsigned char*)(buff), n); \
WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
} while(0)
GLdouble n

Definition at line 21 of file mztools.c.

Referenced by unzRepair().

◆ WRITE_32

#define WRITE_32 (   buff,
  n 
)
Value:
do { \
WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
} while(0)
GLdouble n

Definition at line 25 of file mztools.c.

Referenced by unzRepair().

◆ WRITE_8

#define WRITE_8 (   buff,
  n 
)
Value:
do { \
*((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
} while(0)
GLdouble n

Definition at line 18 of file mztools.c.

Function Documentation

◆ unzRepair()

int ZEXPORT unzRepair ( char*  file,
const char*  fileOut,
const char*  fileOutTmp,
uLong nRecovered,
uLong bytesRecovered 
) const