Commit Graph

46 Commits

Author SHA1 Message Date
nethack.allison
46b88235a1 Borland bits (from Yitzhak) 2002-09-02 14:29:57 +00:00
nethack.allison
d1da0e7398 bones file diagnostics
Pat added some error information to create_levelfile.
This does the same for create_bonesfile, but the
only place it is logged is in the paniclog, unless
you're in wizard mode.  If bones file creation is
silently failing for someone and they aren't getting
bones files, this provides a way to diagnose why.
2002-08-24 23:25:40 +00:00
nethack.rankin
b00a9dcd4a level file handling and trickery feedback
1) consolidate all core usage of `errno' in files.c;
2) give more feedback for any failure by create_levelfile or open_levelfile,
   similar to what was being done for problems during level change;
3) include trickery info in paniclog (many instances of "trickery" seem to
   be due to disk or quota problems rather than user misbehavior...).

The create_levelfile call in pcmain probably ought to be changed to use
error feedback, but in the meantime this should continue working.

Perhaps error() should be modified to update paniclog too, but I didn't
want to go through all its port-specific incarnations making changes.
2002-08-23 14:52:25 +00:00
nethack.allison
2697615bd3 win32: hold .0 file open exclusively
-prevents problems with internal recover
if second copy of game is started up with
the same player name.
2002-08-21 15:21:56 +00:00
nethack.allison
3515dcf1f1 SELF_RECOVER for win32
- define SELF_RECOVER for win32
- add code to perform a recover operation from
  within NetHack itself when SELF_RECOVER is defined
2002-08-21 03:30:19 +00:00
nethack.allison
17ba46e459 recover.c had:
#  ifdef WIN32
#define SAVESIZE	(PL_NSIZ + 40)  /* username-player.NetHack-saved-game */

files.c had:
#  if defined(WIN32)
#define SAVESIZE	(PL_NSIZ + 60)	/* username-player.NetHack-saved-game */

It has to be 40 for savefile compatibility with 3.4.0.
2002-08-18 19:35:45 +00:00
cohrs
dee94b0410 handle 0 in DUNGEONS et al
As suggested by <Someone>, treat 0 entries in the various graphics symbol
specifications as leaving the value unchanged.
2002-08-13 04:18:46 +00:00
warwick
0b7c39a331 alloc, not malloc 2002-07-29 05:16:54 +00:00
warwick
036d873dbb Just a comment. 2002-07-24 08:10:36 +00:00
warwick
bdc6c965af Rollback NAME_MAX workarounds as suggested. 2002-07-23 06:07:21 +00:00
nethack.allison
4da155e376 djgpp build was also broken 2002-07-23 05:33:00 +00:00
nethack.allison
d9dad62838 build fix for files.c
Warwick's plname files.c addition broke the
build on both win32 and CE because NAMES_MAX
wasn't defined.

In win32 it was defined in limits.h, but only
when _POSIX_ was defined.

In CE it just didn't exist in any of the
header files.  Since it was also complaining
about strdup(), I #ifdef'd Warwick's code out
under CE.
2002-07-23 04:51:28 +00:00
warwick
7b5618e03c Enclose savefile format change by STORE_PLNAME_IN_FILE macro. 2002-07-22 09:13:04 +00:00
warwick
16b7d4a099 Store plname in save files (and restore it).
Move get_saved_games() functionality to files.c
Use moved get_saved_games() functionality in Qt windowport.
[also some non-enabled perminv code in Qt windowport]
2002-07-22 06:25:52 +00:00
nethack.allison
0cc5b698d5 Windows CE port addition 2002-07-22 03:20:52 +00:00
nethack.allison
4957a7f5be another follow-up to fname_decode() routine 2002-07-21 16:58:12 +00:00
nethack.allison
2161fbe18c remove unnecessary variable
follow-up to fname_decode() routine
2002-07-21 16:49:19 +00:00
nethack.allison
03cc2afa2e WIN32: file naming
Allow single character variations in player names
to remain unique in file names by encoding rather
than substituting.
"plnam one", "plnam_one", and "plnam~one" at the
"Who are you?" prompt get unique filenames after this patch.
2002-07-21 04:07:32 +00:00
nethack.allison
bd7c4e4af8 validate_prefix_locations follow-up2
translate errno in the log file too
check for standard C
2002-07-05 15:38:27 +00:00
nethack.allison
b41dab0b7a validate_prefix_locations follow-up
translate errno in the log file too.
2002-07-05 14:46:31 +00:00
nethack.allison
895199a83b validate_prefix_locations
Add the actual value of the prefix, and the error returned by the system
to the paniclog file entry.
2002-07-05 14:42:49 +00:00
nethack.allison
fff14e7eed NOCWD_ASSUMPTIONS under MSDOS followup 2002-07-05 13:22:28 +00:00
nethack.allison
eac7db7278 early directory validation follow-up
Don't test file creation on the read-only areas: dataprefix, configprefix
2002-07-01 22:53:30 +00:00
nethack.allison
ea268b5b6f early directory validation
Allow early prefix directory validation to help prevent
failed games and lost save files due to incorrect config
file settings.
2002-07-01 22:42:57 +00:00
nethack.allison
6b47ae351d more NOCWD_ASSUMPTIONS
The NOCWD_ASSUMPTIONS conditional code allows readonly
parts of NetHack to be separated from areas that require write-access.
This allows the recent panic log needed a prefix.
2002-06-29 12:44:54 +00:00
cohrs
2e2ce4effa the panic log
Add an optional paniclog file, controlled by a new PANICLOG macro that can
be used to log all panic and impossible messages.  Helpful when people
forget to send, or didn't see, the message.
2002-06-02 18:49:18 +00:00
nethack.allison
51f9892b3b Allow MICRO and WIN32 code paths to diverge
There's still a lot of overlap for 3.4.1, but not
100% any longer and it facilitates some improvements
- Allow error save files on WIN32
2002-03-30 19:09:56 +00:00
nethack.allison
67604538c6 #R668: Windows 2000 Lock File Creation Error
This was a tricky one.  While the error was ultimately because
he was specifying a non-existant directory in defaults.nh, the
error message lead me to the wrong area until I traced through
with a debugger.

It turns out that an fqn buffer was being re-used before it
was finished being used with the original information in
sys/share/pcunix.c, so the error message listed the
wrong file!

This adds one more buffer and fixes the problem.
Note that it could only affect plaforms with
PREFIXES_IN_USE defined  (NOCWD_ASSUMPTIONS
or VAR_PLAYGROUND)

It also alters the WIN32 error message to give them a
hint as to what the problem might be.

<email deleted>
<email deleted>
Sent: Saturday, March 23, 2002 9:27 AM
Subject: #R668: Windows 2000 Lock File Creation Error
> nhfrom: 3.4.0 Official binary release for Windows 95/98/NT/2000/Me/XP
> I get an error after unzipping nethack to c:\nethack, and changing the
> configuration (defaults.nh) to reflect this in the hackdir, levels and save
> configuration items.
>
> The error I get is "cannot creat lock file (C:\nethack\NHPERM_lock.)" after
> entering nethack at the command line and answering the Who are you? question.
2002-03-24 01:37:16 +00:00
arromdee
399b801315 bad wizkit items
Format multiple bad wizkit items a little better.  It will scroll off the screen
if there are more than a screen of bad items, but that's probably not too
likely.
2002-03-23 18:30:38 +00:00
arromdee
a5b8144dd1 wizkit messages for gold
This prevents wizkit items that aren't objects from having their names
printed on the screen if they are gold pieces, traps, or similar.

(Note that the only one of those that actually works is gold.  For some reason
if you put "a hole" (for instance) in the wizkit, the hole will not get
created, even though it will, even on the stairs, if the wizard wishes for it
in-game.)
2002-03-03 05:01:09 +00:00
cohrs
c5c394023e WIZKIT gold items
- if !GOLDOBJ, putting gold in the WIZKIT would add zerobj to the inventory.
  This shows up when you "Da" and get a message like "you drop 0 glorkum 0 0 0"
2002-03-03 03:36:33 +00:00
nethack.allison
f9244b56ad wizkit follow-up
The recent wizkit change caused the build to
fail on all environments other than unix and vms.

>..\src\files.c(1607) : error C2065: 'envp' : undeclared identifier
>..\src\files.c(1607) : warning C4047: '=' :
>'int ' differs in levels of indirect ion from 'char *'
>..\src\files.c(1608) : error C2100: illegal indirection
>..\src\files.c(1608) : warning C4047: 'function' :
>'const char *' differs in levels of indirection from 'int '
>..\src\files.c(1608) : warning C4024: 'strncpy' :
2002-02-24 17:17:25 +00:00
nethack.rankin
6b4429d942 more wizkit: bulletproofing previous change 2002-02-24 06:56:46 +00:00
nethack.rankin
34f682205c wizkit enhancement
Allow a WIZKIT file name to be specified via the environment.
If none is specified there, get it from the run-time config file.
2002-02-24 06:51:36 +00:00
cohrs
ae9f38222e add_sound_mapping cleanup
- avoid several buffer overflows
- move use of access() to files.c in new can_read_file() function
- remove extra newlines in raw_print() calls
- get ready for lint, eg sprintf -> Sprintf
- generally make the code look like core code, not Qt code
2002-02-21 03:33:42 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
kmhugo
b22af87dea Mac pragma tuneup
The Macintosh CodeWarrior port does not need nor support
the undefined pragmas.
2002-02-02 05:40:40 +00:00
cohrs
1a7aa0933e another WIZKIT fix
previous rev put the new "else" in the wrong place
2002-01-23 18:23:54 +00:00
cohrs
4b677185de another WIZKIT fix
if $HOME is not set, don't use uninitialized buffer as the filename to open
2002-01-23 18:06:19 +00:00
nethack.allison
0011db11d3 wizkit fix 2002-01-23 17:52:53 +00:00
dean
84b72da0eb update unused pragmas Update some of the mac pragmas for unused variables for the MPW compilers. 2002-01-23 06:14:21 +00:00
nethack.allison
2c26f0ceea Removed some unneeded preprocessor conditional code.
It was Windows CE stuff that hasn't been integrated into the sources tree yet.
2002-01-17 02:17:17 +00:00
nethack.allison
e02ab47597 Changes to existing files by the win32 port additions. 2002-01-13 05:53:39 +00:00
nethack.allison
a0b13b1b25 compression fix fix
Ken:
Fix an error in my fix for compression error messages.

No Makefile.src change should be necessary because files.c depends on hack.h,
which "depends" on wintty.h (actually ifdef USE_TRAMPOLI, but the Makefile
doesn't know that).
2002-01-08 04:44:07 +00:00
cohrs
c77073be31 sync changes since last snapshot 2002-01-07 02:12:04 +00:00
jwalz
73bdc33c0a *** empty log message *** 2002-01-05 21:05:49 +00:00