summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7fc0608)
SCCS-vsn: games/sail/pl_1.c 1.6
SCCS-vsn: games/sail/machdep.h 1.7
- * sccsid = "@(#)machdep.h 1.6 %G%";
+ * sccsid = "@(#)machdep.h 1.7 %G%";
*/
#define LOGFILE "/usr/games/lib/shipslog"
#define DRIVER "/usr/games/.driver"
*/
#define LOGFILE "/usr/games/lib/shipslog"
#define DRIVER "/usr/games/.driver"
+#define DEBUGDRIVER "driver"
#define DRIVERNAME ".driver"
#define UCBCORY
#define SAILLOGDEF 0 /* don't look up usernames */
#define DRIVERNAME ".driver"
#define UCBCORY
#define SAILLOGDEF 0 /* don't look up usernames */
-static char *sccsid = "@(#)pl_1.c 1.5 83/05/20";
+static char *sccsid = "@(#)pl_1.c 1.6 83/05/20";
#endif
#include "player.h"
#endif
#include "player.h"
-initialize(nodriver, randomize)
-char randomize, nodriver;
+initialize(nodriver, randomize, debug)
+char randomize, nodriver, debug;
{
char comm[80], file[25], capn;
char message[60];
{
char comm[80], file[25], capn;
char message[60];
char num[10];
sprintf(num, "%d", game);
if (!fork()) {
char num[10];
sprintf(num, "%d", game);
if (!fork()) {
- execl(DRIVER, DRIVERNAME, num, 0);
+ if (debug)
+ execl(DEBUGDRIVER, DRIVERNAME, num, 0);
+ else
+ execl(DRIVER, DRIVERNAME, num, 0);
perror(DRIVER);
kill(pid, SIGKILL);
exit(1);
perror(DRIVER);
kill(pid, SIGKILL);
exit(1);
int ta;
char message[60], ch;
int uid;
int ta;
char message[60], ch;
int uid;
- char nodrive = 0, randomize = 0, *badstring();
+ char nodrive = 0, randomize = 0, debug = 0;
+ char *badstring();
extern char _sobuf[];
setbuf(stdout, _sobuf);
extern char _sobuf[];
setbuf(stdout, _sobuf);
case 'd':
nodrive = 1;
break;
case 'd':
nodrive = 1;
break;
+ case 'D':
+ debug++;
+ break;
case 'x':
randomize = 1;
break;
case 'x':
randomize = 1;
break;
game = atoi(*argv);
else
game = -1;
game = atoi(*argv);
else
game = -1;
- initialize(nodrive, randomize);
+ initialize(nodrive, randomize, debug);
Signal("Aye aye, Sir", 0, 0);
for(;;) {
move(scroll++,0);
Signal("Aye aye, Sir", 0, 0);
for(;;) {
move(scroll++,0);