mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Some more #ifdef cleanups
src/cmd/ksh93/edit/edit.c, src/cmd/ksh93/edit/history.c, src/cmd/ksh93/sh/deparse.c: - Remove experimental code protected by '#ifdef future'. No one is going to do anything with this, it's just clutter. src/lib/libast/sfio/sfcvt.c: - In 2021, it might be time to actually start using some C99 features were available. Change two checks for a _c99_in_the_wild macro to actual checks for C99, enabling the use of fpclassify(). Resolves: https://github.com/ksh93/ksh/issues/219
This commit is contained in:
parent
0b814b53bd
commit
38f2b94f55
4 changed files with 2 additions and 60 deletions
|
@ -147,9 +147,6 @@ static char KILL_LINE[20] = { ESC, '[', 'J', 0 };
|
|||
# define _POSIX_DISABLE 0
|
||||
#endif
|
||||
|
||||
#ifdef future
|
||||
static int compare(const char*, const char*, int);
|
||||
#endif /* future */
|
||||
#define ttyparm (ep->e_ttyparm)
|
||||
#define nttyparm (ep->e_nttyparm)
|
||||
static const char bellchr[] = "\a"; /* bell char */
|
||||
|
@ -212,10 +209,6 @@ int tty_set(int fd, int action, struct termios *tty)
|
|||
register Edit_t *ep = (Edit_t*)(shgd->ed_context);
|
||||
if(fd >=0)
|
||||
{
|
||||
#ifdef future
|
||||
if(ep->e_savefd>=0 && compare(&ep->e_savetty,tty,sizeof(struct termios)))
|
||||
return(0);
|
||||
#endif
|
||||
while(tcsetattr(fd, action, tty) == SYSERR)
|
||||
{
|
||||
if(errno !=EINTR)
|
||||
|
@ -1522,21 +1515,6 @@ int ed_genlen(register const genchar *str)
|
|||
}
|
||||
#endif /* (SHOPT_ESH || SHOPT_VSH) && SHOPT_MULTIBYTE */
|
||||
|
||||
#ifdef future
|
||||
/*
|
||||
* returns 1 when <n> bytes starting at <a> and <b> are equal
|
||||
*/
|
||||
static int compare(register const char *a,register const char *b,register int n)
|
||||
{
|
||||
while(n-->0)
|
||||
{
|
||||
if(*a++ != *b++)
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SHOPT_OLDTERMIO
|
||||
|
||||
# include <sys/termio.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue