Home | History | Annotate | Download | only in toolutil

Lines Matching refs:buffer

16 static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t flagSize, const char ** flagNames, int32_t numOfFlags, UErrorCode *status);
17 static int32_t getFlagOffset(const char *buffer, int32_t bufferSize);
24 char* buffer = uprv_malloc(sizeof(char) * currentBufferSize);
36 if (buffer == NULL) {
45 uprv_free(buffer);
46 buffer = uprv_malloc(sizeof(char) * currentBufferSize);
47 if (buffer == NULL) {
54 if (T_FileStream_readLine(f, buffer, currentBufferSize) == NULL) {
58 if (buffer[0] == '#') {
62 if (uprv_strlen(buffer) == (currentBufferSize - 1) && buffer[currentBufferSize-2] != '\n') {
63 /* Allocate more space for buffer if it didnot read the entrire line */
68 idx = extractFlag(buffer, currentBufferSize, tmpFlagBuffer, flagBufferSize, flagNames, numOfFlags, status);
93 uprv_free(buffer);
108 static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t flagSize, const char **flagNames, int32_t numOfFlags, UErrorCode *status) {
114 if (buffer[0] != 0) {
116 offset = getFlagOffset(buffer, bufferSize);
117 pBuffer = buffer+offset;
143 if (uprv_strncmp(buffer, flagNames[i], offset) == 0) {
156 static int32_t getFlagOffset(const char *buffer, int32_t bufferSize) {
160 if (buffer[offset] == '=') {