/[pcre]/code/trunk/pcre16_utf16_utils.c
ViewVC logotype

Diff of /code/trunk/pcre16_utf16_utils.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 789 by zherczeg, Wed Dec 7 14:36:26 2011 UTC revision 794 by zherczeg, Thu Dec 8 07:36:41 2011 UTC
# Line 77  Returns:     the number of characters pl Line 77  Returns:     the number of characters pl
77  int  int
78  pcre16_utf16_to_host_byte_order(PCRE_SCHAR16 *output, PCRE_SPTR16 input, int length, int keep_boms)  pcre16_utf16_to_host_byte_order(PCRE_SCHAR16 *output, PCRE_SPTR16 input, int length, int keep_boms)
79  {  {
80  #ifdef SUPPORT_UTF16  #ifdef SUPPORT_UTF
81  /* This function converts any UTF-16 string to host byte order and optionally removes  /* This function converts any UTF-16 string to host byte order and optionally removes
82  any Byte Order Marks (BOMS). Returns with the remainig length. */  any Byte Order Marks (BOMS). Returns with the remainig length. */
83  BOOL same_bo = TRUE;  BOOL same_bo = TRUE;
# Line 108  while (iptr < end) Line 108  while (iptr < end)
108      *optr++ = same_bo ? c : ((c >> 8) | (c << 8)); /* Flip bytes if needed. */      *optr++ = same_bo ? c : ((c >> 8) | (c << 8)); /* Flip bytes if needed. */
109    }    }
110    
111  #else  #else /* SUPPORT_UTF */
112  (void)(output);  /* Keep picky compilers happy */  (void)(output);  /* Keep picky compilers happy */
113  (void)(input);  (void)(input);
114  (void)(keep_boms);  (void)(keep_boms);
115  #endif  #endif /* SUPPORT_UTF */
116  return length;  return length;
117  }  }
118    

Legend:
Removed from v.789  
changed lines
  Added in v.794

  ViewVC Help
Powered by ViewVC 1.1.5