Commit graph

1419 commits

Author SHA1 Message Date
b921d3c262 (MAXNOC): Move to config.h. Remove empty options.h. 2005-12-28 13:08:26 +00:00
083f0ea350 (lwpInitSelect): The code to query the system's limit on file
descriptors was not portable.  Simply use FD_SETSIZE instead.  The
lower of the two applies, so this wastes storage if the system's limit
is significantly below FD_SETSIZE.  Not an issue, as FD_SETSIZE is
fairly small.
(lwpSleepFd): Return if fd is too large.  Returning isn't nice,
but better than the buffer overruns in the old code.
(lwpSelect): Member nfile unused, remove.
2005-12-27 19:22:07 +00:00
3aebb68ee7 Include config.h. 2005-12-27 18:04:19 +00:00
ea820f3b99 Fix missing include. 2005-12-27 17:56:57 +00:00
Ron Koenderink
233181c50d (player_new, player_accept, update_wait, market_update) [_WIN32]:
Move assignment of hostaddr and hostname from player_new() to
player_accept().  This solves the necessary of adding the socket include
file to prototypes.h for player_new().  The socket include file creates
a namespace conflict for WIN32.
2005-12-26 03:53:21 +00:00
Ron Koenderink
9dfbf74785 [_WIN32]: Add #ifndef __GNUC__ around the pragma as pragma is not
supported by gcc.
2005-12-26 02:53:23 +00:00
ae24898e50 (opt_ALL_BLEED, opt_BIG_CITY, opt_BLITZ, opt_BRIDGETOWERS)
(opt_DEFENSE_INFRA, opt_DEMANDUPDATE, opt_DRNUKE, opt_EASY_BRIDGES)
(opt_FALLOUT, opt_FUEL, opt_GODNEWS, opt_GO_RENEW, opt_GUINEA_PIGS)
(opt_HIDDEN, opt_INTERDICT_ATT, opt_LANDSPIES, opt_LOANS)
(opt_LOSE_CONTACT, opt_MARKET, opt_MOB_ACCESS, opt_NOFOOD)
(opt_NOMOBCOST, opt_NO_FORT_FIRE, opt_NO_PLAGUE, opt_PINPOINTMISSILE)
(opt_RES_POP, opt_SAIL, opt_SHOWPLANE, opt_SLOW_WAR, opt_SUPER_BARS)
(opt_TECH_POP, opt_TRADESHIPS, opt_TREATIES, opt_UPDATESCHED):
Remove conditional initialization.  Values unchanged.
(ALL_BLEED, BIG_CITY, BLITZ, BRIDGETOWERS, DEFENSE_INFRA)
(DEMANDUPDATE, DRNUKE, EASY_BRIDGES, FALLOUT, FUEL, GODNEWS, GO_RENEW)
(GUINEA_PIGS, HIDDEN, INTERDICT_ATT, LANDSPIES, LOANS, LOSE_CONTACT)
(MARKET, MOB_ACCESS, NOFOOD, NOMOBCOST, NO_FORT_FIRE, NO_PLAGUE)
(PINPOINTMISSILE, RES_POP, SAIL, SHOWPLANE, SLOW_WAR, SUPER_BARS)
(TECH_POP, TRADESHIPS, TREATIES, UPDATESCHED): Unused, remove.
2005-12-25 14:53:29 +00:00
ade510f787 Turn options into ordinary econfig keys:
(configkeys): Add options.
(KM_OPTION): New.
(vers): Find options in configkeys[] instead of Options[].
(xdump): Remove xdump opt syntax.
(xdopt): Remove.
(emp_config, print_config): Remove option special case.
(option_list, Options, setoption): Remove.
2005-12-25 10:32:50 +00:00
Ron Koenderink
373a08a0e0 (min, max) [_WIN32]: Change WIN32 to use windef.h.
It is present in both MSVC and MinGW environments.

