msgformat_data.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | http://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Stanislav Malyshev <stas@zend.com> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef MSG_FORMAT_DATA_H
  17. #define MSG_FORMAT_DATA_H
  18. #include <php.h>
  19. #include "../intl_error.h"
  20. #include <unicode/umsg.h>
  21. typedef struct {
  22. // error hangling
  23. intl_error error;
  24. // formatter handling
  25. UMessageFormat* umsgf;
  26. char* orig_format;
  27. ulong orig_format_len;
  28. HashTable* arg_types;
  29. int tz_set; /* if we've already the time zone in sub-formats */
  30. } msgformat_data;
  31. msgformat_data* msgformat_data_create( TSRMLS_D );
  32. void msgformat_data_init( msgformat_data* mf_data TSRMLS_DC );
  33. void msgformat_data_free( msgformat_data* mf_data TSRMLS_DC );
  34. #ifdef MSG_FORMAT_QUOTE_APOS
  35. int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *ec);
  36. #endif
  37. #endif // MSG_FORMAT_DATA_H