]> git.pond.sub.org Git - empserver/log
empserver
18 years ago(dchr_ca, packing, empfile): Add packing symbol table.
Ron Koenderink [Sun, 13 Nov 2005 12:27:02 +0000 (12:27 +0000)]
(dchr_ca, packing, empfile): Add packing symbol table.

(sect_ca, ship_ca, land_ca, plague_stages, empfile):
Add plague stages symbol table.

(treaty_ca, loan_ca, agreement_statuses, empfile):
Add agreement status symbol table.
Combine treatystatuses (TS_FREE, TS_SIGNED and TS_PENDING)
and loan statuses (LS_FREE, LS_SIGNED and LS_PENDING)
into a single agreement status.

(pchr_ca, level, empfile): Add packing symbol table.

18 years ago(output): Remove C_FLUSH from output() as C_FLUSH is dealt with
Ron Koenderink [Sun, 13 Nov 2005 12:23:17 +0000 (12:23 +0000)]
(output): Remove C_FLUSH from output() as C_FLUSH is dealt with
by servercmd() and output() is not called from servercmd() with a
code of C_FLUSH.

18 years ago(xunsymbol): Fix xunsymbol() to parse multiple symbols for a
Ron Koenderink [Sun, 13 Nov 2005 01:45:39 +0000 (01:45 +0000)]
(xunsymbol): Fix xunsymbol() to parse multiple symbols for a
symbol_set (NSC_BITS).

18 years ago(xundump): Add prototypes.h to get a prototype for
Ron Koenderink [Sun, 13 Nov 2005 00:34:24 +0000 (00:34 +0000)]
(xundump): Add prototypes.h to get a prototype for
xundump().

18 years ago(servercmd): Remove newline for C_INFORM, C_FLUSH,
Ron Koenderink [Sat, 12 Nov 2005 20:16:07 +0000 (20:16 +0000)]
(servercmd): Remove newline for C_INFORM, C_FLUSH,
C_REDIR, C_PIPE and C_EXECUTE.
Fixes the problem created when the newline was left in io_gets().

18 years ago(buil, vers, opt_NONUKES, show_nuke_build, show_nuke_capab):
Ron Koenderink [Sat, 12 Nov 2005 20:09:11 +0000 (20:09 +0000)]
(buil, vers, opt_NONUKES, show_nuke_build, show_nuke_capab):
Remove opt_NONUKES options.  A nuke characteristics file can
be created with no entries to create the emulate the removed option.

18 years ago(dchr_ca): prd indexes product table.
Markus Armbruster [Sat, 12 Nov 2005 17:32:32 +0000 (17:32 +0000)]
(dchr_ca): prd indexes product table.

18 years ago(EF_MISSION_FLAGS, EF_MISSIONS, mission_flags, missions): Rename, as
Markus Armbruster [Sat, 12 Nov 2005 17:29:11 +0000 (17:29 +0000)]
(EF_MISSION_FLAGS, EF_MISSIONS, mission_flags, missions): Rename, as
these are not flags.

18 years ago(init_server, ef_load, xundump): Add ability to customize game
Ron Koenderink [Sat, 12 Nov 2005 16:53:52 +0000 (16:53 +0000)]
(init_server, ef_load, xundump): Add ability to customize game
configurations.  The custom game configurations are loaded via
text files in the data directory.  Closes #752881.

18 years ago(io_gets, output): Remove the removal of \n in io_gets() and the
Ron Koenderink [Sat, 12 Nov 2005 16:40:38 +0000 (16:40 +0000)]
(io_gets, output): Remove the removal of \n in io_gets() and the
readdition of it in output().

18 years ago(servercmd, io_gets, output): Fix client to read lines longer than
Ron Koenderink [Sat, 12 Nov 2005 14:20:46 +0000 (14:20 +0000)]
(servercmd, io_gets, output): Fix client to read lines longer than
1024 bytes from the server.  Closes #1223255.

18 years ago(xdump): Add EF_MAX check for table selection by number.
Ron Koenderink [Sat, 12 Nov 2005 13:38:01 +0000 (13:38 +0000)]
(xdump): Add EF_MAX check for table selection by number.
Fixes a crash when selecting a table over EF_MAX.

18 years ago(plane_flags, plane_ca): Add plane flags table.
Ron Koenderink [Wed, 9 Nov 2005 22:56:43 +0000 (22:56 +0000)]
(plane_flags, plane_ca): Add plane flags table.

