Skip to content

Commit 6ac61e9

Browse files
author
Oliver Kiddle
committed
54007: remove some uses of mod_export that were likely unintended
1 parent 5f07437 commit 6ac61e9

File tree

13 files changed

+42
-38
lines changed

13 files changed

+42
-38
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2025-10-31 Oliver Kiddle <[email protected]>
2+
3+
* 54007: Src/exec.c, Src/hist.c, Src/init.c, Src/jobs.c, Src/module.c,
4+
Src/params.c, Src/signals.c, Src/Zle/complete.c, Src/Zle/zle_misc.c,
5+
Src/Zle/compresult.c, Src/Zle/zle_keymap.c, Src/Zle/zle_main.c:
6+
remove some uses of mod_export that were likely unintended
7+
18
2025-10-27 Bart Schaefer <[email protected]>
29

310
* Dan Drake: 53803: Functions/Prompts/prompt_adam1_setup: make

Src/Zle/complete.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ cpcmatcher(Cmatcher m)
183183
*/
184184

185185
/**/
186-
mod_export Cpattern
186+
static Cpattern
187187
cp_cpattern_element(Cpattern o)
188188
{
189189
Cpattern n = zalloc(sizeof(struct cpattern));

Src/Zle/compresult.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ asklist(void)
19611961
}
19621962

19631963
/**/
1964-
mod_export int
1964+
static int
19651965
printlist(int over, CLPrintFunc printm, int showall)
19661966
{
19671967
Cmgroup g;

Src/Zle/zle_keymap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ default_bindings(void)
15001500
*/
15011501

15021502
/**/
1503-
mod_export ZLE_INT_T
1503+
static ZLE_INT_T
15041504
getrestchar_keybuf(void)
15051505
{
15061506
char c;

Src/Zle/zle_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ mod_export Thingy lbindk, bindk;
126126
/**/
127127
int insmode;
128128

129-
/**/
130-
mod_export int eofchar;
129+
static int eofchar;
131130

132131
static int eofsent;
133132
/*
@@ -2048,7 +2047,7 @@ resetprompt(UNUSED(char **args))
20482047
/* same bug called from outside zle */
20492048

20502049
/**/
2051-
mod_export void
2050+
static void
20522051
zle_resetprompt(void)
20532052
{
20542053
reexpandprompt();

Src/Zle/zle_misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ addsuffix(int tp, int flags, ZLE_STRING_T chars, int lenstr, int lensuf)
15391539
/* Same as addsuffix, but from metafied string */
15401540

15411541
/**/
1542-
mod_export void
1542+
static void
15431543
addsuffixstring(int tp, int flags, char *chars, int lensuf)
15441544
{
15451545
int slen, alloclen;

Src/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4828,7 +4828,7 @@ getoutput(char *cmd, int qt)
48284828
*/
48294829

48304830
/**/
4831-
mod_export LinkList
4831+
static LinkList
48324832
readoutput(int in, int qt, int *readerror)
48334833
{
48344834
LinkList ret;

Src/hist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,7 @@ convamps(char *out, char *in, int inlen)
24172417
}
24182418

24192419
/**/
2420-
mod_export void
2420+
static void
24212421
checkcurline(Histent he)
24222422
{
24232423
if (he->histnum == curhist && (histactive & HA_ACTIVE)) {

Src/init.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ mod_export int tclen[TC_COUNT];
8484
/**/
8585
int tclines, tccolumns;
8686
/**/
87-
mod_export int hasam, hasbw, hasxn, hasye;
87+
mod_export int hasam;
88+
/**/
89+
int hasxn;
8890

8991
/* Value of the Co (max_colors) entry: may not be set */
9092

@@ -97,7 +99,7 @@ mod_export int tccolours;
9799
mod_export sigset_t sigchld_mask;
98100

99101
/**/
100-
mod_export struct hookdef zshhooks[] = {
102+
struct hookdef zshhooks[] = {
101103
HOOKDEF("exit", NULL, HOOKF_ALL),
102104
HOOKDEF("before_trap", NULL, HOOKF_ALL),
103105
HOOKDEF("after_trap", NULL, HOOKF_ALL),
@@ -815,9 +817,7 @@ init_term(void)
815817

816818
/* check whether terminal has automargin (wraparound) capability */
817819
hasam = tgetflag("am");
818-
hasbw = tgetflag("bw");
819820
hasxn = tgetflag("xn"); /* also check for newline wraparound glitch */
820-
hasye = tgetflag("YE"); /* print in last column does carriage return */
821821

822822
tclines = tgetnum("li");
823823
tccolumns = tgetnum("co");
@@ -870,6 +870,8 @@ init_term(void)
870870
rprompt_indent = 1; /* If you change this, update rprompt_indent_unsetfn() */
871871
/* The following is an attempt at a heuristic,
872872
* but it fails in some cases */
873+
/* int hasbw = tgetflag("bw"); */
874+
/* int hasye = tgetflag("YE"); */ /* print in last column does carriage return */
873875
/* rprompt_indent = ((hasam && !hasbw) || hasye || !tccan(TCLEFT)); */
874876

875877
/* if there's no termcap entry for italics, use CSI 3 m */

Src/jobs.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
when we started without being process group leader */
5656

5757
/**/
58-
mod_export pid_t origpgrp;
58+
pid_t origpgrp;
5959

6060
/* the process group of the shell */
6161

@@ -98,12 +98,10 @@ mod_export int jobtabsize;
9898
mod_export int maxjob;
9999

100100
/* If we have entered a subshell, the original shell's job table. */
101-
/**/
102-
mod_export struct job *oldjobtab;
101+
static struct job *oldjobtab;
103102

104103
/* The size of that. */
105-
/**/
106-
mod_export int oldmaxjob;
104+
static int oldmaxjob;
107105

108106
/* shell timings */
109107

@@ -1833,7 +1831,7 @@ clearjobtab(int monitor)
18331831
/* In a subshell, decide we want our own job table after all. */
18341832

18351833
/**/
1836-
mod_export void
1834+
void
18371835
clearoldjobtab(void)
18381836
{
18391837
if (oldjobtab)

0 commit comments

Comments
 (0)