Configure command-line interface for VxWorks

Add new LEDLIB and OTHER configuration options.
Fix typo in vxWorks/osdReadline.c
Use LEDLIB on VxWorks.

Fixes LP: #1741578
This commit is contained in:
Andrew Johnson
2018-01-08 11:56:37 -06:00
parent 692b971e06
commit d41f2e6806
3 changed files with 15 additions and 8 deletions

View File

@@ -170,6 +170,10 @@ COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(INCLUDES) $(SOURCE_FLAG)
VXCPPFLAGS = $(filter-out $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS))
PREPROCESS.cpp = $(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@
#--------------------------------------------------
# Use LEDLIB for command-line editing
COMMANDLINE_LIBRARY = LEDLIB
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.Common.vxWorksCommon

View File

@@ -15,8 +15,15 @@
#include "envDefs.h"
#include "epicsReadline.h"
/* Basic command-line input, no editing or history: */
#define EPICS_COMMANDLINE_LIBRARY_EPICS 0
/* OS-specific command-line editing and/or history: */
#define EPICS_COMMANDLINE_LIBRARY_LIBTECLA 1
#define EPICS_COMMANDLINE_LIBRARY_LEDLIB 1
#define EPICS_COMMANDLINE_LIBRARY_OTHER 1
/* GNU readline, or Apple's libedit wrapper: */
#define EPICS_COMMANDLINE_LIBRARY_READLINE 2
#define EPICS_COMMANDLINE_LIBRARY_READLINE_CURSES 2
#define EPICS_COMMANDLINE_LIBRARY_READLINE_NCURSES 2
@@ -42,14 +49,10 @@ static void osdReadlineBegin(struct readlineContext * c) {}
static char * osdReadline(const char *prompt, struct readlineContext * c) { return NULL; }
static void osdReadlineEnd(struct readlineContext * c) {}
#elif EPICS_COMMANDLINE_LIBRARY == EPICS_COMMANDLINE_LIBRARY_READLINE
# include "gnuReadline.c"
#else
# if EPICS_COMMANDLINE_LIBRARY == EPICS_COMMANDLINE_LIBRARY_READLINE
# include "gnuReadline.c"
# else
# include "osdReadline.c"
# endif
# include "osdReadline.c"
#endif
/*

View File

@@ -33,7 +33,7 @@ struct osdContext {
static void
osdReadlineBegin(struct readlineContext *context)
{
struct osdContext osd = malloc(sizeof *osd);
struct osdContext *osd = malloc(sizeof *osd);
if (osd != NULL) {
osd->ledId = (LED_ID) ERROR;