URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 27 |
Rev 174 |
/*
|
/*
|
* Reconfigurable error handler
|
* Reconfigurable error handler
|
*/
|
*/
|
|
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdarg.h>
|
#include <stdarg.h>
|
#include <string.h>
|
#include <string.h>
|
#if (UNIX | DOS_DJGPP)
|
#if (UNIX | DOS_DJGPP)
|
#include <unistd.h>
|
#include <unistd.h>
|
#endif
|
#endif
|
#include "device.h"
|
#include "device.h"
|
|
|
/* output error message and return -1*/
|
/* output error message and return -1*/
|
int
|
int
|
GdError(const char *format, ...)
|
GdError(const char *format, ...)
|
{
|
{
|
va_list args;
|
va_list args;
|
char buf[512];
|
char buf[512];
|
|
|
va_start(args, format);
|
va_start(args, format);
|
vsprintf(buf, format, args);
|
vsprintf(buf, format, args);
|
va_end(args);
|
va_end(args);
|
write(2, buf, strlen(buf));
|
write(2, buf, strlen(buf));
|
return -1;
|
return -1;
|
}
|
}
|
|
|
/* null routine to consume messages */
|
/* null routine to consume messages */
|
int
|
int
|
GdErrorNull(const char *format, ...)
|
GdErrorNull(const char *format, ...)
|
{
|
{
|
return -1;
|
return -1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.