diff options
author | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-03-10 19:22:06 +0000 |
commit | bc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch) | |
tree | beb32cedafc6232bf8a49fe90f0769d471ea6791 /editors | |
parent | dae6aa28598cb2353291f18ca52e768c3259165a (diff) | |
download | busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.bz2 busybox-w32-bc68cd14ccaebc17e7e03a08e51fddfb91007624.zip |
Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 2 | ||||
-rw-r--r-- | editors/vi.c | 26 |
2 files changed, 15 insertions, 13 deletions
diff --git a/editors/awk.c b/editors/awk.c index 65856aa55..cce3b562a 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -392,7 +392,7 @@ static char * vValues = | |||
392 | /* hash size may grow to these values */ | 392 | /* hash size may grow to these values */ |
393 | #define FIRST_PRIME 61; | 393 | #define FIRST_PRIME 61; |
394 | static const unsigned int PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; | 394 | static const unsigned int PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; |
395 | static const unsigned int NPRIMES = sizeof(PRIMES) / sizeof(unsigned int); | 395 | enum { NPRIMES = sizeof(PRIMES) / sizeof(unsigned int) }; |
396 | 396 | ||
397 | /* globals */ | 397 | /* globals */ |
398 | 398 | ||
diff --git a/editors/vi.c b/editors/vi.c index 4dcef68f9..3bf9ac3f9 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -138,18 +138,20 @@ static const char CMup[] = "\033[A"; | |||
138 | static const char CMdown[] = "\n"; | 138 | static const char CMdown[] = "\n"; |
139 | 139 | ||
140 | 140 | ||
141 | static const int YANKONLY = FALSE; | 141 | enum { |
142 | static const int YANKDEL = TRUE; | 142 | YANKONLY = FALSE, |
143 | static const int FORWARD = 1; // code depends on "1" for array index | 143 | YANKDEL = TRUE, |
144 | static const int BACK = -1; // code depends on "-1" for array index | 144 | FORWARD = 1, // code depends on "1" for array index |
145 | static const int LIMITED = 0; // how much of text[] in char_search | 145 | BACK = -1, // code depends on "-1" for array index |
146 | static const int FULL = 1; // how much of text[] in char_search | 146 | LIMITED = 0, // how much of text[] in char_search |
147 | 147 | FULL = 1, // how much of text[] in char_search | |
148 | static const int S_BEFORE_WS = 1; // used in skip_thing() for moving "dot" | 148 | |
149 | static const int S_TO_WS = 2; // used in skip_thing() for moving "dot" | 149 | S_BEFORE_WS = 1, // used in skip_thing() for moving "dot" |
150 | static const int S_OVER_WS = 3; // used in skip_thing() for moving "dot" | 150 | S_TO_WS = 2, // used in skip_thing() for moving "dot" |
151 | static const int S_END_PUNCT = 4; // used in skip_thing() for moving "dot" | 151 | S_OVER_WS = 3, // used in skip_thing() for moving "dot" |
152 | static const int S_END_ALNUM = 5; // used in skip_thing() for moving "dot" | 152 | S_END_PUNCT = 4, // used in skip_thing() for moving "dot" |
153 | S_END_ALNUM = 5 // used in skip_thing() for moving "dot" | ||
154 | }; | ||
153 | 155 | ||
154 | typedef unsigned char Byte; | 156 | typedef unsigned char Byte; |
155 | 157 | ||