(retreat_flags, ship_ca, land_ca, plane_ca): Add retreat flags table.

(nation_flags, nation_relations, nat_ca): Add nation flags and
nation relations tables.

(empfile_ca): Remove flags and file name fields.
They are internal and not needed by the client.

18 years ago(start_server, empth_start): Passed uninitialized sa_mask to
Markus Armbruster [Tue, 8 Nov 2005 21:42:38 +0000 (21:42 +0000)]
(start_server, empth_start): Passed uninitialized sa_mask to
sigaction().  This used to broken only when SA_SIGINFO wasn't defined,
until main.c rev. 1.46 and pthread.c rev. 1.10 broke it
unconditionally.

18 years agoFix bad line break.
Markus Armbruster [Mon, 7 Nov 2005 07:55:12 +0000 (07:55 +0000)]
Fix bad line break.

18 years ago(ef_init_chr): Sentinel names are now null, simplify sentinel check.
Markus Armbruster [Mon, 7 Nov 2005 07:54:16 +0000 (07:54 +0000)]
(ef_init_chr): Sentinel names are now null, simplify sentinel check.

18 years ago(init_server): Remove ef_load() call.
Ron Koenderink [Mon, 7 Nov 2005 00:07:25 +0000 (00:07 +0000)]
(init_server): Remove ef_load() call.
New function not ready yet, incorrectly
checked-in.

18 years ago(itm_maxno): Remove itm_maxno, it is not used.
Ron Koenderink [Sun, 6 Nov 2005 23:44:35 +0000 (23:44 +0000)]
(itm_maxno): Remove itm_maxno, it is not used.

18 years ago(nullify_objects): Fix sentinel row checks for plchr, lchr and mchr loops.
Ron Koenderink [Sun, 6 Nov 2005 23:42:42 +0000 (23:42 +0000)]
(nullify_objects): Fix sentinel row checks for plchr, lchr and mchr loops.

18 years ago(shp_maxno): Variable's value is well-known constant N_MAXSHIPS + 1.
Markus Armbruster [Sun, 6 Nov 2005 21:20:49 +0000 (21:20 +0000)]
(shp_maxno): Variable's value is well-known constant N_MAXSHIPS + 1.
Useless, remove.  Users changed to check mchr's sentinel, because
that's clearer than comparing the index to N_MAXSHIPS or sizeof(mchr)
/ sizeof(*mchr).

(mchr): Change sentinel's m_name to NULL.

18 years ago(pln_maxno): Variable's value is well-known constant N_MAXPLANE + 1.
Markus Armbruster [Sun, 6 Nov 2005 21:12:24 +0000 (21:12 +0000)]
(pln_maxno): Variable's value is well-known constant N_MAXPLANE + 1.
Useless, remove.  Users changed to check plchr's sentinel, because
that's clearer than comparing the index to N_MAXPLANE or sizeof(plchr)
/ sizeof(*plchr).

(plchr): Change sentinel's pl_name to NULL.

18 years ago(pstat): Remove inappropriate plane sanity check; should be done
Markus Armbruster [Sun, 6 Nov 2005 21:06:35 +0000 (21:06 +0000)]
(pstat): Remove inappropriate plane sanity check; should be done
elsewhere.

18 years ago(lnd_maxno): Variable's value is well-known constant N_MAXLAND + 1.
Markus Armbruster [Sun, 6 Nov 2005 20:59:38 +0000 (20:59 +0000)]
(lnd_maxno): Variable's value is well-known constant N_MAXLAND + 1.
Useless, remove.  Users changed to check lchr's sentinel, because
that's clearer than comparing the index to N_MAXLAND or sizeof(lchr) /
sizeof(*lchr).

(lchr): Change sentinel's l_name to NULL.

18 years ago(carg, lcarg, fort, land, ldump, lsta, orde, payo, retr, lretr)
Markus Armbruster [Sun, 6 Nov 2005 20:54:59 +0000 (20:54 +0000)]
(carg, lcarg, fort, land, ldump, lsta, orde, payo, retr, lretr)
(cmd_sail_ship, cmd_unsail_ship, show_sail, sdump, shi, sstat, work):
Remove inappropriate ship/land sanity checks; should be done
elsewhere.

18 years ago(show_nuke_build, show_nuke_capab): Simplify.
Markus Armbruster [Sun, 6 Nov 2005 20:37:57 +0000 (20:37 +0000)]
(show_nuke_build, show_nuke_capab): Simplify.

