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

Diff of /code/trunk/pcre16_ord2utf16.c

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

code/branches/pcre16/pcre16_ord2utf16.c revision 782 by zherczeg, Sat Dec 3 23:58:37 2011 UTC code/trunk/pcre16_ord2utf16.c revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2008 University of Cambridge             Copyright (c) 1997-2012 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 67  Returns:     number of characters placed Line 67  Returns:     number of characters placed
67  int  int
68  PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)  PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
69  {  {
70  #ifdef SUPPORT_UTF16  #ifdef SUPPORT_UTF
71    
72  /* Checking invalid cvalue character, encoded as invalid UTF-16 character.  /* Checking invalid cvalue character, encoded as invalid UTF-16 character.
73  Should never happen in practice. */  Should never happen in practice. */
# Line 85  cvalue -= 0x10000; Line 85  cvalue -= 0x10000;
85  *buffer = 0xdc00 | (cvalue & 0x3ff);  *buffer = 0xdc00 | (cvalue & 0x3ff);
86  return 2;  return 2;
87    
88  #else  #else /* SUPPORT_UTF */
   
89  (void)(cvalue);  /* Keep compiler happy; this function won't ever be */  (void)(cvalue);  /* Keep compiler happy; this function won't ever be */
90  (void)(buffer);  /* called when SUPPORT_UTF8 is not defined. */  (void)(buffer);  /* called when SUPPORT_UTF is not defined. */
91  return 0;  return 0;
92    #endif /* SUPPORT_UTF */
 #endif  
93  }  }
94    
95  /* End of pcre16_ord2utf16.c */  /* End of pcre16_ord2utf16.c */

Legend:
Removed from v.782  
changed lines
  Added in v.836

  ViewVC Help
Powered by ViewVC 1.1.5