Commit graph

75 commits

Author SHA1 Message Date
0aaf0084aa (as_extend, as_costcomp, gen_power, powcmp): Fix non-portable function
cast.
(qsort_func_t): Unused, remove.
2005-02-24 18:47:26 +00:00
236c29a0c5 Break an inclusion cycle missed by yesterday's change. 2005-02-13 10:37:46 +00:00
Ron Koenderink
99ad950d9c switch comments from // format to /* */ format. 2004-12-21 02:20:26 +00:00
Marc Olzheim
a2284aac8d "(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for _WIN32 in include/misc.h."
2004-12-17 15:44:57 +00:00
Ron Koenderink
afc8667d10 (main) [_WIN32]: Switch to Unix style function for access and mkdir.
(info) [_WIN32]: Switch to standard function for strncasecmp.
2004-12-08 13:10:15 +00:00
fac342ed49 Update copyright notice. 2004-09-07 15:07:16 +00:00
f0b4381c98 (ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
new configuration key.  Closes #780425.
(delete_old_announcements): Do nothing when anno_keep_days is
negative.
2004-08-28 15:28:54 +00:00
dcfd251f95 caddr_t is obsolete. Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.
2004-08-23 18:29:44 +00:00
4d154753b8 (pchrstr, MAXPRCON): Simplify variable-style storage of constituents.
Store only up to MAXPRCON constituents, not MAXCHRNV; code doesn't
fully support more than three anyway.  Remove member p_nv, use item
type I_NONE for unused slots.  Rename members p_vtype, p_vamt to
p_ctype, p_camt to avoid confusion with variable-style storage.
(pchr): Initializers adapted.
(nullify_objects, materials_cost, materials_charge, prod,
show_sect_capab, grind): Adapt, simplify where possible, protect
against bad item types in pchr[].
(MAXCHRNV): Unused, remove.
2004-08-17 15:19:46 +00:00
48175e9beb (getstring, getstarg): Use plain char * instead of s_char *. 2004-04-08 17:56:12 +00:00
83478bd79e (OFFSET): Remove, use standard offsetof().
(SETOFF): Unused, remove.
2004-04-07 17:38:43 +00:00
47c8a32ae3 (debug): New.
(main): Set it on -d.
(oops, CANT_HAPPEN): New.
2004-04-02 15:40:43 +00:00
d6a2519342 Can't use gcc function attribute `format' when s_char is not plain
char; gcc chokes on it.
2004-03-22 08:51:10 +00:00
e7d75b2279 Use gcc function attribute `format' to catch bad format strings. Fix
them.  From Marc Olzheim.
Type modifier 'l' was missing in many places, probably rendering the
server useless on 64-bit hosts.
(ef_flush, ef_write, ef_extend, lwpCreate, lwpDestroy): Use conversion
specifier 'p' to print pointers.
(check_market): Fix display of loan amount.
(doland): Fix unescaped '%' (undefined behavior).
(ldump, ndump, pdump, sdump): Don't use flag '0' with conversion
specifier 's' (undefined behavior).
(dump, ldump, lost, ndump, pdump, sdump, empth_create, update_sched):
Cast time_t and pthread_t to long for printing.
(lwpStackCheck, lwpStackCheckUsed, finish_sects): Insert cast to fix
argument type on all platforms.
(prod): Remove extra argument.
(perform_mission, airdamage, retreat_land1, lwpReschedule): Format
string missed arguments.
2004-03-09 12:27:40 +00:00
d2e0c8224b Delete dead code, fix indentation, spelling, obvious warning
avoidance, doc fixes.  No functional changes.
2004-02-27 20:13:28 +00:00
237baffca9 Supply prototypes where possible. This uncovered type errors with
thread entrypoints:
(lwpSelect, shutdown_sequence): Parameters didn't match thread entry
point prototype.
(lwpEntryPoint): Arguments didn't match thread entry point prototype.

Change linkage of functions without prototype declaration to static
where possible.

Remove some superflous declarations, replace others by suitable
includes.
2004-02-17 17:59:30 +00:00
4fa84b5cb1 (emp_sig_t): Pre-ISO C compatibility cruft. Just use void. 2004-02-15 21:00:27 +00:00
cbf9d68372 Don't fool around with obsolete strings.h, just include standard
string.h.
2004-02-10 18:17:34 +00:00
32fac041b2 (RESOLVE_IPADDRESS): gethostbyaddr() uses a lot of stack space on some
versions of GNU libc, which can lead to nasty heap smashes (observed
with 2.2.93).  Don't define RESOLVE_IPADDRESS for now, until we
readjust thread stack sizes.
2004-02-06 23:42:36 +00:00
93c4fecfd6 (index, rindex): Obsolete BSDisms; remove. Use standard strchr() and
strrchr() instead.
2004-01-13 10:32:35 +00:00
4ae9c417b3 (bzero, bcopy): Obsolete BSDisms; remove. Remove some calls without
effect.  Replace calls by struct assignment where possible.  Replace
clear buffer, copy string to buffer by strncpy().  Use assignment to
clear when that's clearer.  Replace overlapping copy through bounce
buffer by memmove().  Replace rest by standard memset() and memcpy().
Also use sizeof() instead of literal array sizes for robustness, and
instead of symbolic array sizes for clarity.
2004-01-08 17:54:28 +00:00
d0feb8570a (copy, atopi, same): Remove, use strcpy(), atoi(), strcmp(). Callers
changed.  Remove empty source files.
2004-01-08 10:20:44 +00:00
5dde6b52a9 Remove pragmas that promote certain serious warnings to errors on
windows.  For obvious reasons, such warnings ought to be fixed.
Making compilation abort is the sledgehammer method to force that.
It's a stupid method for us, as we develop on various platforms, and
don't test every single commit under Windows.  It gratuitously breaks
programs that work fine.  Leave them as warnings, and fix them on
sight.
2003-12-14 10:15:03 +00:00
9b7adfbecc Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
d8b7fdfae1 Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00