1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Remove legacy code for older libast versions

Since ksh 93u+m comes bundled with libast 20111111, there's no need
to support older versions, so this is another cleanup opportunity.

src/cmd/ksh93/include/defs.h:
- Throw an #error if AST_VERSION is undefined or < 20111111.
  (Note that _AST_VERSION is the same as AST_VERSION, but the
  latter is newer and preferred; see src/lib/libast/features/api)

All other changed files:
- Remove legacy code for versions older than the currently used
  versions, which are:
  _AST_VERSION    20111111
  ERROR_VERSION   20100309
  GLOB_VERSION    20060717
  OPT_VERSION     20070319
  SFIO_VERSION    20090915
  VMALLOC_VERSION 20110808
This commit is contained in:
Martijn Dekker 2020-09-03 02:27:15 +02:00
parent 8d7f616e75
commit f9c127e39e
14 changed files with 6 additions and 81 deletions

View file

@ -74,7 +74,6 @@
static struct glob *membase;
#if GLOB_VERSION >= 20010916L
static char *nextdir(glob_t *gp, char *dir)
{
Shell_t *shp = sh_getinterp();
@ -88,7 +87,6 @@ static char *nextdir(glob_t *gp, char *dir)
return(pp->name);
return(0);
}
#endif
int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead)
{
@ -108,9 +106,7 @@ int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead)
#if KSHELL
extra += scantree(shp->alias_tree,pattern,arghead);
extra += scantree(shp->fun_tree,pattern,arghead);
# if GLOB_VERSION >= 20010916L
gp->gl_nextdir = nextdir;
# endif
#endif /* KSHELL */
flags |= GLOB_COMPLETE;
flags &= ~GLOB_NOCHECK;