mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
!interpreters/bas: Align naming of configuration options
Aligns `CONFIG_INTERPRETER_*` options to `CONFIG_INTERPRETERS_*` options to be consistent with other interpreters. BREAKING CHANGE: All configurations using `CONFIG_INTERPRETER_BAS_*` options will no longer compile due to missing symbol errors. The fix is very quick: any configurations using this options should add a trailing S following INTERPRETER in the affected Kconfig variables. I believe `./tools/refresh.sh` should also be capable of doing this automatically. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
parent
76e02c0dd6
commit
be2cdfa597
6 changed files with 24 additions and 24 deletions
|
|
@ -27,9 +27,9 @@ if(CONFIG_INTERPRETERS_BAS)
|
|||
SRCS
|
||||
bas_main.c
|
||||
STACKSIZE
|
||||
${CONFIG_INTERPRETER_BAS_STACKSIZE}
|
||||
${CONFIG_INTERPRETERS_BAS_STACKSIZE}
|
||||
PRIORITY
|
||||
${CONFIG_INTERPRETER_BAS_PRIORITY})
|
||||
${CONFIG_INTERPRETERS_BAS_PRIORITY})
|
||||
|
||||
set(CSRCS
|
||||
bas_str.c
|
||||
|
|
@ -42,7 +42,7 @@ if(CONFIG_INTERPRETERS_BAS)
|
|||
bas_global.c
|
||||
bas_program.c)
|
||||
|
||||
if(CONFIG_INTERPRETER_BAS_VT100)
|
||||
if(CONFIG_INTERPRETERS_BAS_VT100)
|
||||
list(APPEND CSRCS bas_vt100.c)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -33,37 +33,37 @@ config INTERPRETERS_BAS
|
|||
|
||||
if INTERPRETERS_BAS
|
||||
|
||||
config INTERPRETER_BAS_VERSION
|
||||
config INTERPRETERS_BAS_VERSION
|
||||
string "Version number"
|
||||
default "2.4"
|
||||
|
||||
config INTERPRETER_BAS_PRIORITY
|
||||
config INTERPRETERS_BAS_PRIORITY
|
||||
int "Basic interpreter priority"
|
||||
default 100
|
||||
---help---
|
||||
Task priority of the Basic interpreter main task
|
||||
|
||||
config INTERPRETER_BAS_STACKSIZE
|
||||
config INTERPRETERS_BAS_STACKSIZE
|
||||
int "Basic interpreter stack size"
|
||||
default 4096
|
||||
---help---
|
||||
Size of the stack allocated for the Basic interpreter main task
|
||||
|
||||
config INTERPRETER_BAS_VT100
|
||||
config INTERPRETERS_BAS_VT100
|
||||
bool "VT100 terminal support"
|
||||
default y
|
||||
|
||||
config INTERPRETER_BAS_USE_LR0
|
||||
config INTERPRETERS_BAS_USE_LR0
|
||||
bool "LR0 parser"
|
||||
default n
|
||||
---help---
|
||||
Select if you want LR0 parser.
|
||||
|
||||
config INTERPRETER_BAS_USE_SELECT
|
||||
config INTERPRETERS_BAS_USE_SELECT
|
||||
bool "Use select()"
|
||||
default n
|
||||
|
||||
config INTERPRETER_BAS_HAVE_FTRUNCATE
|
||||
config INTERPRETERS_BAS_HAVE_FTRUNCATE
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ include $(APPDIR)/Make.defs
|
|||
CSRCS = bas.c bas_auto.c bas_fs.c bas_global.c bas_program.c
|
||||
CSRCS += bas_str.c bas_token.c bas_value.c bas_var.c
|
||||
|
||||
ifeq ($(CONFIG_INTERPRETER_BAS_VT100),y)
|
||||
ifeq ($(CONFIG_INTERPRETERS_BAS_VT100),y)
|
||||
CSRCS += bas_vt100.c
|
||||
endif
|
||||
|
||||
|
|
@ -36,8 +36,8 @@ MAINSRC = bas_main.c
|
|||
# BAS built-in application info
|
||||
|
||||
PROGNAME = bas
|
||||
PRIORITY = $(CONFIG_INTERPRETER_BAS_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_INTERPRETER_BAS_STACKSIZE)
|
||||
PRIORITY = $(CONFIG_INTERPRETERS_BAS_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_INTERPRETERS_BAS_STACKSIZE)
|
||||
MODULE = $(CONFIG_INTERPRETERS_BAS)
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ static struct Value *func(struct Value *value)
|
|||
return value;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INTERPRETER_BAS_USE_LR0
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_USE_LR0
|
||||
|
||||
/* Grammar with LR(0) sets */
|
||||
|
||||
|
|
@ -2368,7 +2368,7 @@ void bas_interpreter(void)
|
|||
{
|
||||
if (FS_istty(STDCHANNEL))
|
||||
{
|
||||
FS_putChars(STDCHANNEL, "bas " CONFIG_INTERPRETER_BAS_VERSION "\n");
|
||||
FS_putChars(STDCHANNEL, "bas " CONFIG_INTERPRETERS_BAS_VERSION "\n");
|
||||
FS_putChars(STDCHANNEL, "Copyright 1999-2014 Michael Haardt.\n");
|
||||
FS_putChars(STDCHANNEL,
|
||||
"This is free software with ABSOLUTELY NO WARRANTY.\n");
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ static int edit(int chn, int nl)
|
|||
{
|
||||
if (f->inCapacity)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_VT100
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_VT100
|
||||
/* Could use vt100_clrtoeol */
|
||||
#endif
|
||||
/* Is the previous char in buffer 2 char escape sequence? */
|
||||
|
|
@ -319,7 +319,7 @@ static int edit(int chn, int nl)
|
|||
|
||||
static int cls(int chn)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_VT100
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_VT100
|
||||
vt100_clrscreen(chn);
|
||||
vt100_cursorhome(chn);
|
||||
return 0;
|
||||
|
|
@ -331,7 +331,7 @@ static int cls(int chn)
|
|||
|
||||
static int locate(int chn, int line, int column)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_VT100
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_VT100
|
||||
vt100_setcursor(chn, line, column);
|
||||
return 0;
|
||||
#else
|
||||
|
|
@ -342,7 +342,7 @@ static int locate(int chn, int line, int column)
|
|||
|
||||
static int colour(int chn, int foreground, int background)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_VT100
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_VT100
|
||||
if (foreground >= 0)
|
||||
{
|
||||
vt100_foreground_color(chn, foreground);
|
||||
|
|
@ -362,7 +362,7 @@ static int colour(int chn, int foreground, int background)
|
|||
|
||||
static int resetcolour(int chn)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_VT100
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_VT100
|
||||
vt100_foreground_color(chn, VT100_DEFAULT);
|
||||
vt100_background_color(chn, VT100_DEFAULT);
|
||||
#endif
|
||||
|
|
@ -837,7 +837,7 @@ int FS_lock(int chn, off_t offset, off_t length, int mode, int w)
|
|||
|
||||
int FS_truncate(int chn)
|
||||
{
|
||||
#ifdef CONFIG_INTERPRETER_BAS_HAVE_FTRUNCATE
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_HAVE_FTRUNCATE
|
||||
int fd;
|
||||
off_t o;
|
||||
|
||||
|
|
@ -1411,7 +1411,7 @@ int FS_inkeyChar(int dev, int ms)
|
|||
struct FileStream *f;
|
||||
char c;
|
||||
ssize_t len;
|
||||
#ifdef CONFIG_INTERPRETER_BAS_USE_SELECT
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_USE_SELECT
|
||||
fd_set just_infd;
|
||||
struct timeval timeout;
|
||||
#endif
|
||||
|
|
@ -1427,7 +1427,7 @@ int FS_inkeyChar(int dev, int ms)
|
|||
return f->inBuf[f->inSize++];
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INTERPRETER_BAS_USE_SELECT
|
||||
#ifdef CONFIG_INTERPRETERS_BAS_USE_SELECT
|
||||
FD_ZERO(&just_infd);
|
||||
FD_SET(f->infd, &just_infd);
|
||||
timeout.tv_sec = ms / 1000;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ int main(int argc, FAR char *argv[])
|
|||
break;
|
||||
|
||||
case 'V':
|
||||
printf("bas %s\n", CONFIG_INTERPRETER_BAS_VERSION);
|
||||
printf("bas %s\n", CONFIG_INTERPRETERS_BAS_VERSION);
|
||||
exit(0);
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue