Back to index

php5  5.3.10
Defines | Functions | Variables
mbfilter_ascii.c File Reference
#include "mbfilter.h"
#include "mbfilter_ascii.h"

Go to the source code of this file.

Defines

#define CK(statement)   do { if ((statement) < 0) return (-1); } while (0)

Functions

static int mbfl_filt_ident_ascii (int c, mbfl_identify_filter *filter)
int mbfl_filt_conv_ascii_wchar (int c, mbfl_convert_filter *filter)
int mbfl_filt_conv_wchar_ascii (int c, mbfl_convert_filter *filter)

Variables

static const char * mbfl_encoding_ascii_aliases [] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL}
const mbfl_encoding mbfl_encoding_ascii

Define Documentation

#define CK (   statement)    do { if ((statement) < 0) return (-1); } while (0)

Definition at line 76 of file mbfilter_ascii.c.


Function Documentation

int mbfl_filt_conv_ascii_wchar ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 81 of file mbfilter_ascii.c.

{
       return (*filter->output_function)(c, filter->data);
}
int mbfl_filt_conv_wchar_ascii ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 90 of file mbfilter_ascii.c.

{
       if (c >= 0 && c < 0x80) {
              CK((*filter->output_function)(c, filter->data));
       } else {
              if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
                     CK(mbfl_filt_conv_illegal_output(c, filter));
              }
       }

       return c;
}

Here is the call graph for this function:

static int mbfl_filt_ident_ascii ( int  c,
mbfl_identify_filter *  filter 
) [static]

Definition at line 103 of file mbfilter_ascii.c.

{
       if (c >= 0x20 && c < 0x80) {
              ;
       } else if (c == 0x0d || c == 0x0a || c == 0x09 || c == 0) {    /* CR or LF or HTAB or null */
              ;
       } else {
              filter->flag = 1;
       }

       return c;
}

Variable Documentation

Initial value:
 {
       mbfl_no_encoding_ascii,
       "ASCII",
       "US-ASCII", 
       (const char *(*)[])&mbfl_encoding_ascii_aliases,
       NULL,
       MBFL_ENCTYPE_SBCS
}

Definition at line 42 of file mbfilter_ascii.c.

const char* mbfl_encoding_ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL} [static]

Definition at line 40 of file mbfilter_ascii.c.