From: Eric S. Raymond Date: Thu, 3 Feb 2005 18:30:44 +0000 (+0000) Subject: Get rid of some unneeded conditionalizations. X-Git-Tag: 2.0~406 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=475ba38226627871f8a932d7a06a3dbdfaac8ef0;p=super-star-trek.git Get rid of some unneeded conditionalizations. --- diff --git a/battle.c b/battle.c index 455801b..f6c485f 100644 --- a/battle.c +++ b/battle.c @@ -260,9 +260,7 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait) { 1000.0*sqrt(square(ix-inx)+square(iy-iny))* fabs(sin(bullseye-angle)); *hit = fabs(*hit); -#ifndef SERGEEV - newcnd(); /* undock */ -#endif /* SERGEEV */ + newcnd(); /* we're blown out of dock */ /* We may be displaced. */ if (landed==1 || condit==IHDOCKED) return; /* Cheat if on a planet */ ang = angle + 2.5*(Rand()-0.5); @@ -654,9 +652,7 @@ void deadkl(int ix, int iy, int type, int ixx, int iyy) { int i,j; -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ crmena(1, type, 2, ixx, iyy); /* Decide what kind of enemy it is and update approriately */ if (type == IHR) { diff --git a/finish.c b/finish.c index 3369469..7ae6c87 100644 --- a/finish.c +++ b/finish.c @@ -1,6 +1,3 @@ -#ifdef SERGEEV -#include -#endif /* SERGEEV */ #include "sst.h" #include #include @@ -19,21 +16,13 @@ void dstrct() { prouts(" 8"); skip(1); prouts(" 7"); skip(1); prouts(" 6"); skip(1); -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ prout("ENTER-CORRECT-PASSWORD-TO-CONTINUE-"); -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ prout("SELF-DESTRUCT-SEQUENCE-OTHERWISE-"); -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ prout("SELF-DESTRUCT-SEQUENCE-WILL-BE-ABORTED"); -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ scan(); chew(); if (strcmp(game.passwd, citem) != 0) { @@ -404,12 +393,7 @@ void plaque(void) { while (fp == NULL) { proutn("File or device name for your plaque: "); -#ifdef SERGEEV getline(winner, sizeof(winner)); -#else - fgets(winner, 128, stdin); - winner[strlen(winner)-1] = '\0'; -#endif /* SERGEEV */ fp = fopen(winner, "w"); if (fp==NULL) { prout("Invalid name."); diff --git a/io.c b/io.c index 258da55..2e66d36 100644 --- a/io.c +++ b/io.c @@ -286,11 +286,7 @@ void prouts(char *fmt, ...) { #endif /* SERGEEV */ } -#ifndef SERGEEV void getline(char *line, int max) { -#else /* SERGEEV */ -void cgetline(char *line, int max) { -#endif /* SERGEEV */ if (curses) { #ifndef SERGEEV wgetnstr(stdscr, line, max); diff --git a/sst.h b/sst.h index b82a66b..5ba7004 100644 --- a/sst.h +++ b/sst.h @@ -439,7 +439,6 @@ void clearscreen(void); void iostart(int); void ioend(void); #ifdef SERGEEV -#define getline cgetline void setwnd(short); #endif /* SERGEEV */ void getline(char *, int);