Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

scans_offset.c File Reference

Implements Phase III scans for detecting offsets within a buffer. More...

#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include "fret.h"
#include "common.h"
#include "scans_offset.h"
#include "gramstore.h"

Include dependency graph for scans_offset.c:


Data Structures

struct  State
 Describes the internal state of a Scan. More...

Functions

bool scanOffsetsByte (const unsigned char *const pBuffer, const size_t bufLen, void *const pState, const BufferId bufferId, Gram *const pResultGram)
bool scanOffsetsShort (const unsigned char *const pBuffer, const size_t bufLen, void *const pState, const BufferId bufferId, Gram *const pResultGram)
bool scanOffsetsLong (const unsigned char *const pBuffer, const size_t bufLen, void *const pState, const BufferId bufferId, Gram *const pResultGram)
void * newStateOffsets (void)

Detailed Description

Implements Phase III scans for detecting offsets within a buffer.

Implements Scans that looks for byte, short and long offsets with the buffer.


Function Documentation

void* newStateOffsets void   ) 
 

Allocates a new State variable that stores the state of a Scan.

bool scanOffsetsByte const unsigned char *const   pBuffer,
const size_t  bufLen,
void *const   pState,
const BufferId  bufferId,
Gram *const   pResultGram
 

Function scans a buffer, looking for values that may indicate an offset to the beginning of an already identified or undiscovered Gram. This scan examines the values stored in 1 byte.

bool scanOffsetsLong const unsigned char *const   pBuffer,
const size_t  bufLen,
void *const   pState,
const BufferId  bufferId,
Gram *const   pResultGram
 

Function scans a buffer, looking for values that may indicate an offset to the beginning of an already identified or undiscovered Gram. This Scan examines the values stored in 4 bytes.

bool scanOffsetsShort const unsigned char *const   pBuffer,
const size_t  bufLen,
void *const   pState,
const BufferId  bufferId,
Gram *const   pResultGram
 

Function scans a buffer, looking for values that may indicate an offset to the beginning of an already identified or undiscovered Gram. This scan examines the values stored in 2 bytes.


Generated on Thu Jan 19 18:59:26 2006 for FRET by  doxygen 1.4.4