~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to ext/mbstring/mbstring.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
   +----------------------------------------------------------------------+
18
18
 */
19
19
 
20
 
/* $Id: mbstring.c 293036 2010-01-03 09:23:27Z sebastian $ */
 
20
/* $Id: mbstring.c 303805 2010-09-27 23:09:00Z felipe $ */
21
21
 
22
22
/*
23
23
 * PHP 4 Multibyte String module "mbstring"
196
196
        {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strpos"},
197
197
        {MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"},
198
198
        {MB_OVERLOAD_STRING, "stripos", "mb_stripos", "mb_orig_stripos"},
199
 
        {MB_OVERLOAD_STRING, "strripos", "mb_strripos", "mb_orig_stripos"},
 
199
        {MB_OVERLOAD_STRING, "strripos", "mb_strripos", "mb_orig_strripos"},
200
200
        {MB_OVERLOAD_STRING, "strstr", "mb_strstr", "mb_orig_strstr"},
201
201
        {MB_OVERLOAD_STRING, "strrchr", "mb_strrchr", "mb_orig_strrchr"},
202
202
        {MB_OVERLOAD_STRING, "stristr", "mb_stristr", "mb_orig_stristr"},
4044
4044
        }
4045
4045
 
4046
4046
        /* other headers */
4047
 
#define PHP_MBSTR_MAIL_MIME_HEADER1 "Mime-Version: 1.0"
 
4047
#define PHP_MBSTR_MAIL_MIME_HEADER1 "MIME-Version: 1.0"
4048
4048
#define PHP_MBSTR_MAIL_MIME_HEADER2 "Content-Type: text/plain"
4049
4049
#define PHP_MBSTR_MAIL_MIME_HEADER3 "; charset="
4050
4050
#define PHP_MBSTR_MAIL_MIME_HEADER4 "Content-Transfer-Encoding: "
4057
4057
                }
4058
4058
        }
4059
4059
 
4060
 
        mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER1, sizeof(PHP_MBSTR_MAIL_MIME_HEADER1) - 1);
4061
 
        mbfl_memory_device_strncat(&device, "\n", 1);
 
4060
        if (!zend_hash_exists(&ht_headers, "MIME-VERSION", sizeof("MIME-VERSION") - 1)) {
 
4061
                mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER1, sizeof(PHP_MBSTR_MAIL_MIME_HEADER1) - 1);
 
4062
                mbfl_memory_device_strncat(&device, "\n", 1);
 
4063
        }
4062
4064
 
4063
4065
        if (!suppressed_hdrs.cnt_type) {
4064
4066
                mbfl_memory_device_strncat(&device, PHP_MBSTR_MAIL_MIME_HEADER2, sizeof(PHP_MBSTR_MAIL_MIME_HEADER2) - 1);