Commit Graph

167 Commits

Author SHA1 Message Date
nhkeni
79867d78c8 Two new features primarily in Makefile.src:
NOSTATICCORE - an option for Linux to get a better backtrace
updatedepend - an easier alternative to "make depend"

- .gitignore: ignore new temporary .*.c files
- hints/linux.370: add NOSTATICCORE and instructions
- Makefile.src:
-- If NOSTATICCORE defined, run core .c files through awk to
   remove static attribute from functions.
-- add updatedepend target and related bits
2024-03-09 15:16:24 -05:00
nhmall
dbea5d8684 shorten options.c a little by moving some color stuff out of it
creates new coloratt.c file

Also, this attempts to fulfill a wish-list item by paxed, to
allow naming colors in symbols file by name as an alternative
to using r-g-b values.  The basic color names as well as html
color names are supported.
2024-03-03 14:11:17 -05:00
nhkeni
77916d5d73 make depend for previous commit 2024-02-23 18:04:26 -05:00
nhkeni
61f4d972bb Add local md4 implementation and drop libcrypto for linux. 2024-02-23 17:05:45 -05:00
nhmall
5c8b36e95a Revert "don't build in support for obsolete makedefs options"
This reverts commit 13f49bdd92.
2023-11-19 17:36:25 -05:00
nhmall
13f49bdd92 don't build in support for obsolete makedefs options
unless OLD_MAKEDEFS_OPTIONS is defined during the compile of makedefs.c
2023-11-19 10:05:01 -05:00
PatR
db48b92dd3 avoid redundant unix dependency for tile.o 2023-10-14 13:48:47 -07:00
PatR
4df37c1eb2 unix 'make depend' update
Mostly seems to be a different order of #include in hack.h and/or its
descendants but I didn't investigate.
2023-10-01 13:59:13 -07:00
nhkeni
8c095b009a Add CRASHREPORT, show contact form on panic/impossible
When calling panic() or impossible(), create the option
of opening a browser window with most of the fields
already populated.  Code for MacOS and linux is included;
other ports are affected by argument change to early_init
which are done but not tested.

To enable, define CRASHREPORT in config.h and set
CRASHREPORTURL in sysconf to (for the moment at least)
http[s]://www.nethack.org/common/contactcr.html

Adds --grep-defined option to makedefs for Makefiles.

Adds "bid" (binary identifier), an MD4 of the main nethack
binary.  This is ONLY for helping (in the future) contact.html
to set the "NetHack from" field automatically for our own
binaries.  This can be faked, but the user can lie so nothing
lost.  There's nothing magic about MD4; other ports can use
anything that prodcues a long apparently random string we can
match against.

- new option --bidshow for us to get the MD4 of a
  released binary so I can add it to the website.
  Only available in wizard mode and not in nethack.6.
- typo macos -> macosx in hints file

No support for packaging builds as I'm not sure what that
would look like.

Adds a javascript helper for MacOS.
Adds a lua helper for linux (and builds and installs
 nhlua).
2023-09-06 12:27:13 -04:00
nhmall
37b21dd9fd bypass curses_putmixed if -DCURSES_GENL_PUTMIXED is defined 2023-06-11 09:23:07 -04:00
nhmall
5e497ceeab sys/unix/Makefile.src 2023-05-28 23:08:39 -04:00
nhmall
d4fb34bbb4 system.h 2023-04-23 12:29:02 -04:00
nhmall
2185d325c4 header file changes hack.h, decl.h/.c, system.h, wintty.h
- Move secondary preprocessor defines down further in config.h
so that they can be overridden via [platform]conf.h which is
included from global.h, specifically:
    LIVELOGFILE when LIVELOG is defined
    DUMPLOG_FILE when DUMPLOG is defined

- Minimize platform-specific, or compiler-specific code in hack.h and decl.h.

- reorganize src/decl.c to align with include/decl.h.

- a new header file cstd.h added, containing calls to C99
standard header files.

