Home | History | Annotate | Download | only in genrb

Lines Matching refs:buffer

39 appendEncodedByte(uint16_t* buffer, uint16_t* buffLimit, uint8_t value, uint8_t state[],UErrorCode* status) {
45 if(buffer < buffLimit){
46 *buffer++ = c;
51 return buffer;
56 return buffer;
64 encodeRunByte(uint16_t* buffer,uint16_t* bufLimit, uint8_t value, int32_t length, uint8_t state[], UErrorCode* status) {
72 buffer = appendEncodedByte(buffer,bufLimit, ESCAPE_BYTE, state,status);
74 buffer = appendEncodedByte(buffer,bufLimit, value, state, status);
80 buffer = appendEncodedByte(buffer, bufLimit,ESCAPE_BYTE, state,status);
82 buffer = appendEncodedByte(buffer,bufLimit, value, state, status);
85 buffer = appendEncodedByte(buffer,bufLimit, ESCAPE_BYTE, state,status);
86 buffer = appendEncodedByte(buffer,bufLimit, (char)length, state, status);
87 buffer = appendEncodedByte(buffer,bufLimit, value, state, status); /* Don't need to escape this value*/
89 return buffer;
92 #define APPEND( buffer, bufLimit, value, num, status){ \
93 if(buffer<bufLimit){ \
94 *buffer++=(value); \
106 encodeRunShort(uint16_t* buffer,uint16_t* bufLimit, uint16_t value, int32_t length,UErrorCode* status) {
112 APPEND(buffer,bufLimit,ESCAPE, num, status);
115 APPEND(buffer,bufLimit,value,num, status);
121 APPEND(buffer,bufLimit,ESCAPE,num,status);
124 APPEND(buffer,bufLimit,value,num,status);
127 APPEND(buffer,bufLimit,ESCAPE,num,status);
128 APPEND(buffer,bufLimit,(uint16_t) length, num,status);
129 APPEND(buffer,bufLimit,(uint16_t)value, num, status); /* Don't need to escape this value */
131 return buffer;
148 usArrayToRLEString(const uint16_t* src,int32_t srcLen,uint16_t* buffer, int32_t bufLen,UErrorCode* status) {
149 uint16_t* bufLimit = buffer+bufLen;
150 uint16_t* saveBuffer = buffer;
151 if(buffer < bufLimit){
152 *buffer++ = (uint16_t)(srcLen>>16);
153 if(buffer<bufLimit){
157 *buffer++ = (uint16_t) srcLen;
164 buffer = encodeRunShort(buffer,bufLimit, (uint16_t)runValue, runLength,status);
169 buffer= encodeRunShort(buffer,bufLimit,(uint16_t)runValue, runLength,status);
176 return (int32_t)(buffer - saveBuffer);
194 byteArrayToRLEString(const uint8_t* src,int32_t srcLen, uint16_t* buffer,int32_t bufLen, UErrorCode* status) {
195 const uint16_t* saveBuf = buffer;
196 uint16_t* bufLimit = buffer+bufLen;
197 if(buffer < bufLimit){
198 *buffer++ = ((uint16_t) (srcLen >> 16));
200 if(buffer<bufLimit){
205 *buffer++=((uint16_t) srcLen);
212 buffer = encodeRunByte(buffer, bufLimit,runValue, runLength, state,status);
217 buffer = encodeRunByte(buffer,bufLimit, runValue, runLength, state, status);
223 buffer = appendEncodedByte(buffer,bufLimit, 0, state ,status);
231 return (int32_t) (buffer - saveBuf);