Back to index

php5  5.3.10
mbfilter_pass.c
Go to the documentation of this file.
00001 /*
00002  * "streamable kanji code filter and converter"
00003  * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved.
00004  *
00005  * LICENSE NOTICES
00006  *
00007  * This file is part of "streamable kanji code filter and converter",
00008  * which is distributed under the terms of GNU Lesser General Public 
00009  * License (version 2) as published by the Free Software Foundation.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with "streamable kanji code filter and converter";
00018  * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
00019  * Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * The author of this file:
00022  *
00023  */
00024 /*
00025  * The source code included in this files was separated from mbfilter.c
00026  * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
00027  * 
00028  */
00029 
00030 #ifdef HAVE_CONFIG_H
00031 #include "config.h"
00032 #endif
00033 
00034 #ifdef HAVE_STDDEF_H
00035 #include <stddef.h>
00036 #endif
00037 
00038 #include "mbfilter.h"
00039 #include "mbfilter_pass.h"
00040 
00041 static const char *mbfl_encoding_pass_aliases[] = {"none", NULL};
00042 
00043 const mbfl_encoding mbfl_encoding_pass = {
00044        mbfl_no_encoding_pass,
00045        "pass",
00046        NULL,
00047        (const char *(*)[])&mbfl_encoding_pass_aliases,
00048        NULL,
00049        0
00050 };
00051 
00052 const struct mbfl_convert_vtbl vtbl_pass = {
00053        mbfl_no_encoding_pass,
00054        mbfl_no_encoding_pass,
00055        mbfl_filt_conv_common_ctor,
00056        mbfl_filt_conv_common_dtor,
00057        mbfl_filt_conv_pass,
00058        mbfl_filt_conv_common_flush
00059 };
00060 
00061 int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter)
00062 {
00063        return (*filter->output_function)(c, filter->data);
00064 }
00065