~ubuntu-branches/ubuntu/oneiric/mozc/oneiric

« back to all changes in this revision

Viewing changes to base/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-07-14 03:26:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100714032647-13qjisj6m8cm8jdx
Tags: 0.12.410.102-1
* New upstream release (Closes: #588971).
  - Add mozc-server, mozc-utils-gui and scim-mozc packages.
* Update debian/rules.
  Add --gypdir option to build_mozc.py.
* Update debian/control.
  - Bumped standards-version to 3.9.0.
  - Update description.
* Add mozc icon (Closes: #588972).
* Add patch which revises issue 18.
  ibus_mozc_issue18.patch
* kFreeBSD build support.
  support_kfreebsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
  static void UCS2ToUTF8(uint16 c, string *output);
86
86
  static void UCS2ToUTF8Append(uint16 c, string *output);
87
87
 
88
 
#if defined(OS_WINDOWS) && defined(COMPILER_MSVC)
 
88
#ifdef OS_WINDOWS
89
89
  // Converts the encoding of the specified string from UTF-8 to UTF-16, and
90
90
  // vice versa.
91
91
  static int UTF8ToWide(const char *input, wstring *output);
259
259
#ifndef OS_WINDOWS
260
260
  static void UTF8ToEUC(const string &input, string *output);
261
261
  static void EUCToUTF8(const string &input, string *output);
262
 
  static void EUCToSJIS(const string &input, string *output);
263
 
  static void SJISToEUC(const string &input, string *output);
264
262
#endif
265
263
 
266
264
  static void UTF8ToSJIS(const string &input, string *output);
515
513
  // write byte array header to ofs
516
514
  // Windows does not accept static string of size >= 65536.
517
515
  // so we represent string in an array of uint64 in Windows.
518
 
  //  * static const size_t k<name>Size and
519
 
  //  * static const uint64 k<name>Uint64[] and
520
 
  //    static const char *k<name> =
521
 
  //                            reinterpret_cast<const char *>(k<name>Uint64)
 
516
  //  * const size_t k<name>_size and
 
517
  //  * const uint64 k<name>_uint64_data[] and
 
518
  //    const char *k<name>_data =
 
519
  //                     reinterpret_cast<const char *>(k<name>_uint64_data)
522
520
  //    (for Windows), or
523
 
  //  * static const char k<name>[] (for others)
 
521
  //  * const char k<name>_data[] (for others)
524
522
  // are generated.
525
523
  static void WriteByteArray(const string &name, const char *buf,
526
524
                             size_t buf_size, ostream *ofs);
527
525
 
 
526
 
 
527
  // Convert binary file |input| into header file |output|
 
528
  static void MakeByteArrayFile(const string &name,
 
529
                                const string &input,
 
530
                                const string &output);
 
531
 
 
532
  // Convert binary file |input| into header filestream |os|
 
533
  static void MakeByteArrayStream(const string &name,
 
534
                                  const string &input,
 
535
                                  ostream *os);
 
536
 
528
537
  // check endian-ness at runtime.
529
538
  static bool IsLittleEndian();
530
539