Commit 26c84fb8 authored by John P. Willis's avatar John P. Willis
Browse files

Improve libreadline detection and use

parent 2f5d0f5d
Pipeline #548 failed with stage
in 8 seconds
......@@ -438,3 +438,8 @@ VERSION 0.27.5
VERSION 0.28.0
Updates for pkgsrc, split out installation from initial configuration
********************************************************************************
VERSION 0.28.1
Improve libreadline detection and use
......@@ -37,12 +37,13 @@
#
#
AC_INIT(freem, 0.28.0, jpw@coherent-logic.com)
AC_INIT(freem, 0.28.1, jpw@coherent-logic.com)
AC_CONFIG_HEADERS([src/config.h])
AC_CHECK_LIB([readline], [readline])
AC_CHECK_LIB([readline], [history_list])
AC_CHECK_HEADERS(readline.h readline/readline.h)
AC_CHECK_HEADERS(history.h readline/history.h)
#AC_CHECK_LIB([readline], [readline])
#AC_CHECK_LIB([readline], [history_list])
#AC_CHECK_HEADERS(readline.h readline/readline.h)
#AC_CHECK_HEADERS(history.h readline/history.h)
AX_LIB_READLINE
# check for libm
AC_CHECK_LIB([m], [powf])
......
......@@ -4,7 +4,7 @@
@settitle The FreeM Manual
@copying
This manual is for FreeM, (version 0.28.0), which is a free and open-source implementation of the M programming language and database system.
This manual is for FreeM, (version 0.28.1), which is a free and open-source implementation of the M programming language and database system.
Copyright @copyright{} 2020 Coherent Logic Development LLC
......@@ -18,7 +18,7 @@ Permission is granted to copy, distribute and/or modify this document under the
@title The FreeM Manual
@subtitle @sc{The Official Manual of FreeM}
@subtitle Version 0.28.0
@subtitle Version 0.28.1
@c@vskip 10pt
@c@center @image{freem-logo-sm,,,,.png}
@author John P. Willis
......@@ -279,7 +279,7 @@ The FreeM direct-mode environment is the mode entered when FreeM is loaded witho
@example
Coherent Logic Development FreeM
Version 0.28.0-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
Version 0.28.1-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
*
* *
......@@ -1291,7 +1291,7 @@ In the above @emph{inclusive} form, @code{KVALUE} will kill the data values at e
@cartouche
@quotation
@emph{Note}
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.28.0, but are planned for a future release.
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.28.1, but are planned for a future release.
@end quotation
@end cartouche
......
......@@ -54,17 +54,30 @@
#include "mdebug.h"
#ifdef HAVE_LIBREADLINE
# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
# elif defined(HAVE_READLINE_H)
# include <readline.h>
# endif
# if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
# elif defined(HAVE_HISTORY_H)
# include <history.h>
# endif
#endif
# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
# elif defined(HAVE_READLINE_H)
# include <readline.h>
# else /* !defined(HAVE_READLINE_H) */
extern char *readline ();
# endif /* !defined(HAVE_READLINE_H) */
char *cmdline = NULL;
#else /* !defined(HAVE_READLINE_READLINE_H) */
/* no readline */
#endif /* HAVE_LIBREADLINE */
#ifdef HAVE_READLINE_HISTORY
# if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
# elif defined(HAVE_HISTORY_H)
# include <history.h>
# else /* !defined(HAVE_HISTORY_H) */
extern void add_history ();
extern int write_history ();
extern int read_history ();
# endif /* defined(HAVE_READLINE_HISTORY_H) */
/* no history */
#endif /* HAVE_READLINE_HISTORY */
#if defined(HAVE_WIRINGPI_H)
# include <wiringPi.h>
......
......@@ -73,17 +73,31 @@
#include <sys/wait.h>
#include <sys/time.h>
#if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
# include <readline.h>
#endif
#if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
#elif defined(HAVE_HISTORY_H)
# include <history.h>
#endif
#ifdef HAVE_LIBREADLINE
# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
# elif defined(HAVE_READLINE_H)
# include <readline.h>
# else /* !defined(HAVE_READLINE_H) */
extern char *readline ();
# endif /* !defined(HAVE_READLINE_H) */
/*char *cmdline = NULL;*/
#else /* !defined(HAVE_READLINE_READLINE_H) */
/* no readline */
#endif /* HAVE_LIBREADLINE */
#ifdef HAVE_READLINE_HISTORY
# if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
# elif defined(HAVE_HISTORY_H)
# include <history.h>
# else /* !defined(HAVE_HISTORY_H) */
extern void add_history ();
extern int write_history ();
extern int read_history ();
# endif /* defined(HAVE_READLINE_HISTORY_H) */
/* no history */
#endif /* HAVE_READLINE_HISTORY */
/* mumps commands */
#define ABLOCK 0
......@@ -7051,13 +7065,6 @@ restore:
}
#else
#ifdef __EMSCRIPTEN__
fprintf (stderr, "xecline(): at direct-mode prompt\n");
fgets (code, 255, stdin);
stcnv_c2m (code);
#else
{
char fmrl_prompt[256];
......@@ -7073,8 +7080,6 @@ restore:
read_m (code, -1L, 0, 255); /* Not necessarily STRLEN? */
}
#endif
#endif
promflag = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment