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

Yet another round of accumulated tweaks and cleanups

Notable changes:

- sh/timers.c: Rename timerdel() to sh_timerdel() for consistency;
  we had timerdel() but sh_timeradd().

- include/shell.h: Remove unused sh struct members:
  - sh.lastpath (this was still being saved/restored in several
    places, but not actually used since 2008-06-02 ksh93t-)
  - sh.lastbase (unused since 2000-10-31 ksh93k)
  - sh.inpool (unused since libcoshell was removed in 3613da42)

- sh/xec.c: sh_exec(): Add comments for the various command types.
This commit is contained in:
Martijn Dekker 2022-07-04 00:16:05 +02:00
parent d79a34b327
commit 8a0920ea0a
16 changed files with 88 additions and 48 deletions

View file

@ -124,7 +124,7 @@ extern void sh_siginit(void);
extern void sh_sigtrap(int);
extern void sh_sigreset(int);
extern void *sh_timeradd(unsigned long,int ,void (*)(void*),void*);
extern void timerdel(void*);
extern void sh_timerdel(void*);
extern const char e_alarm[];

View file

@ -207,10 +207,10 @@ struct sh_scoped
int ioset;
unsigned short trapmax;
char trapdontexec; /* stop exec optimization if any non-DEBUG/SIGKILL/SIGSTOP trap is set and non-empty */
char *trap[SH_DEBUGTRAP+1];
char **otrap;
char **trapcom;
char **otrapcom;
char *trap[SH_DEBUGTRAP+1]; /* pseudosignals (except EXIT) */
char **otrap; /* save parent pseudosignals for v=$(trap) */
char **trapcom; /* EXIT and signals */
char **otrapcom; /* save parent EXIT and signals for v=$(trap) */
struct Ufunction *real_fun; /* current 'function name' function */
int repl_index;
char *repl_arg;
@ -276,7 +276,6 @@ struct Shell_s
Sfio_t *funlog; /* for logging function definitions */
int **fdptrs; /* pointer to file numbers */
char *lastarg;
char *lastpath; /* last absolute path found */
int path_err; /* last error on path search */
Dt_t *var_base; /* global level variables */
Dt_t *fun_base; /* global level functions */
@ -308,7 +307,6 @@ struct Shell_s
unsigned char *sigflag; /* pointer to signal states */
char intrap;
char login_sh;
char lastbase;
char forked;
char binscript;
char funload;
@ -375,7 +373,6 @@ struct Shell_s
Dt_t *prev_root;
Dt_t *fpathdict;
Dt_t *typedict;
Dt_t *inpool;
char ifstable[256];
Shopt_t offoptions; /* options that were explicitly disabled by the user on the command line */
Shopt_t glob_options;