Lines Matching defs:buffer
18 static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t flagSize, const char ** flagNames, int32_t numOfFlags, UErrorCode *status);
19 static int32_t getFlagOffset(const char *buffer, int32_t bufferSize);
26 char* buffer = NULL;
38 buffer = (char *)uprv_malloc(sizeof(char) * currentBufferSize);
41 if (buffer == NULL || tmpFlagBuffer == NULL) {
50 uprv_free(buffer);
51 buffer = (char *)uprv_malloc(sizeof(char) * currentBufferSize);
52 if (buffer == NULL) {
58 if (T_FileStream_readLine(f, buffer, currentBufferSize) == NULL) {
62 if (buffer[0] == '#') {
66 if ((int32_t)uprv_strlen(buffer) == (currentBufferSize - 1) && buffer[currentBufferSize-2] != '\n') {
67 /* Allocate more space for buffer if it didnot read the entrire line */
72 idx = extractFlag(buffer, currentBufferSize, tmpFlagBuffer, flagBufferSize, flagNames, numOfFlags, status);
98 uprv_free(buffer);
117 static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t flagSize, const char **flagNames, int32_t numOfFlags, UErrorCode *status) {
123 if (buffer[0] != 0) {
125 offset = getFlagOffset(buffer, bufferSize);
126 pBuffer = buffer+offset;
152 if (uprv_strncmp(buffer, flagNames[i], offset) == 0) {
165 static int32_t getFlagOffset(const char *buffer, int32_t bufferSize) {
169 if (buffer[offset] == '=') {