Back to index

php5  5.3.10
Functions | Variables
mbfilter_byte2.h File Reference
#include "mbfilter.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int mbfl_filt_conv_wchar_byte2be (int c, mbfl_convert_filter *filter)
int mbfl_filt_conv_byte2be_wchar (int c, mbfl_convert_filter *filter)
int mbfl_filt_conv_wchar_byte2le (int c, mbfl_convert_filter *filter)
int mbfl_filt_conv_byte2le_wchar (int c, mbfl_convert_filter *filter)

Variables

const mbfl_encoding mbfl_encoding_byte2be
const mbfl_encoding mbfl_encoding_byte2le

Function Documentation

int mbfl_filt_conv_byte2be_wchar ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 91 of file mbfilter_byte2.c.

{
       int n;

       if (filter->status == 0) {
              filter->status = 1;
              n = (c & 0xff) << 8;
              filter->cache = n;
       } else {
              filter->status = 0;
              n = (c & 0xff) | filter->cache;
              CK((*filter->output_function)(n, filter->data));
       }
       return c;
}
int mbfl_filt_conv_byte2le_wchar ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 114 of file mbfilter_byte2.c.

{
       int n;

       if (filter->status == 0) {
              filter->status = 1;
              n = c & 0xff;
              filter->cache = n;
       } else {
              filter->status = 0;
              n = ((c & 0xff) << 8) | filter->cache;
              CK((*filter->output_function)(n, filter->data));
       }
       return c;
}
int mbfl_filt_conv_wchar_byte2be ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 107 of file mbfilter_byte2.c.

{
       CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
       CK((*filter->output_function)(c & 0xff, filter->data));
       return c;
}
int mbfl_filt_conv_wchar_byte2le ( int  c,
mbfl_convert_filter *  filter 
)

Definition at line 130 of file mbfilter_byte2.c.

{
       CK((*filter->output_function)(c & 0xff, filter->data));
       CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
       return c;
}

Variable Documentation

Definition at line 38 of file mbfilter_byte2.c.

Definition at line 47 of file mbfilter_byte2.c.