Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
portreg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NON_SXP   -1
#define INVALID_SXP   -2
#define VALID_SXP   1

Functions

SEC_BEGIN_PROTOS int PORT_RegExpValid (const char *exp)
int PORT_RegExpSearch (const char *str, const char *exp)
int PORT_RegExpCaseSearch (const char *str, const char *exp)

Define Documentation

#define INVALID_SXP   -2

Definition at line 82 of file portreg.h.

#define NON_SXP   -1

Definition at line 81 of file portreg.h.

#define VALID_SXP   1

Definition at line 83 of file portreg.h.


Function Documentation

int PORT_RegExpCaseSearch ( const char *  str,
const char *  exp 
)

Definition at line 309 of file portreg.c.

{
    switch(PORT_RegExpValid(exp))
      {
        case INVALID_SXP:
            return -1;
        case NON_SXP:
            return (PORT_Strcasecmp(exp,str) ? 1 : 0);
        default:
            return port_RegExpMatch(str, exp, PR_TRUE);
      }
}
int PORT_RegExpSearch ( const char *  str,
const char *  exp 
)

Definition at line 295 of file portreg.c.

{
    switch(PORT_RegExpValid(exp)) 
         {
        case INVALID_SXP:
            return -1;
        case NON_SXP:
            return (strcmp(exp,str) ? 1 : 0);
        default:
            return port_RegExpMatch(str, exp, PR_FALSE);
      }
}

Definition at line 123 of file portreg.c.

{
    int x;

    x = _valid_subexp(exp, '\0');
    return (x < 0 ? x : VALID_SXP);
}