Context algorithm
Semi-predictive context algorithm implementation
 All Data Structures Files Functions Variables Typedefs Macros Pages
mapfile.h File Reference
#include "types.h"

Go to the source code of this file.

Functions

void * file2String (char *name, Uint *textlen)
 Opens a file and maps it into memory. More...
 
void freetextspace (Uchar *text, Uint textlen)
 Frees the memory used by the mapping of a file. More...
 

Function Documentation

void* file2String ( char *  name,
Uint textlen 
)

Opens a file and maps it into memory.

UNIX version.

Parameters
[in]namename and path of the file to open.
[out]textlensize in bytes of the file.
Returns
a pointer to the memory map area.

Definition at line 237 of file mapfile.c.

void freetextspace ( Uchar text,
Uint  textlen 
)

Frees the memory used by the mapping of a file.

UNIX version.

Parameters
[in]textpointer to the mapped file.
[in]textlensize in bytes of the mapped file memory area.

Definition at line 225 of file mapfile.c.