confdata.c (b92d804a51796b77c7b2b11881b2700eaac88114) confdata.c (84dd95d4f87a0dd2b635df936b1fc27d7424e097)
1/*
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3 * Released under the terms of the GNU GPL v2.0.
4 */
5
6#include <sys/stat.h>
7#include <ctype.h>
8#include <errno.h>

--- 14 unchanged lines hidden (view full) ---

23
24static void conf_warning(const char *fmt, ...)
25 __attribute__ ((format (printf, 1, 2)));
26
27static void conf_message(const char *fmt, ...)
28 __attribute__ ((format (printf, 1, 2)));
29
30static const char *conf_filename;
1/*
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3 * Released under the terms of the GNU GPL v2.0.
4 */
5
6#include <sys/stat.h>
7#include <ctype.h>
8#include <errno.h>

--- 14 unchanged lines hidden (view full) ---

23
24static void conf_warning(const char *fmt, ...)
25 __attribute__ ((format (printf, 1, 2)));
26
27static void conf_message(const char *fmt, ...)
28 __attribute__ ((format (printf, 1, 2)));
29
30static const char *conf_filename;
31static int conf_lineno, conf_warnings, conf_unsaved;
31static int conf_lineno, conf_warnings;
32
33const char conf_defname[] = "arch/$ARCH/defconfig";
34
35static void conf_warning(const char *fmt, ...)
36{
37 va_list ap;
38 va_start(ap, fmt);
39 fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno);

--- 245 unchanged lines hidden (view full) ---

285 }
286 if (!in)
287 return 1;
288
289load:
290 conf_filename = name;
291 conf_lineno = 0;
292 conf_warnings = 0;
32
33const char conf_defname[] = "arch/$ARCH/defconfig";
34
35static void conf_warning(const char *fmt, ...)
36{
37 va_list ap;
38 va_start(ap, fmt);
39 fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno);

--- 245 unchanged lines hidden (view full) ---

285 }
286 if (!in)
287 return 1;
288
289load:
290 conf_filename = name;
291 conf_lineno = 0;
292 conf_warnings = 0;
293 conf_unsaved = 0;
294
295 def_flags = SYMBOL_DEF << def;
296 for_all_symbols(i, sym) {
297 sym->flags |= SYMBOL_CHANGED;
298 sym->flags &= ~(def_flags|SYMBOL_VALID);
299 if (sym_is_choice(sym))
300 sym->flags |= def_flags;
301 switch (sym->type) {

--- 102 unchanged lines hidden (view full) ---

404 free(line);
405 fclose(in);
406 return 0;
407}
408
409int conf_read(const char *name)
410{
411 struct symbol *sym;
293
294 def_flags = SYMBOL_DEF << def;
295 for_all_symbols(i, sym) {
296 sym->flags |= SYMBOL_CHANGED;
297 sym->flags &= ~(def_flags|SYMBOL_VALID);
298 if (sym_is_choice(sym))
299 sym->flags |= def_flags;
300 switch (sym->type) {

--- 102 unchanged lines hidden (view full) ---

403 free(line);
404 fclose(in);
405 return 0;
406}
407
408int conf_read(const char *name)
409{
410 struct symbol *sym;
411 int conf_unsaved = 0;
412 int i;
413
414 sym_set_change_count(0);
415
416 if (conf_read_simple(name, S_DEF_USER)) {
417 sym_calc_value(modules_sym);
418 return 1;
419 }

--- 830 unchanged lines hidden ---
412 int i;
413
414 sym_set_change_count(0);
415
416 if (conf_read_simple(name, S_DEF_USER)) {
417 sym_calc_value(modules_sym);
418 return 1;
419 }

--- 830 unchanged lines hidden ---