summaryrefslogtreecommitdiffstats
path: root/bin/stty
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-11 09:56:48 +0000
committered <ed@FreeBSD.org>2011-12-11 09:56:48 +0000
commita5208fecbf6e7af0c050fdf4b1ea1b402c68b0ae (patch)
treef0dceb384d965e8fdf26ef9492c5b20db61f0497 /bin/stty
parent50815bc204802a24b13bd3533d574fec92ea137d (diff)
downloadFreeBSD-src-a5208fecbf6e7af0c050fdf4b1ea1b402c68b0ae.zip
FreeBSD-src-a5208fecbf6e7af0c050fdf4b1ea1b402c68b0ae.tar.gz
Move 3.5 KB from the data segment to the text segment.
The `struct modes' are only used by the getter-functions in the same file, so we can safely mark them static and const.
Diffstat (limited to 'bin/stty')
-rw-r--r--bin/stty/modes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/stty/modes.c b/bin/stty/modes.c
index cc18d2c..2bf211e 100644
--- a/bin/stty/modes.c
+++ b/bin/stty/modes.c
@@ -52,7 +52,7 @@ struct modes {
* The code in optlist() depends on minus options following regular
* options, i.e. "foo" must immediately precede "-foo".
*/
-struct modes cmodes[] = {
+static const struct modes cmodes[] = {
{ "cs5", CS5, CSIZE },
{ "cs6", CS6, CSIZE },
{ "cs7", CS7, CSIZE },
@@ -94,7 +94,7 @@ struct modes cmodes[] = {
{ NULL, 0, 0 },
};
-struct modes imodes[] = {
+static const struct modes imodes[] = {
{ "ignbrk", IGNBRK, 0 },
{ "-ignbrk", 0, IGNBRK },
{ "brkint", BRKINT, 0 },
@@ -130,7 +130,7 @@ struct modes imodes[] = {
{ NULL, 0, 0 },
};
-struct modes lmodes[] = {
+static const struct modes lmodes[] = {
{ "echo", ECHO, 0 },
{ "-echo", 0, ECHO },
{ "echoe", ECHOE, 0 },
@@ -182,7 +182,7 @@ struct modes lmodes[] = {
{ NULL, 0, 0 },
};
-struct modes omodes[] = {
+static const struct modes omodes[] = {
{ "opost", OPOST, 0 },
{ "-opost", 0, OPOST },
{ "litout", 0, OPOST },
@@ -209,7 +209,7 @@ struct modes omodes[] = {
int
msearch(char ***argvp, struct info *ip)
{
- struct modes *mp;
+ const struct modes *mp;
char *name;
name = **argvp;
OpenPOWER on IntegriCloud