- hack.h, decl.h, and decl.c have been cleaned up and had code
moved so that things line up as follows:

     hack.h     defines values that are available to all
                NetHack source files, contains enums for use in all
                NetHack source files, and contains a number of
                struct definitions for use in all NetHack source files.
                It does not contain variable declarations or variable
                definitions.

     decl.h     contains the extern declarations for variables that
                are defined in decl.c. These variables are global and
                available to all NetHack source files. The location of
                the variables within decl.h was random, so give it some
                order for now.

     decl.c     contains the definition of the variables declared in
                decl.h, and initializes them where appropriate. The
                variable definitions are laid out in much the
                same order as their declarations in decl.h.

- wintty.h: There were some varying terminal-related prototypes in
system.h, and that was the only thing left that demanded that
system.h be included. Those have been replaced by an #include
<term.h> in include/wintty.h to get the more current (and hopefully
more correct) prototypes, rather than hardcoding them in NetHack
sources.

For edge-case platform compatiblity, there is no #include <term.h>
if the build defines NO_TERMCAP_HEADERS. In that case one set of
hardcoded prototypes is still used in include/wintty.h.

The added #include "term.h" is also bypassed for NO_TERMS builds (builds
that don't link to terminfo/termcap at all, but still present a tty
interface using platform or window-port specific functions to fulfill
the same role as that of terminfo/termcap).

- some scattered, unnecessary #include "integer.h" were removed from
various files, since that's always included in current NetHack-3.7
sources, either directly from config.h or indirectly from #include
"hack.h".

- system.h references removed.

- new cstd.h added; the #include "system.h" references in Makefiles
and project files (Xcode, visual studio), were replaced
with #include "cstd.h" references. A "make depends" is probably
warranted.

Also:

 - Use of <term.h>, which defines clear_screen() as a macro, conflicts
with an actual function with that name in win/tty/termcap.c. The most
straight-forward course of action was to rename the NetHack function,
and change the references to it, from clear_screen() to
term_clear_screen(), so that was done.
2023-04-05 11:49:09 -04:00
nhmall
9168e1f30b remove a maintenance/synchronization requirement
adds a file include/seffects.h
2023-02-25 16:05:27 -05:00
nhmall
24dab18167 allow setting the standard
CSTD can be manually set near the top of src/Makefile, util/Makefile
or by including c99=1 or C99=1 on the build make command line if
using the linux.370 or macOS.370 hints files.
2023-02-17 10:23:40 -05:00
nhmall
4ce722b8b2 more follow-up 2023-02-08 18:12:15 -05:00
nhmall
aad0586239 add new macOS target 'bundle'
This creates a new target 'bundle' for make on macOS, when using
sys/hints/macOS.370.

The 'bundle' recipe:
    - creates a subdirectory of src called 'bundle', and creates
      a bundle (nethack.app/ etc) below that.
    - the executable that is placed inside the bundle
      (bundle/nethack.app/Contents/MacOS/nethack) will find resources
      within the bundle, including the sounds, so a manual placement
      of the sounds into your '~/Library/Sounds' is no longer
      required when using the executable that's inside the bundle.
    - the sounds are included in the bundle if a soundlib option is
      chose at build time (for example 'make WANT_MACSOUND=1'), such
      that the bundled executable supports sounds.
    - the executable inside the bundle seems to find the resources
      it needs, even if invoked through a symlink elsewhere that points
      to the executable that's inside the bundle (only limited testing of that
      has been done).
    - at some point, its probably appropriate to add a
      'mv bundle/nethack.app <proper location>', possibly under
      a subsequent 'make install' step.
    - right now, the bundle step has a dependency on 'update'. I don't
      know if that's the right ordering or not, yet.

make WANT_MACSOUND=1 update
make WANT_MACSOUND=1 bundle

or, you can probably get away with:

make WANT_MACSOUND=1 bundle

if the nethack bundle is the goal anyway.

make clean
will clear the bundle subdirectory and everything below it.
2023-02-08 17:17:43 -05:00
PatR
87c3d07645 3.7.x 'make depend'
Makefile.src didn't know about 'sndprocs.h' yet.

