OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_61/] [or1ksim/] [sim-config.c] - Diff between revs 426 and 427

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 426 Rev 427
Line 23... Line 23...
#include "sim-config.h"
#include "sim-config.h"
#include "abstract.h"
#include "abstract.h"
#include "spr_defs.h"
#include "spr_defs.h"
#include "pic.h"
#include "pic.h"
 
 
#define WARNING(s) fprintf (stderr, "WARNING: config.%s: %s\n", sections[section], s)
#define WARNING(s) fprintf (stderr, "WARNING: config.%s: %s\n", sections[section].name, (s))
#define ERROR(s) {fprintf (stderr, "ERROR: %s\n", s); if (runtime.sim.init) exit (1);}
#define ERROR(s) {fprintf (stderr, "ERROR: %s\n", s); if (runtime.sim.init) exit (1);}
 
 
struct config config;
struct config config;
struct runtime runtime;
struct runtime runtime;
 
 
Line 205... Line 205...
      default:
      default:
        while ((ch = (f ? fgetc (f) : *str++)) != *fmt) {
        while ((ch = (f ? fgetc (f) : *str++)) != *fmt) {
          if (!isblank (ch)) {
          if (!isblank (ch)) {
            char tmp[200];
            char tmp[200];
            sprintf (tmp, "unexpected char '%c' (expecting '%c')\n", ch, *fmt);
            sprintf (tmp, "unexpected char '%c' (expecting '%c')\n", ch, *fmt);
 
            fprintf (stderr, "WARNING: config.%s: %s\n", sections[section], tmp);
            WARNING(tmp);
            WARNING(tmp);
          }
          }
          if ((f ? feof (f) : *str)) return 1;
          if ((f ? feof (f) : *str)) return 1;
        }
        }
        fmt++;
        fmt++;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.