(let ((*value-to-go* 'top)*top-data*)
(c2expr* form) (setq top-data *top-data*))
(and *record-call-info* (record-call-info nil (car top-data)))
- (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
+ (wt-nl "if(vs_base>vs_top) vs_top=vs_base;")
+ (wt-nl "*vs_top=Cnil;")
(do ((vs vrefs (cdr vs)))
((endp vs))
(let ((vref (car vs)))
(set-var 'fun-val (car vref) (cadr vref))
(unless (endp (cdr vs)) (wt-nl "if(vs_base<vs_top) vs_base++;"))))
(cond ((null vrefs)
- (wt-nl "if(vs_base==vs_top){vs_base[0]=Cnil;vs_top=vs_base+1;}")
+ (wt-nl "if(vs_base==vs_top){vs_base[0]=Cnil;}")
+ (wt-nl "vs_top=vs_base+1;}")
(unwind-exit 'fun-val))
(t (unless (eq *exit* 'return) (wt-nl) (reset-top))
(unwind-exit (cons 'var (car vrefs))))))
(and *record-call-info* (record-call-info nil (car top-data)))
- (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
+ (wt-nl "if(vs_base>vs_top) vs_top=vs_base;")
+ (wt-nl "*vs_top=Cnil;")
(do ((vs vars (cdr vs)))
((endp vs))
(c2bind-loc (car vs) '(vs-base 0))
-fno-PIE -fno-pie -fno-PIC -fno-pic \
-Wall \
-Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
- -Wno-unused-but-set-variable -Wno-misleading-indentation
+ -Wno-unused-but-set-variable
add_args_to_ldflags -no-pie -Wl,-z,lazy
$as_echo "$ac_cv_lib_readline_rl_initialize" >&6; }
if test "x$ac_cv_lib_readline_rl_initialize" = xyes; then :
-$as_echo "#define HAVE_READLINE 1" >>confdefs.h
+$as_echo "#define USE_READLINE 1" >>confdefs.h
- TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
- RL_OBJS=gcl_readline.o
-fi
-
-fi
-
-done
-
-
- # These tests discover differences between readline 4.1 and 4.3
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
+ # These tests discover differences between readline 4.1 and 4.3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
$as_echo_n "(cached) " >&6
fi
+ TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
+ RL_OBJS=gcl_readline.o
+fi
+
+fi
+
+done
+
fi
-fno-PIE -fno-pie -fno-PIC -fno-pic \
-Wall \
-Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
- -Wno-unused-but-set-variable -Wno-misleading-indentation
+ -Wno-unused-but-set-variable
add_args_to_ldflags -no-pie -Wl,-z,lazy
if test "$enable_readline" != "no" ; then
AC_CHECK_HEADERS([readline/readline.h],
- AC_CHECK_LIB([readline],[rl_initialize],
- [AC_DEFINE(HAVE_READLINE,1,[have readline library])
- TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
- RL_OBJS=gcl_readline.o]))
-
- # These tests discover differences between readline 4.1 and 4.3
- AC_CHECK_LIB([readline],[rl_completion_matches],
- [AC_DEFINE(HAVE_DECL_RL_COMPLETION_MATCHES,1,[have readline completion matches])
- AC_DEFINE(HAVE_RL_COMPENTRY_FUNC_T,1,[have readline completion matches])])
+ AC_CHECK_LIB([readline],[rl_initialize],
+ [AC_DEFINE(USE_READLINE,1,[use readline library])
+ # These tests discover differences between readline 4.1 and 4.3
+ AC_CHECK_LIB([readline],[rl_completion_matches],
+ [AC_DEFINE(HAVE_DECL_RL_COMPLETION_MATCHES,1,[have readline completion matches])
+ AC_DEFINE(HAVE_RL_COMPENTRY_FUNC_T,1,[have readline completion matches])])
+ TLIBS="$TLIBS -lreadline" #some machines don't link this, e.g. Slackware
+ RL_OBJS=gcl_readline.o]))
fi
AC_SUBST(RL_OBJS)
/* have putenv call */
#undef HAVE_PUTENV
-/* have readline library */
-#undef HAVE_READLINE
-
/* Define to 1 if you have the <readline/readline.h> header file. */
#undef HAVE_READLINE_READLINE_H
/* use fionbio for non-blocking io */
#undef USE_FIONBIO
+/* use readline library */
+#undef USE_READLINE
+
/* protect cdr from immfix and speed up type processing */
#undef USE_SAFE_CDR
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
#include <readline/readline.h>
#endif
PRELINK_EXTER FILE *my_stdout;
PRELINK_EXTER FILE *my_stderr;
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
PRELINK_EXTER rl_compentry_func_t **my_rl_completion_entry_function_ptr;
PRELINK_EXTER const char **my_rl_readline_name_ptr;
#endif
#define IN_FILE
#include "include.h"
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
#define kclgetc(FP) rl_getc_em(((FILE *)FP))
#define kclungetc(C, FP) rl_ungetc_em(C, ((FILE *)FP))
#define kclputc(C, FP) rl_putc_em(C, ((FILE *)FP))
#define kclgetc(FP) getc(((FILE *)FP))
#define kclungetc(C, FP) ungetc(C, ((FILE *)FP))
#define kclputc(C, FP) putc(C, ((FILE *)FP))
-#endif /* HAVE_READLINE */
+#endif /* USE_READLINE */
#define xkclfeof(c,FP) feof(((FILE *)FP))
FILE *fp;
{
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
if (rl_stream_p(fp) && rl_eof_p(fp))
return TRUE;
#endif
case smm_input:
case smm_io:
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
if (rl_stream_p(strm->sm.sm_fp))
return rl_pending_buffered_input_p(strm->sm.sm_fp);
#endif
make_si_function("USER-STREAM-STATE", siLuser_stream_state);
#endif
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
gcl_init_readline_function();
#endif
}
#define IN_READLINE
#include "include.h"
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
/* Here begins GNU Readline support. It was designed for Maxima,
* but it works with GCL fine too. If you want to include word completion
make_si_function("READLINE-OFF", siLreadline_off);
}
-#endif /* HAVE_READLINE */
+#endif /* USE_READLINE */
terminal_io->sm.sm_object1->sm.sm_fp = stdout;
gcl_init_big1();
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
gcl_init_readline_function();
#endif
#ifdef NEED_STACK_CHK_GUARD
#ifdef CMAC
gcl_init_cmac();
#endif
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
gcl_init_readline();
#endif
} }
#endif
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
ADD_FEATURE("READLINE");
#endif
#if !defined(USE_DLOPEN)
extern FILE *stderr __attribute__((weak));
extern FILE *stdout __attribute__((weak));
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
#if RL_READLINE_VERSION < 0x0600
extern Function *rl_completion_entry_function __attribute__((weak));
extern char *rl_readline_name __attribute__((weak));
my_stdin=stdin;
my_stdout=stdout;
my_stderr=stderr;
-#ifdef HAVE_READLINE
+#ifdef USE_READLINE
my_rl_completion_entry_function_ptr=(void *)&rl_completion_entry_function;
my_rl_readline_name_ptr=(void *)&rl_readline_name;
#endif