Apache HTTPD
Macros | Functions
apr_cpystrn.c File Reference
#include "apr.h"
#include "apr_strings.h"
#include "apr_private.h"
#include "apr_lib.h"

Go to the source code of this file.

Macros

#define SKIP_WHITESPACE(cp)
 
#define CHECK_QUOTATION(cp, isquoted)
 
#define DETERMINE_NEXTSTRING(cp, isquoted)
 
#define REMOVE_ESCAPE_CHARS(cleaned, dirty, escaped)
 

Functions

 APR_DECLARE (char *)
 
 APR_DECLARE (apr_status_t)
 
 APR_DECLARE (const char *)
 
charstrdup (const char *str)
 
int strcasecmp (const char *a, const char *b)
 
int strncasecmp (const char *a, const char *b, size_t n)
 
charstrstr (char *s1, char *s2)
 

Macro Definition Documentation

◆ CHECK_QUOTATION

#define CHECK_QUOTATION (   cp,
  isquoted 
)
Value:
isquoted = 0; \
if (*cp == '"') { \
isquoted = 1; \
cp++; \
} \
else if (*cp == '\'') { \
isquoted = 2; \
cp++; \
}
apr_size_t size

◆ DETERMINE_NEXTSTRING

#define DETERMINE_NEXTSTRING (   cp,
  isquoted 
)
Value:
for ( ; *cp != '\0'; cp++) { \
if ( (*cp == '\\' && (*(cp+1) == ' ' || *(cp+1) == '\t' || \
*(cp+1) == '"' || *(cp+1) == '\''))) { \
cp++; \
continue; \
} \
if ( (!isquoted && (*cp == ' ' || *cp == '\t')) \
|| (isquoted == 1 && *cp == '"') \
|| (isquoted == 2 && *cp == '\'') ) { \
break; \
} \
}

◆ REMOVE_ESCAPE_CHARS

#define REMOVE_ESCAPE_CHARS (   cleaned,
  dirty,
  escaped 
)
Value:
escaped = 0; \
while(*dirty) { \
if (!escaped && *dirty == '\\') { \
escaped = 1; \
} \
else { \
escaped = 0; \
*cleaned++ = *dirty; \
} \
++dirty; \
} \
*cleaned = 0; /* last line of macro... */

◆ SKIP_WHITESPACE

#define SKIP_WHITESPACE (   cp)
Value:
for ( ; *cp == ' ' || *cp == '\t'; ) { \
cp++; \
};

Function Documentation

◆ APR_DECLARE()

APR_DECLARE ( char )

Definition at line 46 of file apr_cpystrn.c.

◆ strdup()

char * strdup ( const char str)

Definition at line 232 of file apr_cpystrn.c.

◆ strstr()

char * strstr ( char s1,
char s2 
)

Definition at line 288 of file apr_cpystrn.c.