diff --git a/src/cmd/ksh93/edit/edit.c b/src/cmd/ksh93/edit/edit.c index db00165b5..566dc41ee 100644 --- a/src/cmd/ksh93/edit/edit.c +++ b/src/cmd/ksh93/edit/edit.c @@ -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 bytes starting at and 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 diff --git a/src/cmd/ksh93/edit/history.c b/src/cmd/ksh93/edit/history.c index 974371643..d7ae71e50 100644 --- a/src/cmd/ksh93/edit/history.c +++ b/src/cmd/ksh93/edit/history.c @@ -240,18 +240,6 @@ int sh_histinit(void *sh_context) stakseek(offset); histname = stakptr(offset); } -#ifdef future - if(hp=wasopen) - { - /* reuse history file if same name */ - wasopen = 0; - shgd->hist_ptr = hist_ptr = hp; - if(strcmp(histname,hp->histname)==0) - return(1); - else - hist_free(); - } -#endif retry: cp = path_relative(shp,histname); if(!histinit) @@ -641,18 +629,6 @@ again: { count += (cp-first); n = hist_ind(hp, ++hp->histind); -#ifdef future - if(count==hp->histcmds[n]) - { - sfprintf(sfstderr,"count match n=%d\n",n); - if(histinit) - { - histinit = 0; - return; - } - } - else if(n>=histinit) -#endif hp->histcmds[n] = count; first = cp; } diff --git a/src/cmd/ksh93/sh/deparse.c b/src/cmd/ksh93/sh/deparse.c index d7736a4a5..4e8f82146 100644 --- a/src/cmd/ksh93/sh/deparse.c +++ b/src/cmd/ksh93/sh/deparse.c @@ -476,15 +476,8 @@ static void p_redirect(register const struct ionod *iop) if(iop->iodelim) { /* here document */ -#ifdef xxx - iop->iolink = (char*)here_doc; -#endif here_doc = iop; io_op[2] = '<'; -#ifdef future - if(iof&IOSTRIP) - io_op[3] = '-'; -#endif } sfputr(outfile,cp,' '); if(iop->ionxt) @@ -586,11 +579,6 @@ static void p_switch(register const struct regnod *reg) static void here_body(register const struct ionod *iop) { Sfio_t *infile; -#ifdef xxx - if(iop->iolink) - here_body((struct inode*)iop->iolink); - iop->iolink = 0; -#endif if(iop->iofile&IOSTRG) infile = sfnew((Sfio_t*)0,iop->ioname,iop->iosize,-1,SF_STRING|SF_READ); else diff --git a/src/lib/libast/sfio/sfcvt.c b/src/lib/libast/sfio/sfcvt.c index 8f765db42..a073e439d 100644 --- a/src/lib/libast/sfio/sfcvt.c +++ b/src/lib/libast/sfio/sfcvt.c @@ -160,7 +160,7 @@ int format; /* conversion format */ return SF_INF; } #endif -# if _c99_in_the_wild +# if __STDC_VERSION__ >= 199901L # if _lib_signbit if (signbit(f)) # else @@ -338,7 +338,7 @@ int format; /* conversion format */ return SF_INF; } #endif -#if _c99_in_the_wild +#if __STDC_VERSION__ >= 199901L # if _lib_signbit if (signbit(f)) # else