projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1ee521
)
Goto elimination.
author
Eric S. Raymond
<esr@thyrsus.com>
Tue, 6 Jun 2017 18:41:03 +0000
(14:41 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Tue, 6 Jun 2017 18:41:03 +0000
(14:41 -0400)
misc.c
patch
|
blob
|
history
diff --git
a/misc.c
b/misc.c
index e6ee7d1dbeee6e726fad14c4046d4194950309d4..7bf07df9fca3670ba64a8d376e3709ef057b15e5 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-282,15
+282,13
@@
long I, L, WORD;
* kludgey workaround, you can increment a letter by 5 by adding 50 to
* the next pair of digits. */
-
WORD=0;
I=1;
- L=LETTRS;
-L10: WORD=WORD+I*(MOD(L,50)+10);
- I=I*64;
- if(MOD(L,100) > 50)WORD=WORD+I*5;
- L=L/100;
- if(L != 0) goto L10;
+ for (L=LETTRS; L != 0; L=L/100) {
+ WORD=WORD+I*(MOD(L,50)+10);
+ I=I*64;
+ if(MOD(L,100) > 50)WORD=WORD+I*5;
+ }
I=64L*64L*64L*64L*64L/I;
WORD=WORD*I;
return(WORD);