-
Notifications
You must be signed in to change notification settings - Fork 0
/
DOGOTO.C
67 lines (55 loc) · 1.83 KB
/
DOGOTO.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/************************************************************************
* Command-interpreter code for Citadel
************************************************************************/
#include <string.h>
#include <time.h>
#include "ctdl.h"
#ifndef ATARI_ST
#include <dos.h>
#include <conio.h>
#endif
#include "keywords.h"
#include "proto.h"
#include "global.h"
/************************************************************************
* Contents
*
* doGoto() handles G(oto) command
*
************************************************************************/
/* --------------------------------------------------------------------
* History:
*
* -------------------------------------------------------------------- */
/************************************************************************
* External function definitions
************************************************************************/
void doGoto(char expand, int skip);
/************************************************************************/
/* doGoto() handles G(oto) command */
/************************************************************************/
void doGoto(expand, skip)
char expand; /* TRUE to accept following parameters */
{
label roomName;
if (!skip) {
mPrintf("\bGoto");
skiproom = FALSE;
} else {
mPrintf("\bBypass to");
skiproom = TRUE;
}
if (!expand) {
mPrintf(" ");
gotoRoom("");
} else {
getString("", roomName, NAMESIZE, 1, ECHO, "");
normalizeString(roomName);
if (roomName[0] == '?') {
listRooms(OLDNEW, FALSE, FALSE);
} else {
mPrintf(" ");
gotoRoom(roomName);
}
}
}