18 years ago(nuk_maxno): Variable's value is well-known constant N_MAXNUKE + 1.
Markus Armbruster [Sun, 6 Nov 2005 20:37:07 +0000 (20:37 +0000)]
(nuk_maxno): Variable's value is well-known constant N_MAXNUKE + 1.
Useless, remove.  Users changed to check nchr's sentinel, because
that's clearer than comparing the index to N_MAXNUKE or sizeof(nchr) /
sizeof(*nchr).

(nchr): Change sentinel's n_name to NULL.

18 years ago(buil): Use typematch() to search for ship, plane, land unit and nuke
Markus Armbruster [Sun, 6 Nov 2005 20:14:28 +0000 (20:14 +0000)]
(buil): Use typematch() to search for ship, plane, land unit and nuke
type.  The old code didn't work correctly when "sbb  super battleship"
came before "sb   submarine" in mchr[].

18 years ago(arm, tran_nuke): Lookup of the nuke name was broken by nuke.h
Markus Armbruster [Sun, 6 Nov 2005 20:01:51 +0000 (20:01 +0000)]
(arm, tran_nuke): Lookup of the nuke name was broken by nuke.h
rev. 1.10.  Replace by typematch().

(arm): Simplify search for nuke at sector.

18 years ago(prd_maxno): Variable's value is well-known constant P_MDUST + 2.
Markus Armbruster [Sun, 6 Nov 2005 18:06:38 +0000 (18:06 +0000)]
(prd_maxno): Variable's value is well-known constant P_MDUST + 2.
Useless, remove.  Users changed to check pchr's sentinel, because
that's clearer than comparing the index to P_MDUST or sizeof(pchr) /
sizeof(*pchr).

(pchr): Change sentinel's p_name and p_sname to NULL.  Sentinel
checks changed.

18 years ago(empfile,mission_flags,ship_ca,land_ca,plane_ca): Add mission flags table.
Ron Koenderink [Sun, 6 Nov 2005 13:43:09 +0000 (13:43 +0000)]
(empfile,mission_flags,ship_ca,land_ca,plane_ca):  Add mission flags table.

18 years ago(nullify_objects): Fix option NO_OIL. The attempt to remove ships
Markus Armbruster [Sun, 6 Nov 2005 12:06:10 +0000 (12:06 +0000)]
(nullify_objects): Fix option NO_OIL.  The attempt to remove ships
with capability M_OIL from mchr[] actually replaced them with
sentinels.  Just clear the capability instead.

18 years ago(xdopt, xdver): Simplify the previous rev.
Markus Armbruster [Sun, 6 Nov 2005 11:05:48 +0000 (11:05 +0000)]
(xdopt, xdver): Simplify the previous rev.

(xdump): Support selecting a dump by table number in addition to name.

18 years ago(ef_ptr, ef_read): Oops on bad ID. Some callers rely on these
Markus Armbruster [Sun, 6 Nov 2005 11:01:37 +0000 (11:01 +0000)]
(ef_ptr, ef_read): Oops on bad ID.  Some callers rely on these
functions to fail at the end of the table.  To support that, the first
ID beyond the end is not considered bad.

(ef_ensure_space): Oops on bad ID.

18 years ago(NSC_BITS): Remove the trailing comma as it is last row.
Ron Koenderink [Sat, 5 Nov 2005 20:25:16 +0000 (20:25 +0000)]
(NSC_BITS): Remove the trailing comma as it is last row.

18 years ago(install_service): Use the compiled in default for location of econfig
Ron Koenderink [Sat, 5 Nov 2005 20:05:38 +0000 (20:05 +0000)]
(install_service):  Use the compiled in default for location of econfig
when the -e is not specified while creating a service.

18 years ago(xdhdr,xdhdr1,xditem,xdmeta,xdopt,xdver,xdfldnam):
Ron Koenderink [Sat, 5 Nov 2005 17:46:17 +0000 (17:46 +0000)]
(xdhdr,xdhdr1,xditem,xdmeta,xdopt,xdver,xdfldnam):
Remove the column header.
Not need as the xdump meta is functional.

18 years ago(xdopt,xdver,xdump): Add meta data for opt and ver.
Ron Koenderink [Sat, 5 Nov 2005 01:49:47 +0000 (01:49 +0000)]
(xdopt,xdver,xdump): Add meta data for opt and ver.

18 years ago(xdmeta): Fix the printing of the number of rows dumped.
Ron Koenderink [Fri, 4 Nov 2005 23:32:05 +0000 (23:32 +0000)]
(xdmeta): Fix the printing of the number of rows dumped.
Incorrectly included the skipped rows.

18 years ago(xdmeta): Don't dump meta data for stuff that is not dumped by
Markus Armbruster [Fri, 4 Nov 2005 19:56:47 +0000 (19:56 +0000)]
(xdmeta): Don't dump meta data for stuff that is not dumped by
xdflds().

18 years ago(NSC_BITS): New.
Markus Armbruster [Fri, 4 Nov 2005 19:11:30 +0000 (19:11 +0000)]
(NSC_BITS): New.
(meta_flags): Update for it.
(ship_ca, mchr_ca, plane_ca, plchr_ca, land_ca, lchr_ca, nchr_ca)
treaty_ca, nat_ca, empfile_ca, mdchr_ca): Use it.

(symbol_ca): Move value selector to beginning of array.

(meta_flags): Downcase names.

18 years ago(mission_short_name): Remove mission_short_name, not used.
Ron Koenderink [Fri, 4 Nov 2005 18:27:28 +0000 (18:27 +0000)]
(mission_short_name):   Remove mission_short_name, not used.

