1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

fixed the "/* in comments" problem.

This commit is contained in:
fn 1996-05-26 07:23:02 +00:00
parent d077aa933e
commit db69080045
12 changed files with 84 additions and 84 deletions

View File

@ -214,7 +214,7 @@ startup()
demo=Start(0);
srand((int)(time((time_t *)NULL))); /* random seed */
/* srand(371); /* non-random seed */
/* srand(371); */ /* non-random seed */
hinted[3]=yes(65,1,0);
newloc=1;
delhit = 0;

View File

@ -134,7 +134,7 @@ char buf[BUFSZ];
break;
}
}
/* obfree(obj, otmp2); /* now unnecessary: no pointers on bill */
/* obfree(obj, otmp2);*//* now unnecessary: no pointers on bill */
free((char *) obj); /* let us hope nobody else saved a pointer */
}

View File

@ -137,7 +137,7 @@ char *name;
u.uhp = -1;
}
if(u.uhp < 1) done_in_by(mtmp);
/* flags.botlx = 1; /* should we show status line ? */
/* flags.botlx = 1; */ /* should we show status line ? */
}
dochugw(mtmp) register struct monst *mtmp; {

View File

@ -97,12 +97,12 @@ struct stat buf, hbuf;
gethdate(name) char *name; {
/* old version - for people short of space */
/*
/* register char *np;
/* if(stat(name, &hbuf))
/* error("Cannot get status of %s.",
/* (np = rindex(name, '/')) ? np+1 : name);
/*
/* version using PATH from: seismo!gregc@ucsf-cgl.ARPA (Greg Couch) */
register char *np;
if(stat(name, &hbuf))
error("Cannot get status of %s.",
(np = rindex(name, '/')) ? np+1 : name);
version using PATH from: seismo!gregc@ucsf-cgl.ARPA (Greg Couch) */
/*
@ -166,8 +166,8 @@ veryold(fd) {
return(0);
/* From: Rick Adams <seismo!rick>
/* This will work on 4.1cbsd, 4.2bsd and system 3? & 5.
/* It will do nothing on V7 or 4.1bsd. */
This will work on 4.1cbsd, 4.2bsd and system 3? & 5.
It will do nothing on V7 or 4.1bsd. */
if(!(kill(lockedpid, 0) == -1 && errno == ESRCH))
return(0);
}

View File

@ -208,7 +208,7 @@ main(argc,argv)
drawscreen(); /* show the initial dungeon */
predostuff = 2; /* tell the trap functions that they must do a showplayer()
from here on */
/* nice(1); /* games should be run niced */
/* nice(1); */ /* games should be run niced */
yrepcount = hit2flag = 0;
while (1)
{

View File

@ -34,7 +34,7 @@
/ Arbitrate between monster and player. Watch for either
/ dying.
/
/************************************************************************/
*************************************************************************/
encounter(particular)
int particular;
@ -211,7 +211,7 @@ int flockcnt = 1; /* how many time flocked */
/ is altered (to add monsters, or make them tougher), this
/ routine may also need to be changed.
/
/************************************************************************/
*************************************************************************/
pickmonster()
{
@ -267,7 +267,7 @@ pickmonster()
/ DESCRIPTION:
/ Process all monster battle options.
/
/************************************************************************/
*************************************************************************/
playerhits()
{
@ -445,7 +445,7 @@ int ch; /* input */
/ Handle all special monsters here. If the monster is not a special
/ one, simply roll a hit against the player.
/
/************************************************************************/
*************************************************************************/
monsthits()
{
@ -722,7 +722,7 @@ SPECIALHIT:
/ Clear current monster's energy, experience, treasure type, and
/ flock. This is the same as having the monster run away.
/
/************************************************************************/
*************************************************************************/
cancelmonster()
{
@ -755,7 +755,7 @@ cancelmonster()
/ Hit monster specified number of times. Handle when monster dies,
/ and a few special monsters.
/
/************************************************************************/
*************************************************************************/
hitmonster(inflict)
double inflict;
@ -810,7 +810,7 @@ double inflict;
/ DESCRIPTION:
/ Prompt player and process magic spells.
/
/************************************************************************/
*************************************************************************/
throwspell()
{
@ -1050,7 +1050,7 @@ int ch; /* input */
/ Adjust statistics based upon current size.
/ Handle some special monsters.
/
/************************************************************************/
*************************************************************************/
callmonster(which)
int which;
@ -1160,7 +1160,7 @@ struct monster Othermonster; /* to find a name for mimics */
/ certain player statistics.
/ Handle cursed treasure.
/
/************************************************************************/
*************************************************************************/
awardtreasure()
{
@ -1608,7 +1608,7 @@ double dtemp; /* for temporary calculations */
/ Handle cursed treasure. Look for amulets and charms to save
/ the player from the curse.
/
/************************************************************************/
*************************************************************************/
cursedtreasure()
{
@ -1650,7 +1650,7 @@ cursedtreasure()
/ DESCRIPTION:
/ Swap a few player statistics randomly.
/
/************************************************************************/
*************************************************************************/
scramblestats()
{

View File

@ -50,7 +50,7 @@
/ - another player structure would be necessary to check for names
/ already in use
/
/************************************************************************/
*************************************************************************/
changestats(ingameflag)
bool ingameflag;
@ -510,7 +510,7 @@ BALTER:
/ DESCRIPTION:
/ Read monster file, and print a monster listing on standard output.
/
/************************************************************************/
*************************************************************************/
monstlist()
{
@ -546,7 +546,7 @@ register int count = 0; /* count in file */
/ DESCRIPTION:
/ Read the scoreboard file and print the contents.
/
/************************************************************************/
*************************************************************************/
scorelist()
{
@ -583,7 +583,7 @@ register FILE *fp; /* to open the file */
/ DESCRIPTION:
/ Read player file, and print list of active records to standard output.
/
/************************************************************************/
*************************************************************************/
activelist()
{
@ -620,7 +620,7 @@ activelist()
/ Delete characters which have not been used with the last
/ three weeks.
/
/************************************************************************/
*************************************************************************/
purgeoldplayers()
{
@ -676,7 +676,7 @@ long loc = 0L; /* location in file */
/ if an entry is found, and it is lower than the current player,
/ replace it, otherwise create an entry.
/
/************************************************************************/
*************************************************************************/
enterscore()
{

View File

@ -29,7 +29,7 @@
/ current player.
/ Also update user count.
/
/************************************************************************/
*************************************************************************/
checkbattle()
{
@ -106,7 +106,7 @@ long foeloc = 0L; /* location in file of person to fight */
/ p_1scratch:
/ set to total damage inflicted so far; changes to indicate action
/
/************************************************************************/
*************************************************************************/
battleplayer(foeplace)
long foeplace;
@ -361,7 +361,7 @@ LEAVE:
/ Take action action against foe, and decide who is master
/ for next iteration.
/
/************************************************************************/
*************************************************************************/
myturn()
{
@ -469,7 +469,7 @@ HIT:
/ Check for energy voids, holy grail, and tampering by other
/ players.
/
/************************************************************************/
*************************************************************************/
checktampered()
{
@ -530,7 +530,7 @@ long loc = 0L; /* location in energy void file */
/ Take care of energy voids, holy grail, decree and intervention
/ action on current player.
/
/************************************************************************/
*************************************************************************/
tampered(what, arg1, arg2)
int what;
@ -727,7 +727,7 @@ long loc; /* location in file of other players */
/ The valar has no coordinates, and is completely invisible if
/ cloaked.
/
/************************************************************************/
*************************************************************************/
userlist(ingameflag)
bool ingameflag;
@ -822,7 +822,7 @@ register int numusers = 0; /* number of users on file */
/ Clear energy voids with new king.
/ Print 'decree' prompt.
/
/************************************************************************/
*************************************************************************/
throneroom()
{
@ -904,7 +904,7 @@ long loc = 0L; /* location of old king in player file */
/ DESCRIPTION:
/ Tamper with other players. Handle king/valar specific options.
/
/************************************************************************/
*************************************************************************/
dotampered()
{
@ -1156,7 +1156,7 @@ FILE *fp; /* for opening gold file */
/ DESCRIPTION:
/ Write out energy void structure at specified location.
/
/************************************************************************/
*************************************************************************/
writevoid(vp, loc)
register struct energyvoid *vp;
@ -1192,7 +1192,7 @@ long loc;
/ location.
/ If no inactive ones are found, return one more than last location.
/
/************************************************************************/
*************************************************************************/
long
allocvoid()

View File

@ -39,7 +39,7 @@
/
/ 'mx' is assumed to be at least 2.
/
/************************************************************************/
*************************************************************************/
getstring(cp, mx)
register char *cp;
@ -115,7 +115,7 @@ int ch; /* input */
/ DESCRIPTION:
/ Print a message, and wait for a space character.
/
/************************************************************************/
*************************************************************************/
more(where)
int where;
@ -147,7 +147,7 @@ int where;
/ number.
/ If no valid number is found, return 0.0.
/
/************************************************************************/
*************************************************************************/
double
infloat()
@ -185,7 +185,7 @@ double result; /* return value */
/ Refresh screen, and get a single character option from player.
/ Return a random value if player's ring has gone bad.
/
/************************************************************************/
*************************************************************************/
inputoption()
{
@ -228,7 +228,7 @@ inputoption()
/ If the player wants to quit while in battle, he/she automatically
/ dies.
/
/************************************************************************/
*************************************************************************/
interrupt()
{
@ -318,7 +318,7 @@ unsigned savealarm; /* to save alarm value */
/ list of choices.
/ Give up after 3 tries.
/
/************************************************************************/
*************************************************************************/
getanswer(choices, def)
char *choices;
@ -429,7 +429,7 @@ YELL: mvprintw(oldy + 1, 0, "Please choose one of : [%s]\n", choices);
/ Come here when the alarm expires while waiting for input.
/ Simply longjmp() into getanswer().
/
/************************************************************************/
*************************************************************************/
void
catchalarm()

View File

@ -93,7 +93,7 @@
/ Process arguments, initialize program, and loop forever processing
/ player input.
/
/***************************************************************************/
****************************************************************************/
main(argc, argv)
int argc;
@ -334,7 +334,7 @@ double dtemp; /* for temporary calculations */
/ DESCRIPTION:
/ Set global flags, and open files which remain open.
/
/************************************************************************/
*************************************************************************/
initialstate()
{
@ -395,7 +395,7 @@ initialstate()
/ DESCRIPTION:
/ Prompt player, and roll up new character.
/
/************************************************************************/
*************************************************************************/
long
rollnewplayer()
@ -514,7 +514,7 @@ int ch; /* input */
/ DESCRIPTION:
/ Process main menu options.
/
/************************************************************************/
*************************************************************************/
procmain()
{
@ -747,7 +747,7 @@ bool hasmoved = FALSE; /* set if player has moved */
/ DESCRIPTION:
/ Print important information about game, players, etc.
/
/************************************************************************/
*************************************************************************/
titlelist()
{
@ -880,7 +880,7 @@ char hiname[21], nxtname[21];/* used for finding the two highest players */
/ DESCRIPTION:
/ Search for a character of a certain name, and check password.
/
/************************************************************************/
*************************************************************************/
long
recallplayer()
@ -966,7 +966,7 @@ int ch; /* input */
/ DESCRIPTION:
/ Handle gurus, medics, etc.
/
/************************************************************************/
*************************************************************************/
neatstuff()
{
@ -1100,7 +1100,7 @@ int ch; /* input */
/ DESCRIPTION:
/ Use the lookup table for rolling stats.
/
/************************************************************************/
*************************************************************************/
genchar(type)
int type;
@ -1160,7 +1160,7 @@ register struct charstats *statptr;/* for pointing into Stattable */
/ DESCRIPTION:
/ Catch a bunch of signals, and turn on curses stuff.
/
/************************************************************************/
*************************************************************************/
playinit()
{
@ -1266,7 +1266,7 @@ playinit()
/ Close all open files. If we are "in curses" terminate curses.
/ If 'doexit' is set, exit, otherwise return.
/
/************************************************************************/
*************************************************************************/
cleanup(doexit)
bool doexit;

View File

@ -32,7 +32,7 @@
/ level.
/ Check for council of wise, and being too big to be king.
/
/************************************************************************/
*************************************************************************/
movelevel()
{
@ -112,7 +112,7 @@ double inc; /* increment between new and old levels */
/ Look at coordinates and return an appropriately formatted
/ string.
/
/************************************************************************/
*************************************************************************/
char *
descrlocation(playerp, shortflag)
@ -213,7 +213,7 @@ static char *nametable[4][4] = /* names of places */
/ a few books. Higher level players shouldn't even bother to pick
/ up gold, except maybe to buy mana once in a while.
/
/************************************************************************/
*************************************************************************/
tradingpost()
{
@ -501,7 +501,7 @@ bool dishonest = FALSE;/* set when merchant is dishonest */
/ DESCRIPTION:
/ Important player statistics are printed on the screen.
/
/************************************************************************/
*************************************************************************/
displaystats()
{
@ -535,7 +535,7 @@ displaystats()
/ DESCRIPTION:
/ Print out some player statistics of lesser importance.
/
/************************************************************************/
*************************************************************************/
allstatslist()
{
@ -594,7 +594,7 @@ static char *flags[] = /* to print value of some bools */
/ has a crown.
/ If 'shortflag' is TRUE, return a 3 character string.
/
/************************************************************************/
*************************************************************************/
char *
descrtype(playerp, shortflag)
@ -687,7 +687,7 @@ static char *results[] = /* description table */
/ Search the player file for the player of the given name.
/ If player is found, fill structure with player data.
/
/************************************************************************/
*************************************************************************/
long
findname(name, playerp)
@ -733,7 +733,7 @@ long loc = 0; /* location in the file */
/ Search the player file for an unused entry. If none are found,
/ make one at the end of the file.
/
/************************************************************************/
*************************************************************************/
long
allocrecord()
@ -781,7 +781,7 @@ long loc = 0L; /* location in file */
/ DESCRIPTION:
/ Mark structure as not used, and update player file.
/
/************************************************************************/
*************************************************************************/
freerecord(playerp, loc)
struct player *playerp;
@ -814,7 +814,7 @@ long loc;
/ Mark player as inactive, and cleanup.
/ Do not save players below level 1.
/
/************************************************************************/
*************************************************************************/
leavegame()
{
@ -861,7 +861,7 @@ leavegame()
/ Update scoreboard, lastdead, and let other players know about
/ the demise of their comrade.
/
/************************************************************************/
*************************************************************************/
death(how)
char *how;
@ -991,7 +991,7 @@ static char *deathmesg[] =
/ DESCRIPTION:
/ Update location in player file with given structure.
/
/************************************************************************/
*************************************************************************/
writerecord(playerp, place)
register struct player *playerp;
@ -1025,7 +1025,7 @@ long place;
/ Experience level is a geometric progression. This has been finely
/ tuned over the years, and probably should not be changed.
/
/************************************************************************/
*************************************************************************/
double
explevel(experience)
@ -1059,7 +1059,7 @@ double experience;
/ DESCRIPTION:
/ Put nul characters in place of spaces at the end of the string.
/
/************************************************************************/
*************************************************************************/
truncstring(string)
register char *string;
@ -1096,7 +1096,7 @@ register int length; /* length of string */
/ If the player is beyond the point of no return, he/she is forced
/ to stay there.
/
/************************************************************************/
*************************************************************************/
altercoordinates(xnew, ynew, operation)
double xnew;
@ -1172,7 +1172,7 @@ int operation;
/ DESCRIPTION:
/ Read structure information from player file.
/
/************************************************************************/
*************************************************************************/
readrecord(playerp, loc)
register struct player *playerp;
@ -1203,7 +1203,7 @@ long loc;
/ DESCRIPTION:
/ Handle adjustment and maximums on various player characteristics.
/
/************************************************************************/
*************************************************************************/
adjuststats()
{
@ -1321,7 +1321,7 @@ double dtemp; /* for temporary calculations */
/ DESCRIPTION:
/ Put a bunch of default values in the given structure.
/
/************************************************************************/
*************************************************************************/
initplayer(playerp)
register struct player *playerp;
@ -1403,7 +1403,7 @@ register struct player *playerp;
/ DESCRIPTION:
/ If there is a message from other players, print it.
/
/************************************************************************/
*************************************************************************/
readmessage()
{
@ -1436,7 +1436,7 @@ readmessage()
/ DESCRIPTION:
/ Print message about offending file, and exit.
/
/************************************************************************/
*************************************************************************/
error(whichfile)
char *whichfile;
@ -1481,7 +1481,7 @@ error(whichfile)
/ This function is provided because someone's hypot() library function
/ fails if x1 == x2 && y1 == y2.
/
/************************************************************************/
*************************************************************************/
double
distance(x1, x2, y1, y2)
@ -1517,7 +1517,7 @@ double deltax, deltay;
/ DESCRIPTION:
/ When an illegal signal is caught, print a message, and cleanup.
/
/************************************************************************/
*************************************************************************/
ill_sig(whichsig)
int whichsig;
@ -1552,7 +1552,7 @@ int whichsig;
/ Return verbal description of player status.
/ If player status is S_PLAYING, check for low energy and blindness.
/
/************************************************************************/
*************************************************************************/
char *
descrstatus(playerp)
@ -1615,7 +1615,7 @@ register struct player *playerp;
/ We mask large integers with 32767 to handle sites that return
/ 31 bit random integers.
/
/************************************************************************/
*************************************************************************/
double
drandom()
@ -1653,7 +1653,7 @@ drandom()
/ Add taxes to tax data base; add remaining gold and gems to
/ player's cache.
/
/************************************************************************/
*************************************************************************/
collecttaxes(gold, gems)
double gold;

View File

@ -37,7 +37,7 @@
/ put in these files.
/ Also, the monster binary data base is created here.
/
/************************************************************************/
*************************************************************************/
static char *files[] = { /* all files to create */
_PATH_MONST,
@ -226,7 +226,7 @@ main(argc, argv)
/ DESCRIPTION:
/ Print an error message, then exit.
/
/************************************************************************/
*************************************************************************/
Error(str, file)
char *str, *file;
@ -258,7 +258,7 @@ char *str, *file;
/
/ DESCRIPTION:
/
/************************************************************************/
*************************************************************************/
double
drandom()