1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 03:32:24 +00:00

sh/name.c: rm ancient binary compat overrides

Four libast hash functions/macros (which ksh93 doesn't actually use)
were overridden with the following comment:
/*
 * These following are for binary compatibility with the old hash library
 * They will be removed someday
 */
This has been there for decades, and I just received word that they
cause problems for the dtksh (CDE) developers as dtksh does call
hashlook().

src/cmd/ksh93/sh/name.c:
- Remove 'hashscope', 'hashfree', 'hashname' and 'hashlook'
  compatibility overrides.
This commit is contained in:
Martijn Dekker 2020-08-16 04:49:18 +01:00
parent e875616618
commit 35ad5e65af

View file

@ -3619,47 +3619,6 @@ void nv_unref(register Namval_t *np)
#endif
}
/*
* These following are for binary compatibility with the old hash library
* They will be removed someday
*/
#if defined(__IMPORT__) && defined(__EXPORT__)
# define extern __EXPORT__
#endif
#undef hashscope
extern Dt_t *hashscope(Dt_t *root)
{
return(dtvnext(root));
}
#undef hashfree
extern Dt_t *hashfree(Dt_t *root)
{
Dt_t *dp = dtvnext(root);
dtclose(root);
return(dp);
}
#undef hashname
extern char *hashname(void *obj)
{
Namval_t *np = (Namval_t*)obj;
return(np->nvname);
}
#undef hashlook
extern void *hashlook(Dt_t *root, const char *name, int mode,int size)
{
NOT_USED(size);
return((void*)nv_search(name,root,mode));
}
char *nv_name(register Namval_t *np)
{
Shell_t *shp = sh_getinterp();