(F_OK, W_OK, R_OK) [_WIN32]: Add #ifndef to allow
to operation in both MSVC and MinGW environments.
2005-12-25 00:59:57 +00:00
Ron Koenderink
8b934d615b (hStdIn) [_WIN32]: Add extern to declaration. 2005-12-25 00:51:55 +00:00
a626ecc888 Fix rev. 1.4. 2005-12-24 14:36:41 +00:00
cc0c3e4f3f (drop): A mining mission targeting land called pln_dropoff() instead
of pln_mine().  pln_dropoff() happens to do pretty much the right
thing, but...
(pln_mine): Refuse to mine land.
2005-12-23 19:37:52 +00:00
eb1134541a (CPPFLAGS): Add -I., to find config.h. Remove -Iinclude, it's unused. 2005-12-23 18:47:41 +00:00
90def7cb85 (install, install-html): Implement. Closes #913154.
(installdirs): New.
2005-12-23 17:58:19 +00:00
1bf21d048a (info): TOP was missing. 2005-12-23 17:53:28 +00:00
ee1a17a402 Belatedly remove NUKEFAILDETONATE, NONUKES, NEUTRON, ORBIT, NO_LCMS,
NO_HCMS, NO_OIL.

Don't claim BLITZ implies NOFOOD.
2005-12-23 13:24:45 +00:00
3bbc91876f (START_CASH, start_cash): Replace START_CASH by new econfig key
start_cash.
2005-12-23 11:16:23 +00:00
8e16ae9e43 Remove superflous #include "options.h". 2005-12-23 11:04:56 +00:00
874bb3348a Fix rev. 1.1 for how_to_dep = depcomp. 2005-12-23 09:06:29 +00:00
Ron Koenderink
9b3e820d3a (nat_cap, status): Use the new function influx() to determine
if a valid capital is present or not.
2005-12-23 01:10:07 +00:00
7b507bd1d5 Fix the previous revision. 2005-12-22 21:28:37 +00:00
ea93842927 (pln_equip): New mission argument 'm' for mining. 'd' is now for
cargo drops only.  Callers changed.
2005-12-22 19:48:33 +00:00
8e12bb8574 Previous rev. assumes would_abandon() returns 0 or 1. Correct, but
unmodular.  Don't.
2005-12-22 19:27:26 +00:00
91be114d9b Avoid compiler warnings in rev. 1.23 code. 2005-12-22 17:57:16 +00:00
Ron Koenderink
233fce87cd (nat_cap): Scale BTU production by capital's work.
Closes #101189.
2005-12-22 17:26:54 +00:00
2162e37f43 Chapters Introduction and Server are also subjects, and all pages in
those chapters should refer to their chapter-subject.  Check & fix.
2005-12-22 12:23:38 +00:00
4ea4a01fd5 (info, html): Implement.
(all): Depend on info.

Flatten info directory.  This undoes the move to one subdirectory per
chapter, which was done during Empire 2.  The structure doesn't buy us
much, as the info name space is flat, and it complicates makefiles.

Overhaul info.pl:
- It now wants to run in the root of the build tree.
- Information on source files and subjects is now stored in makefiles,
  thus info.pl no longer picks up random junk from the file system.
- Clean up Perl anachronisms, in particular use subroutine arguments and
  results rather than global variables where convenient.
- Change format of diagnostics to the common format used by GNU tools,
  so that Emacs and the like can parse it.
- Catch missing .SA.
- When creating a new subject file, cowardly refuse to overwrite an
  existing file.
- Subject files contain topics sorted by chapter, then by name.  The
  order of chapters used to depend on how Perl sorts hash keys.  Fix
  it.
2005-12-22 10:09:17 +00:00
641879abc7 Should have been removed in yesterday's build process commit. 2005-12-22 08:44:27 +00:00
c0d7c27443 Provide and document means to set up a fresh source tree from CVS. 2005-12-21 09:19:33 +00:00
Ron Koenderink
b0fa9a8ee2 (nat_cap): Remove redundant max_btus checks.
Remove deities and opt_BLITZ calculations
as dispatch() will not let you run out of BTU's.
2005-12-20 22:50:06 +00:00
a98626df2d Replace the build process. The new one requires GNU Make, Autoconf
and Autoconf macros that come with Automake.  It supports multiple
separate builds of the same source tree, and updates dependencies
automatically.  Targets info, html, install, install-html, uninstall
and dist are not yet implemented.

System configuration is now automatic.  Previously, you had to choose
one of several canned system configurations, defined in Make.sysdefs.
Currently, system configuration always uses UCONTEXT for LWP, and
chooses LWP only if its requirements are met.

Feature configuration changed: instead of editing build.conf (further
processed by doconfig), you pass arguments to configure.  Note that
build.conf settings that can be overridden in econfig have no
configure equivalent; just edit econfig instead.

