Fallback functionality if readline is not present.
This commit is contained in:
parent
11058017df
commit
218d74f7bb
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: config.h.in,v 1.13 2003/03/13 20:31:40 steve Exp $"
|
#ident "$Id: config.h.in,v 1.14 2003/05/16 03:50:28 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# define SIZEOF_UNSIGNED_LONG_LONG 0
|
# define SIZEOF_UNSIGNED_LONG_LONG 0
|
||||||
|
|
@ -35,6 +35,16 @@
|
||||||
# undef HAVE_GETOPT_H
|
# undef HAVE_GETOPT_H
|
||||||
# undef HAVE_MALLOC_H
|
# undef HAVE_MALLOC_H
|
||||||
# undef HAVE_LIBREADLINE
|
# undef HAVE_LIBREADLINE
|
||||||
|
# undef HAVE_READLINE_READLINE_H
|
||||||
|
# undef HAVE_READLINE_HISTORY_H
|
||||||
|
|
||||||
|
/* Figure if I can use readline. */
|
||||||
|
#undef USE_READLINE
|
||||||
|
#ifdef HAVE_LIB_READLINE
|
||||||
|
#ifdef HAVE_READLINE_READLINE_H
|
||||||
|
# define USE_READLINE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MODULE_DIR
|
#ifndef MODULE_DIR
|
||||||
# define MODULE_DIR "."
|
# define MODULE_DIR "."
|
||||||
|
|
@ -63,6 +73,7 @@ typedef unsigned long vvp_time64_t;
|
||||||
# undef HAVE_SYS_RESOURCE_H
|
# undef HAVE_SYS_RESOURCE_H
|
||||||
# undef LINUX
|
# undef LINUX
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When doing dynamic linking, we need a uniform way to identify the
|
* When doing dynamic linking, we need a uniform way to identify the
|
||||||
* symbol. Some compilers put leading _, some trailing _. The
|
* symbol. Some compilers put leading _, some trailing _. The
|
||||||
|
|
@ -83,6 +94,9 @@ typedef unsigned long vvp_time64_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: config.h.in,v $
|
* $Log: config.h.in,v $
|
||||||
|
* Revision 1.14 2003/05/16 03:50:28 steve
|
||||||
|
* Fallback functionality if readline is not present.
|
||||||
|
*
|
||||||
* Revision 1.13 2003/03/13 20:31:40 steve
|
* Revision 1.13 2003/03/13 20:31:40 steve
|
||||||
* Warnings about long long time.
|
* Warnings about long long time.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ AC_CHECK_SIZEOF(unsigned)
|
||||||
# exist.
|
# exist.
|
||||||
AC_CHECK_LIB(termcap, tputs)
|
AC_CHECK_LIB(termcap, tputs)
|
||||||
AC_CHECK_LIB(readline, readline)
|
AC_CHECK_LIB(readline, readline)
|
||||||
|
AC_CHECK_HEADERS(readline/readline.h readline/history.h)
|
||||||
|
|
||||||
# --
|
# --
|
||||||
# Look for a dl library to use. First look for the standard dlopen
|
# Look for a dl library to use. First look for the standard dlopen
|
||||||
|
|
|
||||||
27
vvp/stop.cc
27
vvp/stop.cc
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: stop.cc,v 1.7 2003/03/13 20:31:40 steve Exp $"
|
#ident "$Id: stop.cc,v 1.8 2003/05/16 03:50:28 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -34,8 +34,10 @@
|
||||||
# include "schedule.h"
|
# include "schedule.h"
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
#ifdef HAVE_LIBREADLINE
|
#ifdef HAVE_READLINE_READLINE_H
|
||||||
# include <readline/readline.h>
|
# include <readline/readline.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_READLINE_HISTORY_H
|
||||||
# include <readline/history.h>
|
# include <readline/history.h>
|
||||||
#endif
|
#endif
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
@ -46,6 +48,8 @@
|
||||||
|
|
||||||
struct __vpiScope*stop_current_scope = 0;
|
struct __vpiScope*stop_current_scope = 0;
|
||||||
|
|
||||||
|
#ifdef USE_READLINE
|
||||||
|
|
||||||
static bool interact_flag = true;
|
static bool interact_flag = true;
|
||||||
|
|
||||||
static void cmd_call(unsigned argc, char*argv[])
|
static void cmd_call(unsigned argc, char*argv[])
|
||||||
|
|
@ -409,7 +413,9 @@ void stop_handler(int rc)
|
||||||
first += 1;
|
first += 1;
|
||||||
|
|
||||||
if (first[0] != 0) {
|
if (first[0] != 0) {
|
||||||
|
#ifdef HAVE_READLINE_HISTORY
|
||||||
add_history(first);
|
add_history(first);
|
||||||
|
#endif
|
||||||
invoke_command(first);
|
invoke_command(first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -419,8 +425,25 @@ void stop_handler(int rc)
|
||||||
printf("** Continue **\n");
|
printf("** Continue **\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void stop_handler(int rc)
|
||||||
|
{
|
||||||
|
printf("** VVP Stop(%d) **\n", rc);
|
||||||
|
printf("** Current simulation time is %" TIME_FMT "u ticks.\n",
|
||||||
|
schedule_simtime());
|
||||||
|
|
||||||
|
printf("** Interactive mode not supported, exiting simulation.\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: stop.cc,v $
|
* $Log: stop.cc,v $
|
||||||
|
* Revision 1.8 2003/05/16 03:50:28 steve
|
||||||
|
* Fallback functionality if readline is not present.
|
||||||
|
*
|
||||||
* Revision 1.7 2003/03/13 20:31:40 steve
|
* Revision 1.7 2003/03/13 20:31:40 steve
|
||||||
* Warnings about long long time.
|
* Warnings about long long time.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue