/[public]/psiconv/trunk/lib/psiconv/unicode.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/unicode.c

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

Revision 228 Revision 268
24#include "unicode.h" 24#include "unicode.h"
25#include "parse_routines.h" 25#include "parse_routines.h"
26#include "generate_routines.h" 26#include "generate_routines.h"
27 27
28#include <string.h> 28#include <string.h>
29#include <stdlib.h>
29 30
30#ifdef DMALLOC 31#ifdef DMALLOC
31#include <dmalloc.h> 32#include <dmalloc.h>
32#endif 33#endif
33 34
142 143
143int psiconv_unicode_write_char(const psiconv_config config, 144int psiconv_unicode_write_char(const psiconv_config config,
144 psiconv_buffer buf, 145 psiconv_buffer buf,
145 int lev, psiconv_ucs2 value) 146 int lev, psiconv_ucs2 value)
146{ 147{
147 psiconv_u8 byte;
148 int i; 148 int i;
149 int res=0; 149 int res=0;
150 150
151 if (config->unicode) { 151 if (config->unicode) {
152 if (value < 0x80) { 152 if (value < 0x80) {
262 for (i = 0; i < haystack_len - needle_len + 1; i++) { 262 for (i = 0; i < haystack_len - needle_len + 1; i++) {
263 for (j = 0; j < needle_len; j++) 263 for (j = 0; j < needle_len; j++)
264 if (haystack[i+j] != needle[j]) 264 if (haystack[i+j] != needle[j])
265 break; 265 break;
266 if (j == needle_len) 266 if (j == needle_len)
267 return haystack+i; 267 return (psiconv_ucs2 *) haystack+i;
268 } 268 }
269 return NULL; 269 return NULL;
270} 270}

Legend:
Removed from v.228  
changed lines
  Added in v.268

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26