Because generated headers complicate makefiles, fold gamesdef.h into
its users: path.c and ipglob.c become path.c.in and ipglob.c.in,
constants.c, vers.c, options.h simply hardcode defaults (most of them
are run-time configurable).

Call the client empire instead of emp_client.  This matches what the
old standalone build did.
2005-12-20 20:25:35 +00:00
Ron Koenderink
cdfb94dc1f (nati, player_coms): Add ability for deities to request a nation report for any country.
Closes #1083167.
2005-12-20 17:06:47 +00:00
Ron Koenderink
16d0f5d133 (natstate): Add STAT_SANCT case so the nation report properly
shows SANCTUARY instead of VISITOR for countries in sanctuary.
2005-12-20 01:49:55 +00:00
Ron Koenderink
f3303bce1e (capi): Do not check capital location if the country
is has NF_SACKED set.
2005-12-19 01:52:13 +00:00
Ron Koenderink
e3459cba5d (caploss): Remove the moving of a sacked capital.
This corrects the incorrect display of the old capital in the nation output.

(caploss): Remove unnecessary include files.
2005-12-18 19:54:44 +00:00
Ron Koenderink
7944db242c (nati): Fix the grammer for No capital output. 2005-12-18 15:43:56 +00:00
Ron Koenderink
9217e75761 (shp_nav_one_sector, mchr[], ship_chr_flags[], Ship-types, Sector-types):
Add M_CANAL flag to indicate which ships can navigate a canal
in a big city.  Remove the hard code values for canal from
shp_nav_one_sector() for which ships can navigate a canal.
Set M_CANAL flag in ship_chr_flags[] to match the hard
coding in shp_nav_one_sector().
Update Ship-types.t with new canal flag.
Update Sector-types.t to indicate that cities have canals.
2005-12-18 15:16:52 +00:00
Ron Koenderink
6157409f20 (influx): Remove carriage return. 2005-12-18 03:53:52 +00:00
Ron Koenderink
c2ee177256 (zdon): Do not allow a country that is in-flux to request an update.
Closes #1025597.
2005-12-17 20:27:08 +00:00
Ron Koenderink
5ffef496ea (coun_list, repo_list, nati): Replace in-flux determination code with influx().
(influx): New.
2005-12-17 20:18:54 +00:00
Ron Koenderink
d1e2d91961 (repo_list): Remove unreachable state (STAT_NORM | STAT_SANCT). 2005-12-17 19:55:52 +00:00
3dc35a77f7 (xundump): Eat whitespace after table, so that caller can check for
trailing junk more easily.  This fixes that check in ef_load().
2005-12-17 15:09:43 +00:00
Ron Koenderink
4799984997 (gen_power): Do not include land units with spy capability in the
land unit count. Closes #910398.
2005-12-17 12:41:39 +00:00
965bf6dbe4 (xundump): Fix table row counting, broken by rev. 1.23. 2005-12-17 08:25:57 +00:00
fdea1beb34 (lwpNewContext): Fix the previous revision. 2005-12-12 07:34:52 +00:00
d343fee727 Remove superflous include. 2005-12-11 10:09:09 +00:00
72f4cef34f (lwpNewContext) [MAKECONTEXT_SP_HIGH]: Work around makecontext()
lossage.
(IRIX5CFLAGS, SOLCFLAGS): Define MAKECONTEXT_SP_HIGH.  This is wrong
for Solaris 10.
2005-12-11 08:18:15 +00:00
588329ab35 (lwpCreate): Check for lwpNewContext() success. 2005-12-10 20:42:42 +00:00
e841fc0826 (lwpNewContext) [UCONTEXT]: Fix the previous revision. 2005-12-10 20:41:44 +00:00
9e3db08fda Redesign interface to machine-dependent code to cleanse lwp.c of
machine-dependencies:
(lwpNewContext): New, factored out of lwpCreate().
(lwpSwitchContext): New, factored out of lwpReschedule().
(LWP_EXTRASTACK, STKALIGN, lwpInitContext, lwpSave, lwpRestore): Move
to arch.c.  Remove for UCONTEXT, else static linkage unless macro or
AIX32.

(lwpReschedule): Skip lwpStatus() when not actually switching.

(LwpStackGrowsDown): New.
(lwpInitSystem): Initialize it.
(lwpStackCheck, lwpStackCheckUsed): Use it.
2005-12-10 19:28:24 +00:00