Permalink
Browse files

Remove legacy, pre 2012, APIs

We cannot reasonably support binary plugins built for ksh93u+ or earlier
releases. This is due to a variety of factors such as removing the AST
vmalloc subsystem. Consequently there is no need to retain the pre 2012
APIs. So eliminate them and rename the post 2012 APIs.

Resolves #983
  • Loading branch information...
krader1961 committed Nov 3, 2018
1 parent b1d7f0a commit 15b061e757e32c55b1f4bae90d841c0c64779b8d
View
@@ -19,6 +19,8 @@ None at this time.
## Notable non-backward compatible changes
- Support for binary plugins written for ksh93u+ or earlier releases has been
dropped (issue #983).
- Support for coshell has been removed (issue #619).
- Support for the `universe` command has been removed (issue #793).
- Support for building on systems using EBCDIC has been removed (issue #742).
@@ -37,7 +37,6 @@
#include "error.h"
#include "fault.h"
#include "option.h"
#include "shellapi.h"
//
// Builtins `return` and `exit`.
@@ -31,7 +31,6 @@
#include "error.h"
#include "fault.h"
#include "name.h"
#include "nvapi.h"
#include "option.h"
#include "sfio.h"
#include "shcmd.h" // IWYU pragma: keep
@@ -39,7 +39,6 @@
#include "name.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
#include "variables.h"
@@ -38,7 +38,6 @@
#include "name.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "stak.h"
#include "variables.h"
@@ -53,7 +53,6 @@
#include "option.h"
#include "path.h"
#include "sfio.h"
#include "shellapi.h"
#include "shnodes.h"
#include "stk.h"
#include "variables.h"
@@ -45,7 +45,6 @@
#include "name.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
#include "streval.h"
#include "tmx.h"
@@ -47,10 +47,8 @@
#include "io.h"
#include "lexstates.h"
#include "name.h"
#include "nvapi.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
#include "terminal.h"
#include "variables.h"
@@ -53,11 +53,9 @@
#include "fault.h"
#include "history.h"
#include "name.h"
#include "nvapi.h"
#include "option.h"
#include "path.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
#include "variables.h"
@@ -38,7 +38,6 @@
#include "name.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "ulimit.h"
#ifndef SH_DICT
@@ -38,7 +38,6 @@
#include "name.h"
#include "path.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
static char *fmtx(Shell_t *shp, const char *string) {
@@ -48,7 +48,6 @@
#include "io.h"
#include "name.h"
#include "sfio.h"
#include "shellapi.h"
#include "stk.h"
#include "terminal.h"
#include "variables.h"
@@ -67,7 +67,6 @@
#include "fault.h"
#include "history.h"
#include "io.h"
#include "shellapi.h"
#include "stak.h"
#include "terminal.h"
@@ -33,10 +33,8 @@
#include "error.h"
#include "fault.h"
#include "name.h"
#include "nvapi.h"
#include "option.h"
#include "sfio.h"
#include "shellapi.h"
#include "shtable.h"
#include "stk.h"
#include "variables.h"
@@ -234,8 +234,7 @@ extern void *nv_associative(Namval_t *, const char *, int);
extern int nv_aindex(Namval_t *);
extern bool nv_nextsub(Namval_t *);
extern char *nv_getsub(Namval_t *);
extern Namval_t *nv_putsub(Namval_t *, char *, long);
extern Namval_t *nv_putsub_20120720(Namval_t *, char *, long, int);
extern Namval_t *nv_putsub(Namval_t *, char *, long, int);
extern Namval_t *nv_opensub(Namval_t *);
// Name-value pair function prototypes.
@@ -253,8 +252,7 @@ extern char *nv_getval(Namval_t *);
extern Namfun_t *nv_hasdisc(Namval_t *, const Namdisc_t *);
extern int nv_isnull(Namval_t *);
extern Namfun_t *nv_isvtree(Namval_t *);
extern Namval_t *nv_lastdict(void);
extern Namval_t *nv_lastdict_20120720(void *);
extern Namval_t *nv_lastdict(void *);
extern Namval_t *nv_mkinttype(char *, size_t, int, const char *, Namdisc_t *);
extern void nv_newattr(Namval_t *, unsigned, int);
extern void nv_newtype(Namval_t *);

This file was deleted.

Oops, something went wrong.
@@ -302,70 +302,50 @@ struct Shell_s {
#define SH_FDCLOSE (-1)
extern int sh_access(const char *, int);
extern Namval_t *sh_addbuiltin(const char *, int (*)(int, char *[], Shbltin_t *), void *);
extern Dt_t *sh_bltin_tree(void);
extern int sh_chdir(const char *);
extern int sh_close(int);
extern void sh_delay(double);
extern int sh_dup(int);
extern int sh_eval(Sfio_t *, int);
extern int sh_exec(Shell_t *, const Shnode_t *, int);
extern void sh_exit(int);
extern int sh_fchdir(int);
extern int sh_fcntl(int, int, ...);
extern Sfio_t *sh_fd2sfio(int);
extern int (*sh_fdnotify(int (*)(int, int)))(int, int);
extern char *sh_fmtq(const char *);
extern char *sh_fmtqf(const char *, int, int);
extern int sh_fun(Namval_t *, Namval_t *, char *[]);
extern int sh_funscope(int, char *[], int (*)(void *), void *, int);
extern Shell_t *sh_getinterp(void);
extern Shscope_t *sh_getscope(int, int);
extern Shell_t *sh_init(int, char *[], Shinit_f);
extern Sfio_t *sh_iogetiop(int, int);
extern int sh_main(int, char *[], Shinit_f);
extern void sh_menu(Sfio_t *, int, char *[]);
extern void sh_offoption(int);
extern bool sh_isoption(int);
extern void sh_onoption(int);
extern int sh_open(const char *, int, ...);
extern int sh_openmax(void);
extern void *sh_parse(Shell_t *, Sfio_t *, int);
extern Sfio_t *sh_pathopen(const char *);
extern int sh_pipe(int[]);
extern ssize_t sh_read(int, void *, size_t);
extern int sh_reinit(char *[]);
extern int sh_run(int, char *[]);
extern off_t sh_seek(int, off_t, int);
extern Shscope_t *sh_setscope(Shscope_t *);
extern void sh_sigcheck(Shell_t *);
extern int sh_stat(const char *, struct stat *);
extern Sfdouble_t sh_strnum(const char *, char **, int);
extern void sh_subfork(void);
extern int sh_trap(const char *, int);
extern mode_t sh_umask(mode_t);
extern int sh_waitsafe(void);
extern ssize_t sh_write(int, const void *, size_t);
extern Namval_t *sh_addbuiltin_20120720(Shell_t *, const char *,
int (*)(int, char *[], Shbltin_t *), void *);
extern Dt_t *sh_bltin_tree_20120720(Shell_t *);
extern int sh_eval_20120720(Shell_t *, Sfio_t *, int);
extern void sh_exit_20120720(Shell_t *, int);
extern Sfio_t *sh_fd2sfio_20120720(Shell_t *, int);
extern int sh_fun_20120720(Shell_t *, Namval_t *, Namval_t *, char *[]);
extern int sh_funscope_20120720(Shell_t *, int, char *[], int (*)(void *), void *, int);
extern Shscope_t *sh_getscope_20120720(Shell_t *, int, int);
extern void sh_offoption_20120720(Shell_t *, int);
extern bool sh_isoption_20120720(Shell_t *, int);
extern void sh_onoption_20120720(Shell_t *, int);
extern void sh_menu_20120720(Shell_t *, Sfio_t *, int, char *[]);
extern Sfio_t *sh_pathopen_20120720(Shell_t *, const char *);
extern int sh_reinit_20120720(Shell_t *, char *[]);
extern int sh_run_20120720(Shell_t *, int, char *[]);
extern Shscope_t *sh_setscope_20120720(Shell_t *, Shscope_t *);
extern Sfdouble_t sh_strnum_20120720(Shell_t *, const char *, char **, int);
extern int sh_trap_20120720(Shell_t *, const char *, int);
extern Namval_t *sh_addbuiltin(Shell_t *, const char *, int (*)(int, char *[], Shbltin_t *), void *);
extern int sh_eval(Shell_t *, Sfio_t *, int);
extern void sh_exit(Shell_t *, int);
extern Sfio_t *sh_fd2sfio(Shell_t *, int);
extern int sh_fun(Shell_t *, Namval_t *, Namval_t *, char *[]);
extern int sh_funscope(Shell_t *, int, char *[], int (*)(void *), void *, int);
extern Shscope_t *sh_getscope(Shell_t *, int, int);
extern void sh_offoption(Shell_t *, int);
extern bool sh_isoption(Shell_t *, int);
extern void sh_onoption(Shell_t *, int);
extern void sh_menu(Shell_t *, Sfio_t *, int, char *[]);
extern Sfio_t *sh_pathopen(Shell_t *, const char *);
extern int sh_reinit(Shell_t *, char *[]);
extern int sh_run(Shell_t *, int, char *[]);
extern Shscope_t *sh_setscope(Shell_t *, Shscope_t *);
extern Sfdouble_t sh_strnum(Shell_t *, const char *, char **, int);
extern int sh_trap(Shell_t *, const char *, int);
#define sh_ptr(np) ((np)->nvshell)
@@ -374,8 +354,6 @@ extern int sh_trap_20120720(Shell_t *, const char *, int);
//
extern Shell_t sh;
#include "shellapi.h"
#if _lib_lseek64
#undef stat64
#define stat64(a, b) sh_stat(a, b)
@@ -404,13 +382,8 @@ extern Shell_t sh;
#ifndef _SH_PRIVATE
#undef close
#define close(a) sh_close(a)
#if SHELLAPI(20120720)
#undef exit
#define exit(a) sh_exit(sh_getinterp(), a)
#else
#undef exit
#define exit(a) sh_exit(a)
#endif
#undef fcntl
#define fcntl(a, b, c) sh_fcntl(a, b, c)
#undef pipe

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 15b061e

Please sign in to comment.