URL
https://opencores.org/ocsvn/eco32/eco32/trunk
[/] [eco32/] [trunk/] [sim/] [error.c] - Diff between revs 8 and 25
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 8 |
Rev 25 |
/*
|
/*
|
* error.c -- error handler
|
* error.c -- error handler
|
*/
|
*/
|
|
|
|
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
#include <stdarg.h>
|
#include <stdarg.h>
|
|
|
#include "common.h"
|
#include "common.h"
|
#include "console.h"
|
#include "console.h"
|
#include "error.h"
|
#include "error.h"
|
#include "cpu.h"
|
#include "cpu.h"
|
#include "mmu.h"
|
#include "mmu.h"
|
#include "memory.h"
|
#include "memory.h"
|
#include "timer.h"
|
#include "timer.h"
|
#include "dspkbd.h"
|
#include "dspkbd.h"
|
#include "term.h"
|
#include "term.h"
|
#include "disk.h"
|
#include "disk.h"
|
#include "output.h"
|
#include "output.h"
|
|
#include "shutdown.h"
|
#include "graph.h"
|
#include "graph.h"
|
|
|
|
|
void error(char *fmt, ...) {
|
void error(char *fmt, ...) {
|
va_list ap;
|
va_list ap;
|
|
|
cpuExit();
|
cpuExit();
|
mmuExit();
|
mmuExit();
|
memoryExit();
|
memoryExit();
|
timerExit();
|
timerExit();
|
displayExit();
|
displayExit();
|
keyboardExit();
|
keyboardExit();
|
termExit();
|
termExit();
|
diskExit();
|
diskExit();
|
outputExit();
|
outputExit();
|
|
shutdownExit();
|
graphExit();
|
graphExit();
|
cExit();
|
cExit();
|
va_start(ap, fmt);
|
va_start(ap, fmt);
|
fprintf(stderr, "Error: ");
|
fprintf(stderr, "Error: ");
|
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
va_end(ap);
|
va_end(ap);
|
exit(1);
|
exit(1);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.