From 3918c40fa042188723913262dae8f9856a4b5e26 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Mon, 7 Apr 2003 23:36:34 +0000 Subject: [PATCH] formatting --- ChangeLog | 1 + main/text.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 645ecb4..a656728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2003-04-07 Bradley Bell * main/text.c: don't die on text not found + formatting * main/inferno.c: print some useful info if hog not found, allow -help to work if no text available diff --git a/main/text.c b/main/text.c index b9f762f..ac63215 100644 --- a/main/text.c +++ b/main/text.c @@ -1,3 +1,4 @@ +/* $Id: text.c,v 1.8 2003-04-07 23:36:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,16 +8,64 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ +/* + * + * Code for localizable text + * + * Old Log: + * Revision 1.1 1995/05/16 15:31:44 allender + * Initial revision + * + * Revision 2.0 1995/02/27 11:33:09 john + * New version 2.0, which has no anonymous unions, builds with + * Watcom 10.0, and doesn't require parsing BITMAPS.TBL. + * + * Revision 1.11 1994/12/14 12:53:23 matt + * Improved error handling + * + * Revision 1.10 1994/12/09 18:36:44 john + * Added code to make text read from hogfile. + * + * Revision 1.9 1994/12/08 20:56:34 john + * More cfile stuff. + * + * Revision 1.8 1994/12/08 17:20:06 yuan + * Cfiling stuff. + * + * Revision 1.7 1994/12/05 15:10:36 allender + * support encoded descent.tex file (descent.txb) + * + * Revision 1.6 1994/12/01 14:18:34 matt + * Now support backslash chars in descent.tex file + * + * Revision 1.5 1994/10/27 00:13:10 john + * Took out cfile. + * + * Revision 1.4 1994/07/11 15:33:49 matt + * Put in command-line switch to load different text files + * + * Revision 1.3 1994/07/10 09:56:25 yuan + * #include added for FILE type. + * + * Revision 1.2 1994/07/09 22:48:14 matt + * Added localizable text + * + * Revision 1.1 1994/07/09 21:30:46 matt + * Initial revision + * + * + */ + #ifdef HAVE_CONFIG_H #include #endif #ifdef RCS -static char rcsid[] = "$Id: text.c,v 1.7 2003-04-07 23:30:46 btb Exp $"; +static char rcsid[] = "$Id: text.c,v 1.8 2003-04-07 23:36:34 btb Exp $"; #endif #include @@ -125,16 +174,16 @@ void load_text() tptr = strchr(tptr,'\n'); - #ifdef MACINTOSH // total hack for mac patch since they don't want to patch data. +#ifdef MACINTOSH // total hack for mac patch since they don't want to patch data. if (!tptr && (i == 644) ) break; - #else +#else if (!tptr) { Warning("Not enough strings in text file - expecting %d, found %d\nThis probably means you have the wrong version of the descent 2 datafiles. You need version 1.2\n",N_TEXT_STRINGS,i); if (i == 644) break; } - #endif +#endif if ( tptr ) *tptr++ = 0; @@ -149,7 +198,7 @@ void load_text() else if (p[1] == 't') newchar = '\t'; else if (p[1] == '\\') newchar = '\\'; else - Error("Unsupported key sequence <\\%c> on line %d of file <%s>",p[1],i+1,filename); + Error("Unsupported key sequence <\\%c> on line %d of file <%s>",p[1],i+1,filename); p[0] = newchar; strcpy(p+1,p+2); -- 2.17.1