Add tf_error and tf_warning from mruff

This commit is contained in:
steve 2002-05-30 02:10:08 +00:00
parent 9537fd7f0b
commit 0838dd24a4
2 changed files with 37 additions and 2 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: io_print.c,v 1.1 2002/05/23 03:35:42 steve Exp $" #ident "$Id: io_print.c,v 1.2 2002/05/30 02:10:08 steve Exp $"
#endif #endif
# include <vpi_user.h> # include <vpi_user.h>
@ -34,8 +34,33 @@ void io_printf(const char *fmt, ...)
va_end(ap); va_end(ap);
} }
void tf_warning(const char *fmt, ...)
{
va_list ap;
vpi_printf("warning! ");
va_start(ap, fmt);
vpi_vprintf(fmt, ap);
va_end(ap);
}
void tf_error(const char *fmt, ...)
{
va_list ap;
vpi_printf("error! ");
va_start(ap, fmt);
vpi_vprintf(fmt, ap);
va_end(ap);
}
/* /*
* $Log: io_print.c,v $ * $Log: io_print.c,v $
* Revision 1.2 2002/05/30 02:10:08 steve
* Add tf_error and tf_warning from mruff
*
* Revision 1.1 2002/05/23 03:35:42 steve * Revision 1.1 2002/05/23 03:35:42 steve
* Add the io_printf function to libveriuser. * Add the io_printf function to libveriuser.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: veriuser.h,v 1.4 2002/05/24 20:29:07 steve Exp $" #ident "$Id: veriuser.h,v 1.5 2002/05/30 02:10:08 steve Exp $"
#endif #endif
/* /*
@ -51,12 +51,22 @@ extern void io_printf (const char *, ...)
extern char* mc_scan_plusargs(char*plusarg); extern char* mc_scan_plusargs(char*plusarg);
extern int tf_dofinish(void); extern int tf_dofinish(void);
extern int tf_dostop(void); extern int tf_dostop(void);
extern void tf_error(const char*, ...)
__attribute__((format (printf,1,2)));
extern void tf_warning(const char*, ...)
__attribute__((format (printf,1,2)));
EXTERN_C_END EXTERN_C_END
/* /*
* $Log: veriuser.h,v $ * $Log: veriuser.h,v $
* Revision 1.5 2002/05/30 02:10:08 steve
* Add tf_error and tf_warning from mruff
*
* Revision 1.4 2002/05/24 20:29:07 steve * Revision 1.4 2002/05/24 20:29:07 steve
* Implement mc_scan_plusargs. * Implement mc_scan_plusargs.
* *