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:
672ef17
)
Remove unused code.
author
Eric S. Raymond
<esr@thyrsus.com>
Sun, 18 Jun 2017 17:20:04 +0000
(13:20 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 18 Jun 2017 17:20:04 +0000
(13:20 -0400)
advent.h
patch
|
blob
|
history
misc.c
patch
|
blob
|
history
diff --git
a/advent.h
b/advent.h
index ce5e7c505b618c15decdf962265f68eeec046d2e..77c8079e6160ead8a349ae39d268f8ba9e975fe4 100644
(file)
--- a/
advent.h
+++ b/
advent.h
@@
-93,7
+93,6
@@
extern bool GETIN(FILE *,token_t*,token_t*,token_t*,token_t*);
extern long YES(FILE *,vocab_t,vocab_t,vocab_t);
extern long GETTXT(bool,bool,bool);
extern token_t MAKEWD(long);
extern long YES(FILE *,vocab_t,vocab_t,vocab_t);
extern long GETTXT(bool,bool,bool);
extern token_t MAKEWD(long);
-extern void TYPE0(void);
extern long VOCAB(long,long);
extern void JUGGLE(long);
extern void MOVE(long,long);
extern long VOCAB(long,long);
extern void JUGGLE(long);
extern void MOVE(long,long);
@@
-106,7
+105,6
@@
extern bool TSTBIT(long,int);
extern long RNDVOC(long,long);
extern void BUG(long) __attribute__((noreturn));
extern bool MAPLIN(FILE *);
extern long RNDVOC(long,long);
extern void BUG(long) __attribute__((noreturn));
extern bool MAPLIN(FILE *);
-extern void TYPE(void);
extern void DATIME(long*, long*);
enum termination {endgame, quitgame, scoregame};
extern void DATIME(long*, long*);
enum termination {endgame, quitgame, scoregame};
diff --git
a/misc.c
b/misc.c
index 3eda32a951af9443e1fb90691060c32c592efe22..410dfd88542fbf700894d866ae520c0740b60ab2 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-162,7
+162,7
@@
bool GETIN(FILE *input,
for (;;) {
if (game.blklin)
for (;;) {
if (game.blklin)
-
TYPE0()
;
+
fputc('\n', stdout);
;
if (!MAPLIN(input))
return false;
*pword1 = GETTXT(true, true, true);
if (!MAPLIN(input))
return false;
*pword1 = GETTXT(true, true, true);
@@
-206,7
+206,7
@@
long YES(FILE *input, vocab_t x, vocab_t y, vocab_t z)
}
}
}
}
-/* Line-parsing routines (GETTXT, MAKEWD, PUTTXT, SHFTXT
, TYPE0
) */
+/* Line-parsing routines (GETTXT, MAKEWD, PUTTXT, SHFTXT) */
long GETTXT(bool skip, bool onewrd, bool upper)
/* Take characters from an input line and pack them into 30-bit words.
long GETTXT(bool skip, bool onewrd, bool upper)
/* Take characters from an input line and pack them into 30-bit words.
@@
-278,19
+278,6
@@
token_t MAKEWD(long letters)
return word;
}
return word;
}
-void TYPE0(void)
-/* Type a blank line. This procedure is provided as a convenience for callers
- * who otherwise have no use for MAPCOM. */
-{
- long temp;
-
- temp = LNLENG;
- LNLENG = 0;
- TYPE();
- LNLENG = temp;
- return;
-}
-
/* Data structure routines */
long VOCAB(long id, long init)
/* Data structure routines */
long VOCAB(long id, long init)
@@
-514,7
+501,7
@@
void BUG(long num)
exit(0);
}
exit(0);
}
-/* Machine dependent routines (MAPLIN,
TYPE,
SAVEIO) */
+/* Machine dependent routines (MAPLIN, SAVEIO) */
bool MAPLIN(FILE *fp)
{
bool MAPLIN(FILE *fp)
{
@@
-585,8
+572,7
@@
bool MAPLIN(FILE *fp)
* 63 = percent (%) [ASCII 45 octal, 37 decimal]
* 64-73 = digits, 0 through 9
* Remaining characters can be translated any way that is convenient;
* 63 = percent (%) [ASCII 45 octal, 37 decimal]
* 64-73 = digits, 0 through 9
* Remaining characters can be translated any way that is convenient;
- * The "TYPE" routine below is used to map them back to characters when
- * necessary. The above mappings are required so that certain special
+ * The above mappings are required so that certain special
* characters are known to fit in 6 bits and/or can be easily spotted.
* Array elements beyond the end of the line should be filled with 0,
* and LNLENG should be set to the index of the last character.
* characters are known to fit in 6 bits and/or can be easily spotted.
* Array elements beyond the end of the line should be filled with 0,
* and LNLENG should be set to the index of the last character.
@@
-610,26
+596,6
@@
bool MAPLIN(FILE *fp)
}
}
}
}
-void TYPE(void)
-/* Type the first "LNLENG" characters stored in inline, mapping them
- * from integers to text per the rules described above. INLINE
- * may be changed by this routine. */
-{
- long i;
-
- if (LNLENG == 0) {
- printf("\n");
- return;
- }
-
- for (i = 1; i <= LNLENG; i++) {
- INLINE[i] = advent_to_ascii[(int) INLINE[i]];
- }
- INLINE[LNLENG + 1] = 0;
- printf("%s\n", INLINE + 1);
- return;
-}
-
void DATIME(long* d, long* t)
{
struct timeval tv;
void DATIME(long* d, long* t)
{
struct timeval tv;