18 years ago(nullify_objects): Patch intrchr[] according to opt_NO_LCMS,
Markus Armbruster [Fri, 4 Nov 2005 18:09:08 +0000 (18:09 +0000)]
(nullify_objects): Patch intrchr[] according to opt_NO_LCMS,
opt_NO_HCMS.  This fixes output of `show se b', which used not to
reflect these options.
(improve): Simplify.

18 years ago(xdmeta): Fix rev. 1.36.
Markus Armbruster [Fri, 4 Nov 2005 12:44:33 +0000 (12:44 +0000)]
(xdmeta): Fix rev. 1.36.

18 years ago(UNMAPPED_INIT, UNMAPPED_CACHE, ARRAY_INIT, ARRAY_TABLE, PTR_INIT)
Markus Armbruster [Thu, 3 Nov 2005 18:25:26 +0000 (18:25 +0000)]
(UNMAPPED_INIT, UNMAPPED_CACHE, ARRAY_INIT, ARRAY_TABLE, PTR_INIT)
(PTR_CACHE): Rename.

(ARRAY_CACHE): New.
(empfile): Use it to set csize of elements EF_SHIP_CHR, EF_PLANE_CHR,
EF_LAND_CHR, EF_NUKE_CHR.
(ef_init_chr): Now that empfile[]'s initializer sets csize, remove the
temporary csize initialization here.  The value wasn't correct, but
better than nothing.

18 years ago(perform_mission): Do not pass the sub-owner to nreport(). News
Markus Armbruster [Thu, 3 Nov 2005 17:40:16 +0000 (17:40 +0000)]
(perform_mission): Do not pass the sub-owner to nreport().  News
doesn't show it, but selectors do.  Reported by Doug Wescott.

(nreport, ncache): Catch errors like the above.  Catch bad event
argument while we're at it.

18 years ago(xdopt, xdver): Fix missing footer.
Markus Armbruster [Thu, 3 Nov 2005 09:24:52 +0000 (09:24 +0000)]
(xdopt, xdver): Fix missing footer.

18 years ago(xdmeta): Add NULL ca check.
Ron Koenderink [Thu, 3 Nov 2005 00:03:55 +0000 (00:03 +0000)]
(xdmeta): Add NULL ca check.
Fixes a crash for xdump meta pow.

18 years ago(ichr_ca, pchr_ca, sect_ca, dchr_ca, NSC_GENITEM, ship_ca, mchr_ca)
Markus Armbruster [Tue, 1 Nov 2005 15:19:42 +0000 (15:19 +0000)]
(ichr_ca, pchr_ca, sect_ca, dchr_ca, NSC_GENITEM, ship_ca, mchr_ca)
plane_ca, plchr_ca, land_ca, lchr_ca, nuke_ca, nchr_ca, treaty_ca)
loan_ca, news_ca, lost_ca, commodity_ca, trade_ca, nat_ca)
(empfile_ca): Move row index selector to beginning of array and set
its table.  Set table for NSC_SITYPE(i_type), NSC_NATID, NSC_TYPEID
selectors.
(news_ca): Set selector action's table.
(commodity_ca, trade_ca): Set selector maxbidder's table.

18 years ago(trtstr): New members ef_type and trt_uid.
Markus Armbruster [Tue, 1 Nov 2005 12:53:43 +0000 (12:53 +0000)]
(trtstr): New members ef_type and trt_uid.
(do_treaty): Initialize them.
(treaty_ca): New selector uid.

18 years ago(ef_ptr): Null cache can't happen.
Markus Armbruster [Mon, 31 Oct 2005 21:26:16 +0000 (21:26 +0000)]
(ef_ptr): Null cache can't happen.

18 years ago(ef_open): EFF_STATIC and cache not null can't happen.
Markus Armbruster [Sun, 30 Oct 2005 18:48:55 +0000 (18:48 +0000)]
(ef_open): EFF_STATIC and cache not null can't happen.

(ef_open): Leave check of fd to do_write().

18 years ago(empfile_ca): Rename selector file_name to file, to match the member
Markus Armbruster [Sun, 30 Oct 2005 16:52:10 +0000 (16:52 +0000)]
(empfile_ca): Rename selector file_name to file, to match the member
name.

18 years ago(ichr): Define without array size, like the other characteristics
Markus Armbruster [Sun, 30 Oct 2005 16:51:21 +0000 (16:51 +0000)]
(ichr): Define without array size, like the other characteristics
tables.

18 years agoDoc fix.
Markus Armbruster [Sun, 30 Oct 2005 16:50:32 +0000 (16:50 +0000)]
Doc fix.

18 years ago(diroff, dirch, routech): Declare with array size. Define without.
Markus Armbruster [Sun, 30 Oct 2005 16:46:46 +0000 (16:46 +0000)]
(diroff, dirch, routech): Declare with array size.  Define without.
This requires moving routech[] declaration from map.h to path.h.  Get
rid of s_char.

18 years ago(ep): Global variable pointing to sector cache. Gross. Remove.
Markus Armbruster [Sun, 30 Oct 2005 16:22:29 +0000 (16:22 +0000)]
(ep): Global variable pointing to sector cache.  Gross.  Remove.

(bp_neighbors, bp_lbcost, pathcost): Replace pointer arithmetic by
array subscript.

18 years agoC_EXECUTE security.
Markus Armbruster [Sun, 30 Oct 2005 15:03:02 +0000 (15:03 +0000)]
C_EXECUTE security.

18 years ago(coun): Last access used to report last login time.
Markus Armbruster [Sun, 30 Oct 2005 14:59:39 +0000 (14:59 +0000)]
(coun): Last access used to report last login time.
Counter-intuitive.  Report last connection time range instead.
Unfortunately, this requires a change in output format.

(coun): Report on all countries even to mortals.  This used to be
done, and was most probably changed because it gave away too much
information.  Carefully limit the information given to mortals, as
follows.  Limit last access information to whether deities or allies
are logged on right now, no longer report connection time for deities
that are not logged on.  Remove column time for mortals, rename it to
BTU for deities.  Report status, but with less detail if HIDDEN is
enabled.

18 years ago(buy, check_market, trad, check_trade): Remove the following virtually
Markus Armbruster [Sun, 30 Oct 2005 14:33:44 +0000 (14:33 +0000)]
(buy, check_market, trad, check_trade): Remove the following virtually
undocumented feature: When a buyer didn't have enough money at the
time of the trade, the seller *automatically* granted a high-interest,
medium term loan for up to 90% of the price.  This is just a silly
trap for unwary sellers and buyers alike.
(N_FIN_TROUBLE, N_CREDIT_JUNK): Unused, remove.
(rpt): Update accordingly.

18 years ago(empfile): Rename member ef_uid to uid for consistency with other
Markus Armbruster [Sun, 30 Oct 2005 12:50:13 +0000 (12:50 +0000)]
(empfile): Rename member ef_uid to uid for consistency with other
members.

(empfile): Reorder members for clearer documentation.

(EFF_IMMUTABLE): New.
(EFF_OPEN): Remove, use ~EFF_IMMUTABLE.

(empfile): Don't initialize member size to a useless value for EF_MAP
and EF_BMAP.  ef_init() writes the real value.

18 years ago(ef_init_chr): Add a NULL check to sentinel check.
Ron Koenderink [Sat, 29 Oct 2005 20:38:59 +0000 (20:38 +0000)]
(ef_init_chr): Add a NULL check to sentinel check.

18 years ago(ef_init): Fix check for sentinel.
Markus Armbruster [Sat, 29 Oct 2005 16:50:07 +0000 (16:50 +0000)]
(ef_init): Fix check for sentinel.

18 years ago(xdump): Use xditem() for all empfile tables.
Markus Armbruster [Sat, 29 Oct 2005 16:44:53 +0000 (16:44 +0000)]
(xdump): Use xditem() for all empfile tables.
(xdchr, xdmeta): Specialize for meta-tables, rename.

18 years ago(meta_flags, meta_type): Change sentinel name to NULL to match the
Markus Armbruster [Sat, 29 Oct 2005 16:40:17 +0000 (16:40 +0000)]
(meta_flags, meta_type): Change sentinel name to NULL to match the
other symbol tables.

18 years ago(ef_init, ef_init_srv): Rename old ef_init() ef_init_srv(), call new
Markus Armbruster [Sat, 29 Oct 2005 15:16:50 +0000 (15:16 +0000)]
(ef_init, ef_init_srv): Rename old ef_init() ef_init_srv(), call new
ef_init().  Move initialization of map sizes to ef_init().
(main): Don't initialize map sizes by hand, call ef_init().

(fileinit): Internal linkage.

18 years ago(rpt, page_headings): Declare with array size. Define without.
Markus Armbruster [Sat, 29 Oct 2005 14:48:32 +0000 (14:48 +0000)]
(rpt, page_headings): Declare with array size.  Define without.

(empfile): Correctly initialize members cids, csize, fids for all
EFF_STATIC tables except EF_SHIP_CHR, EF_PLANE_CHR, EF_LAND_CHR,
EF_NUKE_CHR, EF_META and the symbol tables.

18 years ago(EF_TREATY_CHR, EF_TREATY_FLAGS): Rename for consistency with other flags.
Markus Armbruster [Sat, 29 Oct 2005 14:36:10 +0000 (14:36 +0000)]
(EF_TREATY_CHR, EF_TREATY_FLAGS): Rename for consistency with other flags.

(treaty_ca): Add missing EF_TREATY_FLAGS to selectors acond, bcond.

18 years ago(tchrstr, tchr_ca): Remove, use struct symbol and symbol_ca. Users
Markus Armbruster [Sat, 29 Oct 2005 14:10:23 +0000 (14:10 +0000)]
(tchrstr, tchr_ca): Remove, use struct symbol and symbol_ca.  Users
changed.
(tchr, treaty_flags): Rename for consistency with other flags.

18 years ago(lookup, symbol): Rename. Rename members to match selectors and
Markus Armbruster [Sat, 29 Oct 2005 07:46:42 +0000 (07:46 +0000)]
(lookup, symbol): Rename.  Rename members to match selectors and
better reflect their purpose.  Users changed.
(lookup_ca, symbol_ca): Rename.

18 years ago(intmatch): Assumes that struct size is a multiple of sizeof(int), out
Markus Armbruster [Sat, 29 Oct 2005 07:15:14 +0000 (07:15 +0000)]
(intmatch): Assumes that struct size is a multiple of sizeof(int), out
of laziness.  The assumption is true on any sane machine, due to
alignment constraints.  But the function doesn't provide enough value
to make me fix or document this.  Remove it.
(lookup): Replace it.

18 years ago(dchr): Remove second sentinel.
Markus Armbruster [Sat, 29 Oct 2005 06:34:21 +0000 (06:34 +0000)]
(dchr): Remove second sentinel.

18 years ago(rpt): Add sentinel.
Markus Armbruster [Sat, 29 Oct 2005 06:27:00 +0000 (06:27 +0000)]
(rpt): Add sentinel.
(EF_NEWS_CHR): New.
(empfile): Add its entry.

18 years ago(ef_byname): Old version didn't work when a table name was followed by
Markus Armbruster [Sat, 29 Oct 2005 06:18:41 +0000 (06:18 +0000)]
(ef_byname): Old version didn't work when a table name was followed by
one of its prefixes.  src/lib/global/file.c rev. 1.18 added such table
entries, and file.h rev. 1.34 made them visible to ef_byname().
Simply use stmtch().  This also rejects ambiguous abbreviations: "s"
used to return EF_SECTOR, it now returns M_NOTUNIQUE.

18 years ago(nchr): Move the array size to nuke.h. Add rows for configurable units.
Ron Koenderink [Fri, 28 Oct 2005 13:23:08 +0000 (13:23 +0000)]
(nchr): Move the array size to nuke.h.  Add rows for configurable units.
(lchr,plchr,mchr): Add array size to land.h/plane.h/ship.h.  Add rows for
configurable units.
(ichr,pchr,dchr,intrchr): Add array size to item.h/product.h/sect.h.

18 years ago(empfile): Add one to the array size for the sentinel row.
Ron Koenderink [Fri, 28 Oct 2005 12:56:54 +0000 (12:56 +0000)]
(empfile): Add one to the array size for the sentinel row.

18 years ago(NSC_CONST,castr,meta_flags): Add new flag NSC_CONST to castr.
Ron Koenderink [Fri, 28 Oct 2005 12:35:36 +0000 (12:35 +0000)]
(NSC_CONST,castr,meta_flags): Add new flag NSC_CONST to castr.
(ichr_ca,pchr_ca,intrchr_ca): Use it.

18 years ago(EF_IS_GAME_STATE): New.
Markus Armbruster [Fri, 28 Oct 2005 07:03:31 +0000 (07:03 +0000)]
(EF_IS_GAME_STATE): New.
(xdump, main): Use it.

(EF_MAX): Change to largest table ID + 1.  This is now possible
because the changes above get rid of the assumption that
empfile[0..EF_MAX-1] is only game state.  Code can now work on any
table using the advertized empfile interface, not just on game state.
(my_ef_byname): Remove, use ef_byname().

18 years ago(set): Fix the previous revision.
Markus Armbruster [Thu, 27 Oct 2005 23:23:42 +0000 (23:23 +0000)]
(set): Fix the previous revision.

18 years ago(ef_byname_from): New.
Markus Armbruster [Thu, 27 Oct 2005 21:33:17 +0000 (21:33 +0000)]
(ef_byname_from): New.
(set, mission, multifire, fuel, cons_choose, cede): Use it instead of
ef_byname().  Remove the hacks to map unwanted results to wanted
results.  The hacks in set() were broken: bad input made the code cast
arbitrary items to union trdgenstr, with potentially disastrous
consequences.  Closes #906483 and #906486.

(set): Less cryptic prompt and diagnostics.

18 years ago(xdftr): Change footer to / instead of dumped.
Ron Koenderink [Thu, 27 Oct 2005 21:22:33 +0000 (21:22 +0000)]
(xdftr): Change footer to / instead of dumped.

18 years ago(xdump,xdchr,xdhdr,xdhdr1): Add meta data dump to xdump.
Ron Koenderink [Thu, 27 Oct 2005 19:37:19 +0000 (19:37 +0000)]
(xdump,xdchr,xdhdr,xdhdr1): Add meta data dump to xdump.

18 years ago(ef_open): Implement EFF_STATIC.
Markus Armbruster [Wed, 26 Oct 2005 16:49:52 +0000 (16:49 +0000)]
(ef_open): Implement EFF_STATIC.

(ef_open): Simplify dynamic buffer allocation.

18 years ago(empth_start, empth_init) [_EMPTH_POSIX]: Do not handle SIGALRM. We
Markus Armbruster [Wed, 26 Oct 2005 16:30:00 +0000 (16:30 +0000)]
(empth_start, empth_init) [_EMPTH_POSIX]: Do not handle SIGALRM.  We
don't raise it, and the signal handler is fishy.
(empth_alarm): Unused, remove.

18 years ago(info): Remove dead code.
Markus Armbruster [Wed, 26 Oct 2005 16:22:32 +0000 (16:22 +0000)]
(info): Remove dead code.

18 years agoOne more SNEAK_ATTACK leftover.
Markus Armbruster [Wed, 26 Oct 2005 16:19:17 +0000 (16:19 +0000)]
One more SNEAK_ATTACK leftover.

18 years ago(disassoc): Rewrite for POSIX, return status. Caller changed.
Markus Armbruster [Tue, 25 Oct 2005 18:42:03 +0000 (18:42 +0000)]
(disassoc): Rewrite for POSIX, return status.  Caller changed.
Problems with the old code:
* Insufficient error checking.
* It used TIOCNOTTY (obsolete BSDism) to get rid of the controlling
  tty, except for hpux || Rel4, where it attempted to use the POSIX
  way, but screwed up.
* It left file descriptors 0, 1, 2 in a somewhat weird state.

18 years ago(empfile,mdchr_ca,meta_type,meta_flags):
Ron Koenderink [Tue, 25 Oct 2005 00:37:59 +0000 (00:37 +0000)]
(empfile,mdchr_ca,meta_type,meta_flags):
Add meta table and associated symbol tables.

18 years ago(main): Don't close EF_NATION twice.
Markus Armbruster [Mon, 24 Oct 2005 23:39:45 +0000 (23:39 +0000)]
(main): Don't close EF_NATION twice.

18 years ago(EFF_STATIC): New.
Markus Armbruster [Mon, 24 Oct 2005 23:35:18 +0000 (23:35 +0000)]
(EFF_STATIC): New.
(empfile): Use it.
(ef_open): Oops on it (not implemented).
(ef_close): Implement it (trivial).

18 years agoComments.
Markus Armbruster [Mon, 24 Oct 2005 23:30:22 +0000 (23:30 +0000)]
Comments.

18 years ago(ef_nameof, ef_ensure_space): Oops on bad argument.
Markus Armbruster [Mon, 24 Oct 2005 23:27:18 +0000 (23:27 +0000)]
(ef_nameof, ef_ensure_space): Oops on bad argument.

(ef_check): Use CANT_HAPPEN().

18 years ago(ef_zapcache): Clearing the cache doesn't make sense. No harm done if
Markus Armbruster [Mon, 24 Oct 2005 23:23:53 +0000 (23:23 +0000)]
(ef_zapcache): Clearing the cache doesn't make sense.  No harm done if
the next user can't use the cache, it gets automatically zapped then.
Remove.

18 years ago(ef_read): Catch null cache.
Markus Armbruster [Mon, 24 Oct 2005 23:16:13 +0000 (23:16 +0000)]
(ef_read): Catch null cache.

(ef_read): Used to get the file size again some circumstances; doesn't
make sense, as no other process may be writing this file.

(ef_write): Don't refuse to write beyond record 65536.  This module
can cope with that.  Some users have trouble long before that (short
record numbers), but that should be handled there.

(ef_write): Catch table not file-backed.

18 years ago(ef_extend): Use do_write() & simplify. Catch table not file-backed.
Markus Armbruster [Mon, 24 Oct 2005 22:47:16 +0000 (22:47 +0000)]
(ef_extend): Use do_write() & simplify.  Catch table not file-backed.
Catch negative count; used to have no effect with EFF_MEM, and
confusion otherwise.  Try to recover from partially successful
extension.  Need help from ef_write() to do a better job; to be done.

18 years ago(ef_extend): Fix rev. 1.25.
Markus Armbruster [Mon, 24 Oct 2005 22:44:29 +0000 (22:44 +0000)]
(ef_extend): Fix rev. 1.25.

18 years agoClean up rev. 1.30.
Markus Armbruster [Mon, 24 Oct 2005 21:57:20 +0000 (21:57 +0000)]
Clean up rev. 1.30.

18 years ago(ef_ptr): Change return type to void *.
Markus Armbruster [Mon, 24 Oct 2005 21:43:47 +0000 (21:43 +0000)]
(ef_ptr): Change return type to void *.

(ef_ptr): Use CANT_HAPPEN() to ensure EFF_MEM; check it before less
serious index out of range failure.

18 years ago(ef_open): Fix fatal typo.
Markus Armbruster [Mon, 24 Oct 2005 20:42:27 +0000 (20:42 +0000)]
(ef_open): Fix fatal typo.

18 years ago(ef_open): Portability fix: malloc(0) may return null, which is not a
Markus Armbruster [Mon, 24 Oct 2005 20:36:17 +0000 (20:36 +0000)]
(ef_open): Portability fix: malloc(0) may return null, which is not a
failure.  fillcache() chokes on null cache, so don't call it for empty
files.

18 years ago(ef_open): Failed to reset empfile member fd on failure, and leaked
Markus Armbruster [Mon, 24 Oct 2005 20:18:04 +0000 (20:18 +0000)]
(ef_open): Failed to reset empfile member fd on failure, and leaked
file descriptors.

(ef_flush, ef_close): Rely on negative fd instead of null cache to
detect unopened file.  This is more logical and consistent with the
use of cache by the new tables that are not file-backed (rev. 1.22).
Use CANT_HAPPEN().

(ef_close): Failed to report cash flush failure.

(ef_close): Clear all EFF_OPEN flags.  Should have been done in
rev. 1.27.