Add Octal dump format.
This commit is contained in:
parent
70a1236626
commit
86a2bf1961
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: sys_display.c,v 1.3 1999/10/08 17:47:49 steve Exp $"
|
||||
#ident "$Id: sys_display.c,v 1.4 1999/10/10 14:50:50 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_user.h"
|
||||
|
|
@ -37,6 +37,17 @@ static void format_binary(vpiHandle argv, int fsize)
|
|||
vpi_printf("%s", value.value.str);
|
||||
}
|
||||
|
||||
static void format_octal(vpiHandle argv, int fsize)
|
||||
{
|
||||
s_vpi_value value;
|
||||
vpiHandle item = vpi_scan(argv);
|
||||
if (item == 0) return;
|
||||
|
||||
value.format = vpiOctStrVal;
|
||||
vpi_get_value(item, &value);
|
||||
vpi_printf("%s", value.value.str);
|
||||
}
|
||||
|
||||
static void format_decimal(vpiHandle argv, int fsize)
|
||||
{
|
||||
s_vpi_value value;
|
||||
|
|
@ -131,6 +142,11 @@ static void format(s_vpi_value*fmt, vpiHandle argv)
|
|||
format_m(argv, fsize);
|
||||
cp += 1;
|
||||
break;
|
||||
case 'o':
|
||||
case 'O':
|
||||
format_octal(argv, fsize);
|
||||
cp += 1;
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
format_time(argv, fsize);
|
||||
|
|
@ -244,6 +260,9 @@ void sys_display_register()
|
|||
|
||||
/*
|
||||
* $Log: sys_display.c,v $
|
||||
* Revision 1.4 1999/10/10 14:50:50 steve
|
||||
* Add Octal dump format.
|
||||
*
|
||||
* Revision 1.3 1999/10/08 17:47:49 steve
|
||||
* Add the %t formatting escape.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue