G:/ScriptBasic/source/match.c File Reference

#include <ctype.h>
#include <string.h>
#include "match.h"
#include "errcodes.h"

Go to the source code of this file.

Defines

#define ESCAPE_CHARACTER   '~'
#define F   0xFF
#define E   0xFE

Functions

unsigned long match_index (char ch)
static unsigned char * MultiJokerSet (pMatchSets pMS, char ch)
static unsigned char * SingleJokerSet (pMatchSets pMS, char ch)
static int JokerMatch (unsigned char *set, unsigned char ch)
void match_InitSets (pMatchSets pMS)
void match_ModifySet (pMatchSets pMS, char JokerCharacter, int nChars, unsigned char *pch, int fAction)
int match_match (char *pszPattern, unsigned long cbPattern, char *pszString, unsigned long cbString, char **ParameterArray, unsigned long *pcbParameterArray, char *pszBuffer, int cArraySize, int cbBufferSize, int fCase, pMatchSets pThisMatchSets, int *iResult)
int match_count (char *pszPattern, unsigned long cbPattern)
int match_parameter (char *pszFormat, unsigned long cbFormat, char **ParameterArray, unsigned long *pcbParameterArray, char *pszBuffer, int cArraySize, unsigned long *pcbBufferSize)
int match_size (char *pszFormat, unsigned long cbFormat, unsigned long *pcbParameterArray, int cArraySize, int *cbBufferSize)

Variables

static char JokerCharacter [] = "*#$@?&%!+/|<>"
static MatchSets DefaultMatchSets


Define Documentation

#define E   0xFE
 

Definition at line 85 of file match.c.

Referenced by bestfta_p(), and main().

#define ESCAPE_CHARACTER   '~'
 

Definition at line 79 of file match.c.

Referenced by match_count(), and match_match().

#define F   0xFF
 

Definition at line 84 of file match.c.


Function Documentation

static int JokerMatch unsigned char *  set,
unsigned char  ch
[static]
 

Definition at line 155 of file match.c.

References index.

Referenced by match_match().

int match_count char *  pszPattern,
unsigned long  cbPattern
 

Definition at line 514 of file match.c.

References ESCAPE_CHARACTER, and match_index().

Referenced by collect_dirs_r(), and modu_Init().

unsigned long match_index char  ch  ) 
 

Definition at line 126 of file match.c.

References i, and JokerCharacter.

Referenced by match_count(), match_ModifySet(), modu_Init(), MultiJokerSet(), and SingleJokerSet().

void match_InitSets pMatchSets  pMS  ) 
 

Definition at line 172 of file match.c.

References DefaultMatchSets, and memcpy().

Referenced by allocate_MatchSets(), and modu_Init().

int match_match char *  pszPattern,
unsigned long  cbPattern,
char *  pszString,
unsigned long  cbString,
char **  ParameterArray,
unsigned long *  pcbParameterArray,
char *  pszBuffer,
int  cArraySize,
int  cbBufferSize,
int  fCase,
pMatchSets  pThisMatchSets,
int *  iResult
 

Definition at line 380 of file match.c.

References DefaultMatchSets, ESCAPE_CHARACTER, JokerMatch(), MultiJokerSet(), NULL, and SingleJokerSet().

Referenced by collect_dirs_r(), and modu_Init().

void match_ModifySet pMatchSets  pMS,
char  JokerCharacter,
int  nChars,
unsigned char *  pch,
int  fAction
 

Definition at line 238 of file match.c.

References i, index, and match_index().

int match_parameter char *  pszFormat,
unsigned long  cbFormat,
char **  ParameterArray,
unsigned long *  pcbParameterArray,
char *  pszBuffer,
int  cArraySize,
unsigned long *  pcbBufferSize
 

Definition at line 591 of file match.c.

References index, and s.

Referenced by modu_Init().

int match_size char *  pszFormat,
unsigned long  cbFormat,
unsigned long *  pcbParameterArray,
int  cArraySize,
int *  cbBufferSize
 

Definition at line 681 of file match.c.

References index.

Referenced by modu_Init().

static unsigned char* MultiJokerSet pMatchSets  pMS,
char  ch
[static]
 

Definition at line 137 of file match.c.

References i, match_index(), and NULL.

Referenced by match_match().

static unsigned char* SingleJokerSet pMatchSets  pMS,
char  ch
[static]
 

Definition at line 146 of file match.c.

References i, match_index(), and NULL.

Referenced by match_match().


Variable Documentation

MatchSets DefaultMatchSets [static]
 

Initial value:

 {

    { MULTIJOKER, MULTIJOKER, MULTIJOKER, MULTIJOKER, SINGLEJOKER, 

      NOJOKER, NOJOKER, NOJOKER, NOJOKER, NOJOKER, NOJOKER, NOJOKER, NOJOKER },
     
    {


 { F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F} ,
 { 0, 0, 0, 0, 0, 0, F, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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referenced by match_InitSets(), and match_match().

char JokerCharacter[] = "*#$@?&%!+/|<>" [static]
 

Definition at line 82 of file match.c.


Generated on Sun Mar 12 23:56:37 2006 for ScriptBasic by  doxygen 1.4.6-NO