diff options
| author | Oliver Kiddle <opk@zsh.org> | 2025-10-31 09:33:27 +0100 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2025-10-31 09:33:27 +0100 |
| commit | 6ac61e9a8f6392c1c625f9b46c834e87a357b8d4 (patch) | |
| tree | efb3847402d8a449ce83363f697cdefda3f7d437 /Src | |
| parent | Dan Drake: 53803: make adam1 prompt wrap len and ellipsized path configurable (diff) | |
| download | zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar.gz zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar.bz2 zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar.lz zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar.xz zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.tar.zst zsh-6ac61e9a8f6392c1c625f9b46c834e87a357b8d4.zip | |
54007: remove some uses of mod_export that were likely unintended
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/Zle/complete.c | 2 | ||||
| -rw-r--r-- | Src/Zle/compresult.c | 2 | ||||
| -rw-r--r-- | Src/Zle/zle_keymap.c | 2 | ||||
| -rw-r--r-- | Src/Zle/zle_main.c | 5 | ||||
| -rw-r--r-- | Src/Zle/zle_misc.c | 2 | ||||
| -rw-r--r-- | Src/exec.c | 2 | ||||
| -rw-r--r-- | Src/hist.c | 2 | ||||
| -rw-r--r-- | Src/init.c | 10 | ||||
| -rw-r--r-- | Src/jobs.c | 10 | ||||
| -rw-r--r-- | Src/module.c | 2 | ||||
| -rw-r--r-- | Src/params.c | 30 | ||||
| -rw-r--r-- | Src/signals.c | 4 |
12 files changed, 35 insertions, 38 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index 342611f1f..3e1c8b8d2 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -183,7 +183,7 @@ cpcmatcher(Cmatcher m) */ /**/ -mod_export Cpattern +static Cpattern cp_cpattern_element(Cpattern o) { Cpattern n = zalloc(sizeof(struct cpattern)); diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 7dbc5676a..46de4466f 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1961,7 +1961,7 @@ asklist(void) } /**/ -mod_export int +static int printlist(int over, CLPrintFunc printm, int showall) { Cmgroup g; diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index cda24847d..95a60bcc2 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -1500,7 +1500,7 @@ default_bindings(void) */ /**/ -mod_export ZLE_INT_T +static ZLE_INT_T getrestchar_keybuf(void) { char c; diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 1afb1bf58..ab0b51374 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -126,8 +126,7 @@ mod_export Thingy lbindk, bindk; /**/ int insmode; -/**/ -mod_export int eofchar; +static int eofchar; static int eofsent; /* @@ -2048,7 +2047,7 @@ resetprompt(UNUSED(char **args)) /* same bug called from outside zle */ /**/ -mod_export void +static void zle_resetprompt(void) { reexpandprompt(); diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index e17a08d53..60982d92e 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -1539,7 +1539,7 @@ addsuffix(int tp, int flags, ZLE_STRING_T chars, int lenstr, int lensuf) /* Same as addsuffix, but from metafied string */ /**/ -mod_export void +static void addsuffixstring(int tp, int flags, char *chars, int lensuf) { int slen, alloclen; diff --git a/Src/exec.c b/Src/exec.c index d39b6f3ac..efc96d861 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4828,7 +4828,7 @@ getoutput(char *cmd, int qt) */ /**/ -mod_export LinkList +static LinkList readoutput(int in, int qt, int *readerror) { LinkList ret; diff --git a/Src/hist.c b/Src/hist.c index 4e4a20e31..8334b1ae5 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2417,7 +2417,7 @@ convamps(char *out, char *in, int inlen) } /**/ -mod_export void +static void checkcurline(Histent he) { if (he->histnum == curhist && (histactive & HA_ACTIVE)) { diff --git a/Src/init.c b/Src/init.c index 76de0b449..dfef860f7 100644 --- a/Src/init.c +++ b/Src/init.c @@ -84,7 +84,9 @@ mod_export int tclen[TC_COUNT]; /**/ int tclines, tccolumns; /**/ -mod_export int hasam, hasbw, hasxn, hasye; +mod_export int hasam; +/**/ +int hasxn; /* Value of the Co (max_colors) entry: may not be set */ @@ -97,7 +99,7 @@ mod_export int tccolours; mod_export sigset_t sigchld_mask; /**/ -mod_export struct hookdef zshhooks[] = { +struct hookdef zshhooks[] = { HOOKDEF("exit", NULL, HOOKF_ALL), HOOKDEF("before_trap", NULL, HOOKF_ALL), HOOKDEF("after_trap", NULL, HOOKF_ALL), @@ -815,9 +817,7 @@ init_term(void) /* check whether terminal has automargin (wraparound) capability */ hasam = tgetflag("am"); - hasbw = tgetflag("bw"); hasxn = tgetflag("xn"); /* also check for newline wraparound glitch */ - hasye = tgetflag("YE"); /* print in last column does carriage return */ tclines = tgetnum("li"); tccolumns = tgetnum("co"); @@ -870,6 +870,8 @@ init_term(void) rprompt_indent = 1; /* If you change this, update rprompt_indent_unsetfn() */ /* The following is an attempt at a heuristic, * but it fails in some cases */ + /* int hasbw = tgetflag("bw"); */ + /* int hasye = tgetflag("YE"); */ /* print in last column does carriage return */ /* rprompt_indent = ((hasam && !hasbw) || hasye || !tccan(TCLEFT)); */ /* if there's no termcap entry for italics, use CSI 3 m */ diff --git a/Src/jobs.c b/Src/jobs.c index 66a7ec123..31938bedd 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -55,7 +55,7 @@ when we started without being process group leader */ /**/ -mod_export pid_t origpgrp; +pid_t origpgrp; /* the process group of the shell */ @@ -98,12 +98,10 @@ mod_export int jobtabsize; mod_export int maxjob; /* If we have entered a subshell, the original shell's job table. */ -/**/ -mod_export struct job *oldjobtab; +static struct job *oldjobtab; /* The size of that. */ -/**/ -mod_export int oldmaxjob; +static int oldmaxjob; /* shell timings */ @@ -1833,7 +1831,7 @@ clearjobtab(int monitor) /* In a subshell, decide we want our own job table after all. */ /**/ -mod_export void +void clearoldjobtab(void) { if (oldjobtab) diff --git a/Src/module.c b/Src/module.c index af0251f4e..19d7d9d42 100644 --- a/Src/module.c +++ b/Src/module.c @@ -1337,7 +1337,7 @@ addmathfunc(MathFunc f) /* Delete a single math function */ /**/ -mod_export int +int deletemathfunc(MathFunc f) { MathFunc p, q; diff --git a/Src/params.c b/Src/params.c index df6a917b2..654c30794 100644 --- a/Src/params.c +++ b/Src/params.c @@ -56,7 +56,6 @@ mod_export int locallevel; /* Variables holding values of special parameters */ /**/ -mod_export char **pparams, /* $argv */ **cdpath, /* $cdpath */ **fpath, /* $fpath */ @@ -70,13 +69,11 @@ char **path, /* $path */ **fignore; /* $fignore */ /**/ -mod_export char *argzero, /* $0 */ - *posixzero, /* $0 */ - *home, /* $HOME */ + *ifs, /* $IFS */ *nullcmd, /* $NULLCMD */ *oldpwd, /* $OLDPWD */ - *zoptarg, /* $OPTARG */ + *posixzero, /* $0 */ *prompt, /* $PROMPT */ *prompt2, /* $PROMPT2 */ *prompt3, /* $PROMPT3 */ @@ -85,14 +82,15 @@ char *argzero, /* $0 */ *rprompt, /* $RPROMPT */ *rprompt2, /* $RPROMPT2 */ *sprompt, /* $SPROMPT */ - *wordchars; /* $WORDCHARS */ + *wordchars, /* $WORDCHARS */ + *zoptarg, /* $OPTARG */ + *zsh_terminfo, /* $TERMINFO */ + *zsh_terminfodirs; /* $TERMINFO_DIRS */ /**/ mod_export -char *ifs, /* $IFS */ +char *home, /* $HOME */ *postedit, /* $POSTEDIT */ *term, /* $TERM */ - *zsh_terminfo, /* $TERMINFO */ - *zsh_terminfodirs, /* $TERMINFO_DIRS */ *ttystrname, /* $TTY */ *pwd; /* $PWD */ @@ -973,7 +971,7 @@ createparamtable(void) /* assign various functions used for non-special parameters */ /**/ -mod_export void +static void assigngetset(Param pm) { switch (PM_TYPE(pm->node.flags)) { @@ -2667,7 +2665,7 @@ setstrvalue(Value v, char *val) } /**/ -mod_export void +static void assignstrvalue(Value v, char *val, int flags) { if (unset(EXECOPT)) @@ -3634,7 +3632,7 @@ sethparam(char *s, char **val) */ /**/ -mod_export Param +static Param assignnparam(char *s, mnumber val, int flags) { struct value vbuf; @@ -4271,7 +4269,7 @@ arrvarsetfn(Param pm, char **x) } /**/ -mod_export char * +char * colonarrgetfn(Param pm) { char ***dptr = (char ***)pm->u.data; @@ -4279,7 +4277,7 @@ colonarrgetfn(Param pm) } /**/ -mod_export void +void colonarrsetfn(Param pm, char *x) { char ***dptr = (char ***)pm->u.data; @@ -6445,7 +6443,7 @@ setscope(Param pm) } /**/ -mod_export Param +static Param upscope(Param pm, int reflevel) { Param up = pm->old; @@ -6466,7 +6464,7 @@ upscope_upper(Param pm, int reflevel) } /**/ -mod_export int +static int valid_refname(char *val) { char *t = itype_end(val, INAMESPC, 0); diff --git a/Src/signals.c b/Src/signals.c index de42f302d..2257f862f 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -87,9 +87,9 @@ mod_export volatile int queue_in; /* Variables used by trap queueing */ /**/ -mod_export volatile int trap_queueing_enabled, trap_queue_front, trap_queue_rear; +static volatile int trap_queueing_enabled, trap_queue_front, trap_queue_rear; /**/ -mod_export int trap_queue[MAX_QUEUE_SIZE]; +static int trap_queue[MAX_QUEUE_SIZE]; /* Install signal handler for given signal. * * If possible, we want to make sure that interrupted * |
