Home | History | Annotate | Download | only in io

Lines Matching refs:fTranslit

87         if(file->fTranslit != NULL)
90 old = file->fTranslit->translit;
91 uprv_free(file->fTranslit->buffer);
92 file->fTranslit->buffer=NULL;
93 uprv_free(file->fTranslit);
94 file->fTranslit=NULL;
99 if(file->fTranslit == NULL)
101 file->fTranslit = (UFILETranslitBuffer*) uprv_malloc(sizeof(UFILETranslitBuffer));
102 if(!file->fTranslit)
107 file->fTranslit->capacity = 0;
108 file->fTranslit->length = 0;
109 file->fTranslit->pos = 0;
110 file->fTranslit->buffer = NULL;
114 old = file->fTranslit->translit;
118 file->fTranslit->translit = adopt;
138 if ((!f)||(!f->fTranslit)||(!f->fTranslit->translit))
145 if(f->fTranslit->length > f->fTranslit->pos)
147 memmove(f->fTranslit->buffer, f->fTranslit->buffer + f->fTranslit->pos,
148 (f->fTranslit->length - f->fTranslit->pos)*sizeof(UChar));
150 f->fTranslit->length -= f->fTranslit->pos; /* always */
151 f->fTranslit->pos = 0;
154 newlen = (*count + f->fTranslit->length) * 4;
156 if(newlen > f->fTranslit->capacity)
158 if(f->fTranslit->buffer == NULL)
160 f->fTranslit->buffer = (UChar*)uprv_malloc(newlen * sizeof(UChar));
164 f->fTranslit->buffer = (UChar*)uprv_realloc(f->fTranslit->buffer, newlen * sizeof(UChar));
167 if (f->fTranslit->buffer == NULL) {
170 f->fTranslit->capacity = newlen;
174 u_strncpy(f->fTranslit->buffer + f->fTranslit->length,
177 f->fTranslit->length += *count;
182 textLength = f->fTranslit->length;
188 utrans_transIncrementalUChars(f->fTranslit->translit,
189 f->fTranslit->buffer, /* because we shifted */
191 f->fTranslit->capacity,
198 f->fTranslit->pos = pos.start;
199 f->fTranslit->length = pos.limit;
201 return f->fTranslit->buffer;
205 textLength = f->fTranslit->length;
206 textLimit = f->fTranslit->length;
208 utrans_transUChars(f->fTranslit->translit,
209 f->fTranslit->buffer,
211 f->fTranslit->capacity,
220 f->fTranslit->pos = 0;
221 f->fTranslit->length = 0;
223 return f->fTranslit->buffer;
233 if((!f)||(!f->fTranslit))
256 if((!f)||(!f->fTranslit))
263 if(f->fTranslit->translit)
264 utrans_close(f->fTranslit->translit);
266 if(f->fTranslit->buffer)
268 uprv_free(f->fTranslit->buffer);
271 uprv_free(f->fTranslit);
272 f->fTranslit = NULL;
326 if((f->fTranslit) && (f->fTranslit->translit))