Lines Matching refs:buffer

38 bool willBeContinuous(char* buffer, size_t maxlen) {  in willBeContinuous()  argument
41 if (!buffer) return false; in willBeContinuous()
43 len = strnlen(buffer, maxlen); in willBeContinuous()
44 if (len == maxlen && buffer[len - 2] != '\n') return true; in willBeContinuous()
46 p = buffer + len - 1; in willBeContinuous()
47 while (isspace(*p) && p > buffer) p--; in willBeContinuous()
53 char *p, buffer[256] = { in find_by_name_from_current() local
63 while (!feof(file) && fgets(buffer, sizeof(buffer) - 1, file)) { in find_by_name_from_current()
65 skip = willBeContinuous(buffer, sizeof(buffer)); in find_by_name_from_current()
68 skip = willBeContinuous(buffer, sizeof(buffer)); in find_by_name_from_current()
70 p = buffer; in find_by_name_from_current()
91 char buffer[10], *p, *endp; in __get_config_int() local
112 if (!fgets(buffer, sizeof(buffer) - 1, file)) { in __get_config_int()
117 if (willBeContinuous(buffer, sizeof(buffer))) // not supported multi line in __get_config_int()
120 if ((len = strlen(buffer)) == sizeof(buffer) - 1) { in __get_config_int()
121 OSI_loge("It is too long data [%s~]; max", buffer); in __get_config_int()
125 p = buffer; in __get_config_int()
138 OSI_loge("Read failed [%s]", buffer); in __get_config_int()
162 char data[256], *buffer, *p; in get_config_string() local
183 if ((buffer = (char*)malloc(bufferSize)) == NULL) { in get_config_string()
204 buffer[count++] = *p; in get_config_string()
209 buffer[count] = '\0'; in get_config_string()
211 OSI_logd("Get config %s: %s", field, buffer); in get_config_string()
222 memcpy(strBuffer, buffer, count); in get_config_string()
223 free(buffer); in get_config_string()
229 free(buffer); in get_config_string()