empserver/include
Markus Armbruster 4366c5ac6e Selector rewrite: values other than long, interpret identifiers
according to context, to make `lstat * ?type#spy&spy>1' work.  Closes
bug#825363, #905809, #905814 and #922968.
(nsc_type, packed_nsc_type, nsc_cat, packed_nsc_cat, nsc_flags): New.
(valstr): New.  Old code encoded values in type long, which was
somewhat hard to read and could only support signed integer values.
(nscstr): Redesign.  Use valstr.  Typed operator.
(castr): Split ca_code into ca_type, ca_flags, ca_off.  Tables
changed.
(nstr_comp, nstr_exec): Redesign and rewrite.  Callers changed.  They
used the old design incorrectly, which let players smash the stack
by supplying more than NCOND conditions.
(encode, nstr_comp_val, decode, nstr_exec_val): Rename, redesign, and
rewrite.  Callers changed.
(nstr_coerce_val): New.
(var_ca, sect_ca, ship_ca, land_ca): Checking both var_ca[] and the
object's ca complicates proper recognition of unique abbreviations.
Copy contents of var_ca[] into the ca of objects, remove var_ca[].

(surv): Reject values with category other than NSC_OFF and types that
can't be coerced to NSC_LONG.  Old code happily passed values with
category NSC_VAL to code_char().  The previous version interpreted
them correctly, but earlier versions interpreted them as NSC_OFF, then
logged `bad type in decode: 0' and evaluated them into zero.

(code_char): Used to test category NSC_VAR to decide whether to
display tens or hundreds.  NSC_VAR no longer exists.  Test type
instead.  Makes more sense anyway.
2004-04-02 19:02:12 +00:00
..
.cvsignore List generated files and directories that CVS doesn't ignore by 2003-10-04 14:54:09 +00:00
budg.h Declare update related variables in budg.h. Remove some redundant 2004-02-19 17:28:03 +00:00
com.h (player_coms): Declaration in com.h was misspelled. Remove redundant 2004-02-19 20:38:02 +00:00
combat.h Don't declare things in more than one place. Move some declarations 2004-02-20 20:45:18 +00:00
commands.h (diss, player_coms): Command `dissolve' has been disabled at least 2004-03-03 08:20:45 +00:00
commodity.h (genitem, ship, plane, land): Remove unused member sell & equivalents. 2004-03-01 17:21:40 +00:00
common.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
damage.h Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
distribute.h Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
empio.h Garbage collection to side-step sparse file descriptor problem. 2004-02-06 12:35:51 +00:00
empthread.h [_EMPTH_WIN32]: Previous rev. didn't even compile, fix. 2004-02-18 07:12:51 +00:00
event.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
file.h Sectors need space for items, deliveries and distribution thresholds. 2004-03-03 16:54:22 +00:00
gen.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
genitem.h (genobject, genchrstr): Unused, remove. 2004-03-03 10:23:07 +00:00
global.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
ioqueue.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
item.h Remove unused variables and such. No functional changes. 2004-03-11 22:10:19 +00:00
keyword.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
land.h (sctstr, shpstr, lndstr): Use short' instead of unsigned short' for 2004-03-05 07:56:50 +00:00
loan.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
lost.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
lwp.h Use gcc function attribute `format' to catch bad format strings. Fix 2004-03-09 12:27:40 +00:00
map.h Remove some unused stuff, mostly Empire 3 leftovers. 2004-02-28 09:45:10 +00:00
match.h (stmtch, mineq): Document. Move declaration from prototypes.h to 2004-02-27 19:38:38 +00:00
misc.h (debug): New. 2004-04-02 15:40:43 +00:00
mission.h Remove some unused stuff, mostly Empire 3 leftovers. 2004-02-28 09:45:10 +00:00
nat.h (mult, player_coms): Command `mult' is disabled since 4.0.0 ('96), and 2004-03-01 09:04:02 +00:00
news.h Remove some unused stuff, mostly Empire 3 leftovers. 2004-02-28 09:45:10 +00:00
nsc.h Selector rewrite: values other than long, interpret identifiers 2004-04-02 19:02:12 +00:00
nuke.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
options.h (opt_NEWPOWER, Options, gen_power): Remove nooption NEWPOWER. 2004-03-11 10:36:55 +00:00
optlist.h (opt_NEWPOWER, Options, gen_power): Remove nooption NEWPOWER. 2004-03-11 10:36:55 +00:00
path.h Supply prototypes where possible. This uncovered type errors with 2004-02-17 17:59:30 +00:00
plane.h (genitem, ship, plane, land): Remove unused member sell & equivalents. 2004-03-01 17:21:40 +00:00
player.h Supply prototypes where possible. This uncovered type errors with 2004-02-17 17:59:30 +00:00
power.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
product.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
proto.h (KILL): Off by one in fnlist[]. This is why client option -k didn't 2004-01-31 09:42:34 +00:00
prototypes.h (debug): New. 2004-04-02 15:40:43 +00:00
queue.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
retreat.h Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
sect.h Remove unused variables and such. No functional changes. 2004-03-11 22:10:19 +00:00
server.h Remove junk at end of #endif. 2004-02-24 18:26:34 +00:00
ship.h (sctstr, shpstr, lndstr): Use short' instead of unsigned short' for 2004-03-05 07:56:50 +00:00
struct.h Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
subs.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
tel.h Don't declare things in more than one place. Move some declarations 2004-02-20 20:45:18 +00:00
trade.h (genitem, ship, plane, land): Remove unused member sell & equivalents. 2004-03-01 17:21:40 +00:00
treaty.h Remove some unused stuff, mostly Empire 3 leftovers. 2004-02-28 09:45:10 +00:00
update.h Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
var.h (sctstr): Member sct_che encoded number of che and their target. 2004-03-04 13:49:25 +00:00
version.h Update for 4.2.14. 2004-03-17 07:29:39 +00:00
wantupd.h Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
xy.h Supply prototypes where possible. This uncovered type errors with 2004-02-17 17:59:30 +00:00