Home | History | Annotate | Download | only in src

Lines Matching defs:fp

55 static bool config_parse(FILE *fp, config_t *config);
88 FILE *fp = fopen(filename, "rt");
89 if (!fp) {
95 if (!config_parse(fp, config)) {
100 fclose(fp);
292 FILE *fp = NULL;
315 fp = fopen(temp_filename, "wt");
316 if (!fp) {
323 if (fprintf(fp, "[%s]\n", section->name) < 0) {
330 if (fprintf(fp, "%s = %s\n", entry->key, entry->value) < 0) {
338 if (fputc('\n', fp) == EOF) {
346 if (fsync(fileno(fp)) < 0) {
350 if (fclose(fp) == EOF) {
354 fp = NULL;
385 if (fp)
386 fclose(fp);
409 static bool config_parse(FILE *fp, config_t *config) {
410 assert(fp != NULL);
418 while (fgets(line, sizeof(line), fp)) {