Commit graph

25 commits

Author SHA1 Message Date
a9653c475b Fix whitespace: space before tab 2008-09-17 19:29:42 -04:00
3cc8de8aef Fix extra prompt after abort due to misuse of snxtitem()
The old code used getstarg() to get an argument with a different
prompt than snxtitem() uses, then passed the value to snxtitem()
unchecked.  If the player aborts, getstarg() returns a null pointer,
and snxtitem() prompts again.  Affected:

* load/lload plane/land third argument; load_plane_ship(),
  load_land_ship(), load_plane_land(), load_land_land()

* bomb, drop, fly, paradrop, recon and sweep second argument;
  get_planes()

* tend and ltend second and fourth argument; ltend(), tend(),
  tend_land()

* mission second argument; mission()

Fix by making snxtitem() taking a prompt argument, null pointer
requests the old prompt.

Use that to simplify multifire() and torp().  Change the other callers
to pass NULL.
2008-07-26 21:36:37 -04:00
022b73d8a1 Simplify preport()
Return value of ctime() always starts with a capital letter, so
upcasing it is pointless.
2008-07-25 08:16:38 -04:00
990b39edec Check subscript of rpt[]
Make nws_vrb unsigned to simplify that.
2008-03-14 20:25:08 +01:00
db02dda32f Update copyright notice 2008-01-19 10:15:37 +01:00
63bdc89835 Update copyright notice. 2007-01-09 19:09:31 +00:00
e42053d928 Break inclusion cycle: prototypes.h and commands.h included each
other.  Ensure headers in include/ can be included in any order
(except for econfig-spec.h, which is special).  New header types.h to
help avoid inclusion cycles.  Sort include directives.  Remove some
superflous includes.
2006-07-10 06:37:23 +00:00
0d842c47f7 Purge the register keyword. 2006-05-21 13:18:57 +00:00
a988b907fc s_char purge directed by compiler warnings. 2006-04-29 06:41:45 +00:00
Ron Koenderink
7b9fdf8b95 (show_news, news, empfile[], page_headings[], page_headings_symbols[]):
Change page_headings[] to struct symbol and removed
page_headings_symbols[].
2006-01-30 22:26:48 +00:00
297ee5eab0 (news): Fix rev. 1.13: fail command before printing headlines. 2006-01-29 17:13:25 +00:00
4515b84c59 COPYING duplicates information from README. Remove. Move GPL from
LICENSE to COPYING, because that's where it usually is.  Update all
the references to these files.
2006-01-21 19:48:41 +00:00
f6987ca3ef (news): Used to silently ignore argument when HIDDEN is enabled.
Complain and fail instead.

(news): Treat non-numeric argument like zero, not like no argument,
for consistency with other commands.
2006-01-05 16:22:43 +00:00
3e400c018c Update copyright notice. 2006-01-05 13:36:57 +00:00
3aebb68ee7 Include config.h. 2005-12-27 18:04:19 +00:00
4f59fc9967 Remove a bunch of redundant casts. 2005-06-12 06:31:48 +00:00
345ad3dfe0 Update copyright notice. 2005-03-16 22:03:16 +00:00
Ron Koenderink
c0618aec6e (news, fina): Report bad conditionals as syntax error. Closes #775475. 2005-01-06 02:09:30 +00:00
fac342ed49 Update copyright notice. 2004-09-07 15:07:16 +00:00
d4fe345edb (news): Add a comment to explain why argument is ignored when HIDDEN
is on.
2004-09-07 06:16:23 +00:00
46da1aec7a deity.h is redundant, remove it. 2004-02-20 20:34:43 +00:00
bfcfaf08c2 Properly declare stuff in headers; remove redundant declarations. 2004-02-19 16:25:14 +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
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