Something weird is going on with 'make depend'.  It has started
adding a trailing space to
|$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H)
(actual trailing space omitted here).  It's repeatable.  I don't
understand it and have not tried to fix it, just removed the space
from the generated Makefile before putting into place as modified
Makefile.src and making this commit.
2023-02-03 15:48:46 -08:00
nhmall
3d908c49ef take initial stab at macsound interface
Use macOS AppKit framework routines for a first cut at a
macsound soundlib interface.

Requires WANT_MACSOUND=1 on build.

Nothing has been done to move the stock sounds into the resources
of a bundle, so after building, if you want to try the stock sounds
out:
	cp sound/wav/*.wav ~/Library/Sounds

Because the NSSound macOS routines always do the search, supposedly
the following locations are searched in this order:
   1. the application’s main bundle
   2. ~/Library/Sounds
   3. /Library/Sounds
   4. /Network/Library/Sounds
   5. /System/Library/Sounds

Although not specifically implemented as of yet, it may be pretty
close to being able to put soundeffects wav files (by se_ name)
into ~/Library/Sounds working for the SND_SOUNDEFFECTS_AUTOMAP feature.

Feedback is welcome. Contributions for improving it are even more
welcome.

The new soundlib supporting file is named
sound/macsound/macsound.m since it's got objective C in it.

Known bugs and glitches:

The Hero_playnotes on a set of 5 notes goes too fast, so there
needs to be a slight delay added between the note of a multi-note
play.
2023-01-23 23:50:43 -05:00
nhmall
864d3c7638 fix a syntax error in Makefile.src 2022-11-26 17:03:53 -05:00
PatR
9a7f8418ee 'nethack --usage' and '?' menu
Write up a description of how the command line works on UNIX and put
that in new file dat/usagehlp.  Add support for
|nethack --usage | --help | -? | ?
to display it and exit.

Also add a menu entry for nethack's help command to show it during
play.  That can be suppressed by uncommenting new '#define HIDE_USAGE'
in config.h since it won't be useful on servers that don't give
players access to command lines.

New genl_display_file() just writes to stdout.  opt_usage(), which
calls it, might need some suid/sgid handling to make sure the output
is done as the player rather than as nethack.

doc/nethack.6 is already out of date again.
2022-11-18 16:07:15 -08:00
nhmall
3f93d54b66 some Makefile and hints tinkering
1. remove all window interface bits from compiler.370, and have
   the preceding include files set some variables to control
   the behavior of compiler.370 when it comes to c++.
2. some more common Makefile lines into sys/unix/hints/include/multiw-3.370.
3. make it so you can pass cppregex=1 on the Make command line to build with
   sys/share/cppregex.cpp instead of posixregex.c
4. fix sys/share/cppregex.cpp so that it will build with clang compiler
   (required an additional header include). I don't know if it would have
   worked with g++ without that change. The include can be placed into an #ifdef
   block if there's an issue with the change on other compilers.
5. Anything that needs to compile using c++ (Qt, sys/share/cppregex.cpp) can
   just ensure that CPLUSPLUS_NEEDED Makefile variable is set above the lines
   in compiler.370 to ensure that things get set up for c++. It no longer
   checks specifically for Qt. That is what sys/unix/hints/include/multiw-2.370
   does now.
2022-11-13 22:25:07 -05:00
SHIRAKATA Kentaro
99d974333c remove GCC_WARN
Now, the only usage of GCC_WARN is for the guard of PRINTF_F in wincurs.h.
This guard can be removed safely, as PRINTF_F is already used unconditionally in extern.h.
2022-11-08 12:09:26 -08:00
PatR
4de71302a3 unix Makefile.src and hints
Change the handling for windowing system specific files so that
when building for more than one set, each gets compiled as a set
instead of some being interspersed among rival window systems.
Put differently, handle tile.o specially so that there's no need
for the hints to sort the WINOBJ list in order to avoid tile.o
duplication.

So the order of compilation is
  common source files
  unix-specific files
  tty files
  curses files
  X11 files
  Qt files
  tile.c (if applicable), version.c, date.c

Previously, some of the X11 files were scattered around among the
others because of the spelling of their file names.

Only matters if you're watching the progress of a build.
2022-09-18 14:25:33 -07:00
PatR
dda4cd0530 regex handling
Change the regex_error_desc() interface.  Have the caller pass in
a pointer to a buffer of at least BUFSZ characters and have
regex_error_desc() populate that.  No need for static buffers or
extra dynamic alloction.

Also, change it to never return Null.  None of its callers were
checking for that and could have passed Null to config_error_add()
or raw_print().  printf("%s", NULL) produces "null" on OSX but other
systems would probably crash if a Null result ever actually occurred.

The error explanation returned by cppregex included a trailing period.
config_error_add() adds one, so the message ended up with two.  Have
regex_error_desc() check for final period and strip it off if found.
(My test case used a menucolor pattern of "[" which triggers an error
about mismatched brackets.)

Reformat cppregex.cpp; treat 'extern "C" {' as if it isn't introducing
a nested block.  Fix the '#include <hack.h>' that 'make depend' was
ignoring.
2022-07-01 13:08:43 -07:00
PatR
b4a415848d curses locale.h fix 2022-06-03 13:12:27 -07:00
PatR
4c47b7f622 'make depend' update 2022-06-03 13:02:40 -07:00
nhmall
629b5d67a9 fix 'make all' from src directory 2022-05-19 19:00:47 -04:00
nhmall
f57555ae6b differentiate lua object library names by Lua ver 2022-05-19 07:44:29 -04:00
nhmall
cb0c21e91d ENHANCED_SYMBOLS
A new feature, enabled by default to maximize testing, but one which can
be disabled by commenting it out in config.h

With this, some additional information is added to the glyphmap entries
in a new optional substructure called u with these fields:
    ucolor          RGB color for use with truecolor terminals/platforms.
                    A ucolor value of zero means "not set." The actual
                    rgb value of 0 has the 0x1000000 bit set.
    u256coloridx    256 color index value for use with 256 color
                    terminals, the closest color match to ucolor.
    utf8str         Custom representation via utf-8 string (can be null).

There is a new symset included in the symbols file, called enhanced1.

Some initial code has been added to parse individual
OPTIONS=glyph:glyphid/R-G-B entries in the config file.

The glyphid can, in theory, either be an individual glyph (G_* glyphid)
for a single glyph, or it can be an existing symbol S_ value
(monster, object, or cmap symbol) to store the custom representation for
all the glyphs that match that symbol.

Examples:
   OPTIONS=glyph:G_fountain/U+03A8/0-150-255

(Your platform/terminal font needs to be able to include/display the
character, of course.)

The NetHack core code does parsing and storing the customized
entries, and adding them to the glyphmap data structure.

Any window port can utilize the additional information in the glyphinfo
that is passed to them, once code is added to do so.

Also, consolidate some symbol-related code into symbols.c, and remove it from
files.c and options.c
2022-05-07 10:25:13 -04:00
nhmall
2234cc256d some parallel Make glitches noticed
observed: parallel build attempts of makedefs that trampled over
one another.

attempted workaround: Add a dependency as per Pat R's suggestion.

observed: Concurrent header file movement collisions were sometimes
causing file busy errors and build failures.

workaround: Eliminate tile.h header file movement from the
Makefile build so that the collisions won't occur with that
particular file. Leave the header file tile.h in win/share as it
is in the distribution and just adjust the include path in the
rule for the specific files that use it.

observed: tiletxt.c created on-the-fly from Makefile echo statements
sometimes resulted in garbled and duplicate content in it when
parallel makes were involved, and that caused a build failure.

workaround: Instead of creating a tiletxt.c on-the-fly via echo
statements in the Makefile, simplify things and use that
same #include "tilemap.c" approach but make it an actual file
in the distribution. That makes it available for other platforms
too.
2022-03-13 11:06:45 -04:00
PatR
54df272f50 remove references to old Qt 'moc' timestamp files
src/moc.qt[56] existed briefly but got replaced by src/Qt[56].h-t
(controlled by hints/include/compiler.370).  The old names were
deliberately left in src/.gitignore and sys/unix/Makefile.src's
'clean' target to give some time for anyone who had generated them
to run 'make clean' to get rid of them.  That time is now up.  It's
only been about three weeks but if I wait any longer I'll probably
forget.
2022-02-25 10:39:45 -08:00
PatR
f9f209bb49 Qt 5 vs Qt 6 revisited plus 'make depend' update
Rename the recently added timestamp file used to throw away old qt
'moc' files from moc.qt5 or moc.qt6 to Qt5.h-t or Qt6.h-t and use
that to also throw away old qt_*.o when switching from Qt 5 to Qt 6
or vice versa.  Temporarily the old names remain in Makefile.src's
'clean' target and in src/.gitignore but those will be removed soon.

Update 'make depend' to add the timestamp file to qt_*.o dependencies.
Have it generate rules to build qt_*.moc from ../win/Qt/qt_*.h instead
of using a template rule in hints/include/compiler.370.  So building
the Qt interface doesn't require use of that hints file anymore and
someone reading Makefile.src won't have to know about it, but using
those hints will make their life easier.

Simplify the Qt timestamp handling portion of compiler.370.  Only one
extra rule gets added when creating src/Makefile.

src/Makefile generated from sys/unix/Makefile.src that's been rebuilt
with 'make depend' got broken by uncommenting '#include "amiconf.h"'
in global.h.  That file isn't in include/ but every object file now
depended on it and make didn't know what to do about that.  Have
depend.awk treat it as a special case so that no object files depend
on it.  That means that actually modifying it won't trigger a rebuild;
anyone fiddling with that will have to always do 'make clean' or
'touch config.h-t' after changing it.  The alternative is to move it
from outdated/include/ back to include/.

In depend.awk, recent gawk complained that "\." wasn't a defined
escape sequence in regular expressions so it would be treated as ".".
That's exactly what is intended but change it to "[.]" to avoid the
warning.  Similarly for one instance each of "\#" and '\"'.  I also
tried changing "\/" to "[/]" even though that is a defined sequence
and doesn't trigger any warning.  gawk accepted it but the awk that
comes with OSX choked on it so I changed it back to "\/".
2022-02-05 04:15:51 -08:00
nhmall
ee1eff538c Lua link on Jammy Jellyfish 2022-02-04 18:03:08 -05:00
PatR
bc6ca2b821 Qt 5 vs 6 'moc'
This is an attempt to address the issue of switching from Qt 5 to
Qt 6 or vice versa on Unix without running 'make spotless'.  Various
*.h files (but not all of them) in win/Qt/ are run through a program
called 'moc' to create new files *.moc that are included by *.cpp.
The problem is that the constructed files use the same names for Qt
5 or 6 but their contents apparently aren't compatible.  This adds
rules (specific to GNU make) that use a pair of timestamp files to
track which version of moc made src/*.moc and to destroy them when
switching Qt versions in order to force their re-creation.

As it stands, a hints file which includes hints/include/compiler.370
is now required in order to build the Qt interface with the Unix
Makefiles.  There's no change for platforms that don't use those and
I've no idea whether something comparable could be done for macOS
Xcode IDE.

The first time make is run with WANT_WIN_QT=1 after this is in place,
all the .moc files will be rebuilt and the subset of .cpp files which
include them will be recompiled.  After that, the .moc files will be
rebuilt as needed--and only as needed--just like any other constructed
files.
2022-02-01 13:50:12 -08:00
Ray Chason
1f7541e496 Changes for Qt 6 on MacOS 2021-12-30 10:56:06 -08:00
PatR
e52f38b3a3 Guidebook make sequencing
Be able to run 'make Guidebook{|.txt|.ps}' in the doc subdirectory
without requring a full install first.

makedefs is no longer one of the first things built when building
nethack, and even if it was, nobody should have to rebuild all of
nethack after 'make spotless' when they just want to create one
or more of the formatted Guidebooks.  The 'roff versions (.ps and
also .txt) use makedefs as a filter by default, so wouldn't build
if it wasn't there.

Have Makefile.doc build makedefs when needed.

Clean up some dependencies in Makefile.utl.

Add a couple of comments to Makefile.src.
2021-09-27 01:30:53 -07:00
PatR
84b4eb9888 Unix 'make depend'
I recently changed a comment in objclass.h and that should have
triggered a full or nearly full rebuild but only resulted in a
couple of files being recompiled.  Instead of trying to figure out
why, I just ran Makefile.src through 'make depend' to force it to
be up to date.

A side-effect is that version.c won't be unnecessarily recompiled
every time nethack gets relinked.  The reason for that (date.h
being regenerated with new data) is handled by date.c now.
2021-09-14 02:06:14 -07:00
nhmall
6ffa912359 missed dependency 2021-08-23 22:18:55 -04:00
nhmall
9bb96322a8 compile NetHack-3.7 without makedefs-generated .h files
This evolves and hopefully eases the game-build requirements by
removing game-compile dependencies on any header files generated
by the makedefs utility, including:

date.h dependency and its inclusion is removed and comparable functionality
is produced at runtime via new file src/date.c.

pm.h dependency and its inclusion is removed and comparable functionality is
produced by moving the monster definitions from monst.c into new header
file called monsters.h and altering them slightly. The former pm.h header
file #define PM_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

onames.h dependency and	its inclusion is removed and comparable functionality
is produced by moving the object definitions from objects.c into new header
file called objects.h and altering them slightly. The former onames.h header
file #define values are now replaced with appropriate emitted enum entries
during the compiler preprocessing.

artilist.h has been slightly altered, and the former onames.h artifact-related
header file #define ART_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

makedefs can still produce date.h (makedefs -v), pm.h (makedefs -p), and
onames.h (makedefs -o) for reference purposes. They won't be used during
the compiler.

The other uses for makedefs remain. They are used to prepare external
file content that the game utilizes, not prerequisite code for the
compile:
    makedefs -d    (database)
    makedefs -r    (rumors)
    makedefs -h    (oracles)
    makedefs -s    (epitaphs, engravings, bogusmons)

date.c

Pull the code for date/time stamping from mdlib.c into date.c.
Set date.o to be dependent on source files, header files, and .o files
so that date.o is rebuilt from date.c when any of those changes, thus
ensuring an accurate date/time stamp. It also includes git sha
functionality formerly done by makedefs writing #define directives
into include/date.h. For unix it passes the git info on
the compile line for date.c (via sys/unix/hints/linux.2020, macOS.2020)

nethack --dumpenums (optional, but on by default)

Allow developer to obtain some internal enum values from NetHack
without having to resort to an external utility such as
makedefs.

Uncomment #define NODUMPENUMS in config.h to disable this.

The updates to sys/windows/Makefile.gcc have not been tested yet.
2021-08-21 07:59:18 -04:00
nhmall
2baadd6a29 header files sym.h and defsym.h
There were multiple symbol-related lists that had to be kept
in sync in various places.

Consolidate some of that into a single new file
    defsym.h
with a set of morphing macros that can be custom-called from
the various places that use the sym info without maintaining
multiple occurrences. Most maintenance can be done there.

Rename monsym.h to sym.h since it looks after some
symbols not related to monsters now too.

The defsym.h header file is included in multiple places to
produce different code depending on its use and the controlling
macro definitions in place prior to including it.

Its purpose is to have a definitive source for
pchar, objclass and mon symbol maintenance.

The controlling macros used to morph the resulting code are
used in these places:
  - in include/sym.h for enums of some S_ symbol values
    (define PCHAR_ENUM, MONSYMS_ENUM prior to #include defsym.h)
  - in include/objclass.h for enums of some S_ symbol values
    (define OBJCLASS_ENUM prior to #include defsym.h)
  - in src/symbols.c for parsing S_ entries in config files
    (define PCHAR_PARSE, MONSYMS_PARSE, OBJCLASS_PARSE prior
    to #include defsym.h)
  - in src/drawing.c for initializing some data structures/arrays
    (define PCHAR_DRAWING, MONSYMS_DRAWING, OBJCLASS_DRAWING prior
    to #include defsym.h)
  - in win/share/tilemap.c for processing a tile file
    (define PCHAR_TILES prior to #include defsym.h).
2021-08-10 13:35:25 -04:00
PatR
9c71b7dc4a Unix 'make clean' bit
When deleting obsolete generated files (monstr.c, vis_tab.[ch])
for src 'make clean' or clean called from src 'make spotless' or
from top Makefile, don't complain if they aren't present.

Deletion failure wasn't stopping 'make' but did result in looking
like something might be wrong.
Before:
 rm monstr.c vis_tab.c ../include/vis_tab.h  #obsolete generated files
 rm: monstr.c: No such file or directory
 rm: vis_tab.c: No such file or directory
 rm: ../include/vis_tab.h: No such file or directory
 make[1]: [clean] Error 1 (ignored)
After:
 rm -f monstr.c vis_tab.c ../include/vis_tab.h #obsolete generated files
(no extra feedback from rm or make).
2021-07-22 08:32:25 -07:00
nhmall
0a10bd632d change references from winnt to windows
rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.

This will hopefully resolve GitHub issue #484 as well.
2021-06-03 23:26:00 -04:00
nhmall
769b8877fc separate the C compiler flags and C++ compiler flags where needed 2021-02-05 09:45:03 -05:00
nhmall
d714eca924 roll back a Makefile.src change due to macOS issue afterwards
Requires further investigation
2021-02-05 07:43:51 -05:00
nhmall
8b21a170fb clear a number of Qt build warnings on linux related to compiler flags
option ‘-Wimplicit’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
option ‘-Wmissing-parameter-type’ is valid for C/ObjC but not for C++
option ‘-Wold-style-definition’ is valid for C/ObjC but not for C++
option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
2021-02-03 13:18:43 -05:00
nhmall
a6631e3bb0 suppress a particular warning for an individual function; useful for non-gcc
Microsoft and other non-GNU compilers don't recognize gcc tricks
like  /*NOTREACHED*/ to suppress individual warnings. clang recognizes most
of them because it tries to be gcc-compatible. Because of that, a lot of
potentially useful warnings have had to be completely suppressed in the
past in all source files when using the non-gcc compatible compilers.

