Home
last modified time | relevance | path

Searched refs:filter (Results 1 – 25 of 300) sorted by relevance

12345678910>>...12

/php-src/ext/mbstring/libmbfl/filters/
H A Dmbfilter_qprint.c95 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_qprintenc()
110 CK((*filter->output_function)('=', filter->data)); in mbfl_filt_conv_qprintenc()
125 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_qprintenc()
132 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_qprintenc()
135 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_qprintenc()
147 (*filter->filter_function)('\0', filter); in mbfl_filt_conv_qprintenc_flush()
152 (*filter->flush_function)(filter->data); in mbfl_filt_conv_qprintenc_flush()
195 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_qprintdec()
203 CK((*filter->output_function)(filter->cache, filter->data)); in mbfl_filt_conv_qprintdec()
208 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_qprintdec()
[all …]
H A Dmbfilter_utf7imap.c147 filter->cache = filter->status = 0; in mbfl_filt_conv_utf7imap_wchar()
152 filter->cache = filter->status = 0; in mbfl_filt_conv_utf7imap_wchar()
156 filter->cache = filter->status = 0; in mbfl_filt_conv_utf7imap_wchar()
159 filter->cache = filter->status = 0; in mbfl_filt_conv_utf7imap_wchar()
172 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_utf7imap_wchar()
202 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7imap_wchar()
211 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7imap_wchar()
301 (*filter->flush_function)(filter->data); in mbfl_filt_conv_utf7imap_wchar_flush()
333 CK((*filter->filter_function)(s, filter)); in mbfl_filt_conv_wchar_utf7imap()
335 CK((*filter->filter_function)(s, filter)); in mbfl_filt_conv_wchar_utf7imap()
[all …]
H A Dmbfilter_base64.c106 CK((*filter->output_function)(0x0d, filter->data)); /* CR */ in mbfl_filt_conv_base64enc()
107 CK((*filter->output_function)(0x0a, filter->data)); /* LF */ in mbfl_filt_conv_base64enc()
133 CK((*filter->output_function)(0x0d, filter->data)); /* CR */ in mbfl_filt_conv_base64enc_flush()
134 CK((*filter->output_function)(0x0a, filter->data)); /* LF */ in mbfl_filt_conv_base64enc_flush()
139 CK((*filter->output_function)(0x3d, filter->data)); /* '=' */ in mbfl_filt_conv_base64enc_flush()
140 CK((*filter->output_function)(0x3d, filter->data)); /* '=' */ in mbfl_filt_conv_base64enc_flush()
148 (*filter->flush_function)(filter->data); in mbfl_filt_conv_base64enc_flush()
177 CK((*filter->output_function)(MBFL_BAD_INPUT, filter->data)); in mbfl_filt_conv_base64dec()
199 CK((*filter->output_function)((n >> 8) & 0xff, filter->data)); in mbfl_filt_conv_base64dec()
200 CK((*filter->output_function)(n & 0xff, filter->data)); in mbfl_filt_conv_base64dec()
[all …]
H A Dmbfilter_utf7.c125 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_utf7_wchar()
129 filter->cache = filter->status = 0; in mbfl_filt_conv_utf7_wchar()
140 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_utf7_wchar()
174 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7_wchar()
185 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7_wchar()
214 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7_wchar()
225 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7_wchar()
259 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf7_wchar()
279 (*filter->flush_function)(filter->data); in mbfl_filt_conv_utf7_wchar_flush()
381 filter->status = filter->cache = 0; in mbfl_filt_conv_wchar_utf7_flush()
[all …]
H A Dmbfilter_htmlent.c109 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_html_enc()
111 CK((*filter->output_function)('&', filter->data)); in mbfl_filt_conv_html_enc()
126 CK((*filter->output_function)('#', filter->data)); in mbfl_filt_conv_html_enc()
137 CK((*filter->output_function)(*p, filter->data)); in mbfl_filt_conv_html_enc()
141 CK((*filter->output_function)(';', filter->data)); in mbfl_filt_conv_html_enc()
152 (*filter->flush_function)(filter->data); in mbfl_filt_conv_html_enc_flush()
192 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_html_dec()
239 CK((*filter->output_function)(ent, filter->data)); in mbfl_filt_conv_html_dec()
244 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_html_dec()
260 CK((*filter->output_function)(ent, filter->data)); in mbfl_filt_conv_html_dec()
[all …]
H A Dmbfilter_ucs4.c208 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_ucs4_wchar()
238 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_ucs4be_wchar()
249 CK((*filter->output_function)((c >> 24) & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4be()
250 CK((*filter->output_function)((c >> 16) & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4be()
251 CK((*filter->output_function)((c >> 8) & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4be()
252 CK((*filter->output_function)(c & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4be()
282 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_ucs4le_wchar()
293 CK((*filter->output_function)(c & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4le()
294 CK((*filter->output_function)((c >> 8) & 0xff, filter->data)); in mbfl_filt_conv_wchar_ucs4le()
308 CK((*filter->output_function)(MBFL_BAD_INPUT, filter->data)); in mbfl_filt_conv_ucs4_wchar_flush()
[all …]
H A Dmbfilter_utf32.c152 CK((*filter->output_function)(n, filter->data)); in emit_char_if_valid()
162 filter->cache = (filter->cache << 8) | (c & 0xFF); in mbfl_filt_conv_utf32_wchar()
166 filter->cache = filter->status = 0; in mbfl_filt_conv_utf32_wchar()
185 filter->cache = (filter->cache << 8) | (c & 0xFF); in mbfl_filt_conv_utf32be_wchar()
189 filter->cache = filter->status = 0; in mbfl_filt_conv_utf32be_wchar()
201 CK((*filter->output_function)(c & 0xff, filter->data)); in mbfl_filt_conv_wchar_utf32be()
212 filter->cache |= ((c & 0xFFU) << (8 * filter->status)); in mbfl_filt_conv_utf32le_wchar()
216 filter->cache = filter->status = 0; in mbfl_filt_conv_utf32le_wchar()
225 CK((*filter->output_function)(c & 0xff, filter->data)); in mbfl_filt_conv_wchar_utf32le()
242 filter->cache = filter->status = 0; in mbfl_filt_conv_utf32_wchar_flush()
[all …]
H A Dmbfilter_cjk.c298 (*filter->flush_function)(filter->data); in mbfl_filt_conv_jis_wchar_flush()
1285 filter->status = filter->cache = 0; in mbfl_filt_conv_wchar_2022jp_mobile_flush()
4219 filter->status = filter->cache = 0; in mbfl_filt_conv_any_2022kr_flush()
5107 filter->cache = filter->status = 0; in mbfl_filt_conv_wchar_sjis_mac()
5336 filter->cache = filter->status = 0; in mbfl_filt_conv_wchar_sjis_mac()
5425 filter->cache = filter->status = 0; in mbfl_filt_conv_wchar_sjis_mac()
5944 filter->cache = filter->status = 0; in mbfilter_unicode2sjis_emoji_docomo()
6001 filter->cache = filter->status = 0; in mbfilter_unicode2sjis_emoji_kddi_sjis()
6016 filter->cache = filter->status = 0; in mbfilter_unicode2sjis_emoji_kddi_sjis()
6073 filter->cache = filter->status = 0; in mbfilter_unicode2sjis_emoji_sb()
[all …]
H A Dmbfilter_ucs2.c159 filter->status = 1; in mbfl_filt_conv_ucs2_wchar()
162 filter->status = 0; in mbfl_filt_conv_ucs2_wchar()
170 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_ucs2_wchar()
184 CK((*filter->output_function)((c & 0xFF) | filter->cache, filter->data)); in mbfl_filt_conv_ucs2be_wchar()
192 CK((*filter->output_function)((c >> 8) & 0xFF, filter->data)); in mbfl_filt_conv_wchar_ucs2be()
193 CK((*filter->output_function)(c & 0xFF, filter->data)); in mbfl_filt_conv_wchar_ucs2be()
207 CK((*filter->output_function)(((c & 0xFF) << 8) | filter->cache, filter->data)); in mbfl_filt_conv_ucs2le_wchar()
215 CK((*filter->output_function)(c & 0xFF, filter->data)); in mbfl_filt_conv_wchar_ucs2le()
216 CK((*filter->output_function)((c >> 8) & 0xFF, filter->data)); in mbfl_filt_conv_wchar_ucs2le()
228 CK((*filter->output_function)(MBFL_BAD_INPUT, filter->data)); in mbfl_filt_conv_ucs2_wchar_flush()
[all …]
H A Dmbfilter_utf8.c322 filter->status = filter->cache = 0; in mbfl_filt_put_invalid_char()
335 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_utf8_wchar()
354 filter->status = filter->cache = 0; in mbfl_filt_conv_utf8_wchar()
355 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf8_wchar()
393 filter->cache = (filter->cache<<6) | (c & 0x3f); in mbfl_filt_conv_utf8_wchar()
415 (*filter->flush_function)(filter->data); in mbfl_filt_conv_utf8_wchar_flush()
425 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_wchar_utf8()
592 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_utf8_mobile_wchar()
628 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_utf8_mobile_wchar()
669 filter->cache = (filter->cache << 6) | (c & 0x3f); in mbfl_filt_conv_utf8_mobile_wchar()
[all …]
H A Dmbfilter_uuencode.c81 switch(filter->status) { in mbfl_filt_conv_uudec()
90 filter->cache = 0; in mbfl_filt_conv_uudec()
92 filter->cache++; in mbfl_filt_conv_uudec()
100 if (filter->cache == 5) in mbfl_filt_conv_uudec()
104 filter->cache = 0; in mbfl_filt_conv_uudec()
114 filter->cache = n << 24; in mbfl_filt_conv_uudec()
132 filter->cache |= n; in mbfl_filt_conv_uudec()
144 CK((*filter->output_function)( (A << 2) | (B >> 4), filter->data)); in mbfl_filt_conv_uudec()
146 CK((*filter->output_function)( (B << 4) | (C >> 2), filter->data)); in mbfl_filt_conv_uudec()
148 CK((*filter->output_function)( (C << 6) | D, filter->data)); in mbfl_filt_conv_uudec()
[all …]
H A Dmbfilter_utf16.c300 filter->cache = filter->status = 0; in mbfl_filt_conv_utf16_wchar()
314 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16_wchar()
343 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16be_wchar()
348 filter->cache = (filter->cache << 8) | (c & 0xFF); in mbfl_filt_conv_utf16be_wchar()
362 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16be_wchar()
366 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16be_wchar()
415 CK((*filter->output_function)(filter->cache + ((c & 0xff) << 8), filter->data)); in mbfl_filt_conv_utf16le_wchar()
420 filter->cache = (filter->cache << 10) + (c & 0xff); in mbfl_filt_conv_utf16le_wchar()
435 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16le_wchar()
441 CK((*filter->output_function)(n, filter->data)); in mbfl_filt_conv_utf16le_wchar()
[all …]
H A Dmbfilter_singlebyte.c28 CK((*filter->output_function)(c, filter->data)); in mbfl_conv_singlebyte_table()
30 CK((*filter->output_function)(MBFL_BAD_INPUT, filter->data)); in mbfl_conv_singlebyte_table()
40 CK((*filter->output_function)(c, filter->data)); in mbfl_conv_reverselookup_table()
46 CK((*filter->output_function)(i + tbl_min, filter->data)); in mbfl_conv_reverselookup_table()
152 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_wchar_ascii()
200 return (*filter->output_function)(c, filter->data); in mbfl_filt_conv_8859_1_wchar()
206 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_wchar_8859_1()
504 CK((*filter->output_function)(0x80 + n, filter->data)); in mbfl_filt_conv_wchar_cp1252()
510 CK((*filter->output_function)(c, filter->data)); in mbfl_filt_conv_wchar_cp1252()
525 CK((*filter->output_function)(s, filter->data)); in mbfl_filt_conv_cp1252_wchar()
[all …]
H A Dmbfilter_htmlent.h39 void mbfl_filt_conv_html_dec_ctor(mbfl_convert_filter *filter);
40 void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter);
41 int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter);
42 int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter);
43 int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter);
44 int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter);
/php-src/ext/mbstring/libmbfl/mbfl/
H A Dmbfl_convert.c105 return filter; in mbfl_convert_filter_new()
122 (*filter->filter_dtor)(filter); in mbfl_convert_filter_delete()
130 return (*filter->filter_function)(c, filter); in mbfl_convert_filter_feed()
137 if ((*filter->filter_function)(*p++, filter) < 0) { in mbfl_convert_filter_feed_string()
146 (*filter->filter_flush)(filter); in mbfl_convert_filter_flush()
153 (*filter->filter_dtor)(filter); in mbfl_convert_filter_reset()
162 …mbfl_convert_filter_init(filter, from, to, vtbl, filter->output_function, filter->flush_function, in mbfl_convert_filter_reset()
184 if ((*filter->filter_function)(c, filter) < 0) { in mbfl_convert_filter_strcat()
211 ret = (*filter->filter_function)('0', filter); in mbfl_filt_conv_output_hex()
313 filter->status = filter->cache = 0; in mbfl_filt_conv_common_ctor()
[all …]
H A Dmbfl_convert.h48 void (*filter_dtor)(mbfl_convert_filter *filter);
50 int (*filter_function)(int c, mbfl_convert_filter *filter);
69 MBFLAPI extern void mbfl_convert_filter_delete(mbfl_convert_filter *filter);
70 MBFLAPI extern int mbfl_convert_filter_feed(int c, mbfl_convert_filter *filter);
71 MBFLAPI extern unsigned char* mbfl_convert_filter_feed_string(mbfl_convert_filter *filter, unsigned…
72 MBFLAPI extern int mbfl_convert_filter_flush(mbfl_convert_filter *filter);
75 MBFLAPI extern int mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter);
78 MBFLAPI extern void mbfl_filt_conv_common_ctor(mbfl_convert_filter *filter);
79 MBFLAPI extern int mbfl_filt_conv_common_flush(mbfl_convert_filter *filter);
81 MBFLAPI extern void mbfl_convert_filter_devcat(mbfl_convert_filter *filter, mbfl_memory_device *src…
[all …]
/php-src/ext/standard/tests/filters/
H A Dbasic.phpt2 basic stream filter tests
15 echo "filter: $name\n";
22 foreach ($filters as $filter) {
23 filter_test(array($filter));
30 filter: string.rot13
31 resource(%d) of type (stream filter)
33 filter: string.toupper
34 resource(%d) of type (stream filter)
36 filter: string.tolower
39 filter: string.rot13
[all …]
H A Dobject_init_failure.phpt2 Creating the stream filter object may fail
8 stream_filter_register('sample.filter', SampleFilter::class);
10 var_dump(file_get_contents('php://filter/read=sample.filter/resource='. __FILE__));
16 Warning: file_get_contents(): Unable to create or locate filter "sample.filter" in %s on line %d
18 Warning: file_get_contents(): Unable to create filter (sample.filter) in %s on line %d
H A Dobject_init_failure_2.phpt2 Creating the stream filter object may fail (include variation)
8 stream_filter_register('sample.filter', SampleFilter::class);
10 include 'php://filter/read=sample.filter/resource='. __FILE__;
16 Warning: main(): Unable to create or locate filter "sample.filter" in %s on line %d
18 Warning: main(): Unable to create filter (sample.filter) in %s on line %d
H A Dfilter_errors_user.phpt2 Filter errors: user filter
8 function filter($in, $out, &$consumed, $closing): int {
13 function filter($in, $out, &$consumed, $closing): int {
19 function filter($in, $out, &$consumed, $closing): int {
28 function filter($in, $out, &$consumed, $closing): int {
37 function filter($in, $out, &$consumed, $closing): int {
72 foreach($filters as $filter) {
73 stream_filter_remove($filter);
137 Warning: stream_filter_remove(): Unable to flush filter, not removing in %s
140 Warning: stream_filter_remove(): Unable to flush filter, not removing in %s
[all …]
/php-src/main/streams/
H A Dfilter.c261 return filter; in php_stream_filter_create()
275 return filter; in _php_stream_filter_alloc()
281 filter->fops->dtor(filter); in php_stream_filter_free()
282 pefree(filter, filter->is_persistent); in php_stream_filter_free()
330 status = filter->fops->filter(stream, filter, brig_inp, brig_outp, &consumed, PSFS_FLAG_NORMAL); in php_stream_filter_append_ex()
408 if (!filter->chain || !filter->chain->stream) { in _php_stream_filter_flush()
486 filter->prev->next = filter->next; in php_stream_filter_remove()
488 filter->chain->head = filter->next; in php_stream_filter_remove()
491 filter->next->prev = filter->prev; in php_stream_filter_remove()
493 filter->chain->tail = filter->prev; in php_stream_filter_remove()
[all …]
/php-src/ext/filter/
H A Dconfig.m41 PHP_ARG_ENABLE([filter],
2 [whether to enable input filter support],
3 [AS_HELP_STRING([--disable-filter],
4 [Disable input filter support])],
8 PHP_NEW_EXTENSION([filter],
9 [filter.c sanitizing_filters.c logical_filters.c callback_filter.c],
13 PHP_INSTALL_HEADERS([ext/filter], [php_filter.h])
14 PHP_ADD_EXTENSION_DEP(filter, pcre)
H A Dphp_filter.h33 PHP_MINIT_FUNCTION(filter);
34 PHP_MSHUTDOWN_FUNCTION(filter);
35 PHP_RINIT_FUNCTION(filter);
36 PHP_RSHUTDOWN_FUNCTION(filter);
37 PHP_MINFO_FUNCTION(filter);
39 ZEND_BEGIN_MODULE_GLOBALS(filter)
50 ZEND_END_MODULE_GLOBALS(filter)
56 #define IF_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(filter, v)
/php-src/ext/filter/tests/
H A Dbug42718-2.phpt2 Bug #42718 - 2 (unsafe_raw filter not applied when configured as default filter)
4 filter
7 filter.default=unsafe_raw
8 filter.default_flags=
13 echo ini_get('filter.default') . "\n";
14 echo ini_get('filter.default_flags') . "\n";
H A Dbug42718.phpt2 Bug #42718 (unsafe_raw filter not applied when configured as default filter)
4 FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags
6 filter
8 filter.default=unsafe_raw
9 filter.default_flags=4
14 echo ini_get('filter.default') . "\n";
15 echo ini_get('filter.default_flags') . "\n";

Completed in 93 milliseconds

12345678910>>...12