Commit Graph

31 Commits

Author SHA1 Message Date
nhmall
507f526b43 remove duplicate entry in .gitignore 2026-03-24 05:48:51 -04:00
Ingo Paschke
c5dfd1fc5c Fetch BSD regex from GitHub at build time
Replace bundled Spencer regex with a fetch-regex build step that
clones https://github.com/garyhouston/regex.git, generates the
required .ih and regex.h headers via mkh, and copies the result
into sys/amiga/regex/.

Usage: make CROSS_TO_AMIGA=1 fetch-regex

The fetched sources are not tracked in git.
2026-03-24 01:21:00 +01:00
nhmall
f4a6da2e52 save/restore changes - part 2
This is the second of a series of changes related to save/restore.

    No EDITLEVEL bump has been included, because although the code
    is changed extensively by this, the content of the savefiles have
    not been changed.

    Push the use of the structlevel bwrite() and mread() function use
    out of the core and into sfstruct.c. This is groundwork for upcoming
    changes.

    In the core, replace the bwrite() and mread() calls with the
    use of type-specific savefile output (Sfo) and savefile
    input (Sfi) macros.  The macros are defined in a new header file
    savefile.h, which also contains the prototypes for the sfo_* and
    sfi_* functions that the macros ultimately expand to. The functions
    themselves are in src/sfbase.c.

    On C99, each Sfo or Sfi macro expansion refers directly to the
    corresponding  type-specific sfo_* or sfi_* function.

    If C23 or later is is use, the majority (all but 3 types) of the
    macros refer to a single _Generic output routine sfo(nhfp, dt, tag),
    and a single _Generic input routine sfi(nhfp, dt, tag), which handles
    the dispatch of the type-specific underlying functions. This was
    somewhat experimental, but turned out to be practical because the
    compiler would gripe if the type for a variable was not included in
    the _Generic when passed as an argument, so it could be fixed.

    This alters the savefile verication process by having a common set
    return values for the related functions such as uptodate(),
    check_version(), etc. The new return values return more information
    about savefile incompatibilities, beyond failure/sucess. The
    additional information will be useful for an upcoming addition.
    The expanded return values are:
     SF_UPTODATE                     (0) everything matched and looks good
     SF_OUTDATED                     (1) savefile is outdated
     SF_CRITICAL_BYTE_COUNT_MISMATCH (2) critical size count mismatch
     SF_DM_IL32LLP64_ON_ILP32LL64    (3) Windows x64 savefile on x86
     SF_DM_I32LP64_ON_ILP32LL64      (4) Unix 64 savefile on x86
     SF_DM_ILP32LL64_ON_I32LP64      (5) x86 savefile on Unix 64
     SF_DM_ILP32LL64_ON_IL32LLP64    (6) x86 savefile on Windows x64
     SF_DM_I32LP64_ON_IL32LLP64      (7) Unix 64 savefile on Windows x64
     SF_DM_IL32LLP64_ON_I32LP64      (8) Windows x64 savefile on Unix 64
     SF_DM_MISMATCH                  (9) some other mismatch
    The callers in the core have been adjusted to deal with the expanded
    return values.

    Other miscellaneous inclusions:

       - go.oracle_loc -> svo.oracle_loc.
       - add a bit (1UL << 30) to  called SFCTOOL_BIT as groundwork
         for changes to follow.
2025-05-25 15:03:13 -04:00
nhkeni
37ad527512 make git ignore checksums temp file 2024-08-10 21:18:34 -04:00
nhmall
1d4aeb4f15 add some zip file packaging to visual studio proj 2024-03-31 20:37:56 -04:00
nhmall
10cafddcb0 more bundle work for macOS
This iteration:

Places the resulting bundle folder off the top of the tree, rather than as a subdirectory of src.

Leaves the Applescript files out for now.

Builds the Info.plist (for now) via hard-coded values in the Makefile.

Builds the bundle launch script on the fly at make-time.

I think this revision may be working, at lease on my test machine.
There are more improvements to be done.
2023-02-12 01:19:05 -05:00
nhmall
dad923feba ignore visual studio files in util 2021-11-13 12:36:40 -05:00
nhmall
a869a018d6 ignore visual studio .user files 2021-08-22 08:12:50 -04:00
Adam Powers
dc2d757399 libnethack pr385
roll parts of pr385 into source tree

This does not take the PR as is.

Unlike the PR, this streamlines and minimizes the integration somewhat:

- use hints/include mechanism instead of creating alternative
  Makefile.dat, Makefile.src, Makefile.top, Makefile.utl in sys/lib;
  those would have been a maintenance nightmare.

- don't have alternative mkmkfile.sh and setup.sh in sys/lib.

- sys/lib/libnethackmain.c differed from sys/unix/unixmain.c by
  very little, so just place a small bit of conditional code at the
  top of sys/unix/unixmain.c instead.

- changed the conditional code bits from __EMSCRIPTEN__ to
  CROSS_TO_WASM.

- You should be able to build the wasm result by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make WANT_LIBNH all

- You should be able to build LIBNBH by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make CROSS_TO_WASM=1 all

