[php-i18n-commits] cvs commit: libmbfl/mbfl mbfilter.c

Back to archive index

Moriyoshi Koizumi moriy****@users*****
2005年 3月 24日 (木) 08:21:18 JST


moriyoshi    05/03/24 08:21:18

  Modified:    mbfl     Tag: LIBMBFL_1_0 mbfilter.c
  Log:
  - A workaround for PR #32311****@bugs*****.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.13  +20 -1     libmbfl/mbfl/mbfilter.c
  
  Index: mbfilter.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/libmbfl/mbfl/mbfilter.c,v
  retrieving revision 1.8.2.12
  retrieving revision 1.8.2.13
  diff -u -r1.8.2.12 -r1.8.2.13
  --- mbfilter.c	23 Feb 2005 13:30:15 -0000	1.8.2.12
  +++ mbfilter.c	23 Mar 2005 23:21:18 -0000	1.8.2.13
  @@ -1960,6 +1960,25 @@
   static int
   mime_header_encoder_collector(int c, void *data)
   {
  +	static int qp_table[256] = {
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */
  +		1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */
  +		0, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 1, 0, 1, /* 0x10 */
  +		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */
  +		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x50 */
  +		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
  +		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x70 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xA0 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xB0 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xC0 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xD0 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xE0 */
  +		1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1  /* 0xF0 */
  +	};
  +
   	int n;
   	struct mime_header_encoder_data *pe = (struct mime_header_encoder_data *)data;
   
  @@ -1969,7 +1988,7 @@
   		break;
   
   	default:	/* ASCII */
  -		if (c >= 0x21 && c < 0x7f) {	/* ASCII exclude SPACE and CTLs */
  +		if (!qp_table[(c & 0xff)]) { /* ordinary characters */
   			mbfl_memory_device_output(c, &pe->tmpdev);
   			pe->status1 = 1;
   		} else if (pe->status1 == 0 && c == 0x20) {	/* repeat SPACE */
  
  
  



php-i18n-commits メーリングリストの案内
Back to archive index