X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/462fca95471224f85b85be911e72faee16cd1597..792a6351b32e5d37b40252ec9146f9b8af9f6075:/trek/lose.c?ds=inline diff --git a/trek/lose.c b/trek/lose.c index c3d846f9..efb89fd9 100644 --- a/trek/lose.c +++ b/trek/lose.c @@ -1,6 +1,8 @@ +/* $NetBSD: lose.c,v 1.7 2003/08/07 09:37:52 agc Exp $ */ + /* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. + * Copyright (c) 1980, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,13 +29,20 @@ * SUCH DAMAGE. */ +#include #ifndef lint -/*static char sccsid[] = "from: @(#)lose.c 5.6 (Berkeley) 6/26/90";*/ -static char rcsid[] = "$Id: lose.c,v 1.2 1993/08/01 18:50:21 mycroft Exp $"; +#if 0 +static char sccsid[] = "@(#)lose.c 8.1 (Berkeley) 5/31/93"; +#else +__RCSID("$NetBSD: lose.c,v 1.7 2003/08/07 09:37:52 agc Exp $"); +#endif #endif /* not lint */ -# include "trek.h" -# include +#include +#include +#include +#include "trek.h" +#include "getpar.h" /* ** PRINT OUT LOSER MESSAGES @@ -47,7 +52,9 @@ static char rcsid[] = "$Id: lose.c,v 1.2 1993/08/01 18:50:21 mycroft Exp $"; ** actions which need be taken are taken. */ -char *Losemsg[] = +extern jmp_buf env; + +const char *const Losemsg[] = { "You ran out of time", "You ran out of energy", @@ -64,11 +71,10 @@ char *Losemsg[] = "Your last crew member died", }; +void lose(why) int why; { - extern jmp_buf env; - Game.killed = 1; sleep(1); printf("\n%s\n", Losemsg[why - 1]);