As it is currently coded, winshim.c requires C99.
2020-10-04 14:46:32 -04:00
nhmall
c1dd898df6 use curl which is always available on osx rather than wget 2019-11-24 13:37:22 -05:00
nhmall
a9f33df64a more support in cross-compile for the changes in this branch 2019-11-24 12:23:00 -05:00
nhmall
308ebea68e add some msdos files to .gitignore, produce zip 2019-11-23 10:13:10 -05:00
nhmall
8bd6ef629a update post-Lua
add lib/ to .gitignore

add optional "make fetch-Lua" step to simplify prerequisite to "make all"
2019-11-15 11:12:00 -05:00
Mike Allison
84c2d78a42 add .DS_Store to .gitignore 2018-11-18 23:37:49 -05:00
Bart House
26171ed9f5 Ignore .vs hidden folders generated by visual studio 2017. 2018-11-10 20:33:30 -05:00
nhmall
3d3ee78a0b Merge branch 'master' into win32-x64-working
Conflicts:
	src/files.c
	src/potion.c
	sys/winnt/Makefile.msc

 Changes to be committed:
	modified:   .gitignore
	modified:   DEVEL/hooksdir/nhsub
	modified:   dat/.gitignore
	modified:   dat/opthelp
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   doc/fixes35.0
	modified:   include/context.h
	modified:   include/decl.h
	modified:   include/extern.h
	modified:   include/flag.h
	modified:   include/hack.h
	modified:   include/patchlevel.h
	modified:   src/apply.c
	modified:   src/attrib.c
	modified:   src/decl.c
	modified:   src/do.c
	modified:   src/do_name.c
	modified:   src/dothrow.c
	modified:   src/eat.c
	modified:   src/files.c
	modified:   src/hack.c
	modified:   src/invent.c
	modified:   src/lock.c
	modified:   src/mklev.c
	modified:   src/mondata.c
	modified:   src/monmove.c
	modified:   src/music.c
	modified:   src/options.c
	modified:   src/potion.c
	modified:   src/pray.c
	modified:   src/sit.c
	modified:   src/sp_lev.c
	modified:   src/uhitm.c
	modified:   sys/share/posixregex.c
	modified:   sys/winnt/Makefile.msc
	modified:   util/.gitignore
	modified:   win/win32/vs2010/NetHackW.vcxproj
2015-04-14 18:23:48 -04:00
Pasi Kallinen
ee5002210f Fix gitignored 2015-04-13 08:30:47 +03:00
Pasi Kallinen
323b8b4038 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
Conflicts:
	src/trap.c
	sys/winnt/Makefile.msc
2015-04-01 16:09:53 +03:00
Derek S. Ray
12ca92aa42 Fix 'fetch' syntax, include sparkly 'git log' trick
And bolt a couple more Win32-folders onto .gitignore.
2015-03-25 17:07:10 -04:00
Derek S. Ray
7f03ee4216 Changes for Win32; update precompiled files
Also fix Orctown probabilities; fixed support for snprintf;
update Win32 makefile to allow level compiler use

Conflicts:
	win/win32/levstuff.mak
2015-03-20 15:14:31 +02:00
Derek S. Ray
e1e55c31c7 more win32-specific pieces 2015-03-17 18:44:54 +02:00
Derek
4c496d089e Exclude all the Win32 build artifacts (Studio and otherwise)
Squashed commit of the following:

commit e37c7626f035a29321c9ac12cca83a0af2132abb
commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276
commit 6cd677c8fca4102f223fb1708d00a65c2ded6658
Author: Derek <derekray@gmail.com>
Date:   Fri Feb 13 13:24:29 2015 -0500
2015-03-17 18:44:53 +02:00
Sean Hunt
ea46c93b88 +x .sh files in unix dir; ignore Makefiles 2015-03-17 18:44:52 +02:00
Derek S. Ray
3e94fa63c7 get rid of code-analysis clutter 2015-03-15 13:44:26 -04:00
Derek S. Ray
6ebb7db138 fix build order for nhdefkey, add to nhsetup
also minor cosmetics; clean up two warnings in Release mode,
turn off multi-processor, and fix /Oi /Oi- discrepancy
2015-02-28 22:56:03 -05:00
Derek S. Ray
18ca81d963 token .gitignore change to differentiate branch 2015-02-26 21:57:47 -05:00
Derek S. Ray
d34bab1509 more win32-specific pieces 2015-02-15 14:45:36 -05:00
Derek
bae3c6088f Exclude all the Win32 build artifacts (Studio and otherwise)
Squashed commit of the following:

commit e37c7626f035a29321c9ac12cca83a0af2132abb
commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276
commit 6cd677c8fca4102f223fb1708d00a65c2ded6658
Author: Derek <derekray@gmail.com>
Date:   Fri Feb 13 13:24:29 2015 -0500
2015-02-13 13:26:05 -05:00
Sean Hunt
967364b6ed +x .sh files in unix dir; ignore Makefiles 2015-02-13 11:39:37 -05:00
keni
b3c8089e55 .git* cleanup tids 2015-02-12 16:39:51 -05:00
jwalz
fce15e3213 initial checkin 2002-01-05 20:49:41 +00:00