Now that the code is C99, take advantage of a way to suppress warnings for
individual functions, a big step up from suppressing the warnings
altogether.

Unfortunately, it does require a bit of ugliness caused by the
insertion of some macros in a few spots, but I'm not aware of
a cleaner alternative that still allows warnings to be enabled
in general, while suppressing a warning for known white-listed
instances.

Prior to the warning-tiggering function, place whichever one of
the following is needed to suppress the warning being encountered:

DISABLE_WARNING_UNREACHABLE_CODE
DISABLE_WARNING_CONDEXPR_IS_CONSTANT

After the warning-triggering function, place this:

RESTORE_WARNINGS

Under the hood, the compiler-appropriate warning-disabling
mechanics involve the use of C99 _Pragma, which can be used
in macros.

For unrecognized or inappropriate compilers, or if
DISABLE_WARNING_PRAGMAS is defined, the macros expand
to nothing.
2021-02-01 12:54:19 -05:00
PatR
0b1f5ea45e outdated vs Unix 'make depend'
After the most recent round of moving old stuff to 'outdated',
src/windows.c contained two references to non-existent files.
That broke 'make depend'.  Updating it to turn those two into
comments seems risky because someone might add an include for
some new interface later in the file.  So comment them out in
the source instead.  Also, redo previous 'make depend' update
from about three weeks ago to do the same thing.
2021-01-31 13:05:32 -08:00
nhmall
4a6eb00c84 relocate some gem and Gnome files to outdated folder tree 2021-01-31 08:51:35 -05:00
PatR
9dee1fb521 \#include "fnamesiz.h"
The inclusion shouldn't really come before *conf.h because the
things it sets up could depend on those.  This is better, but
having Amiga 90% dead and 10% comatose seems to be more trouble
that it's worth.
2021-01-08 14:59:36 -08:00