Use `short' instead of `unsigned short'. With variables, plague stage
and time were stored unsigned and used signed, which worked. Removal
of variables dropped the conversion to signed, which broke
plague_people() (plague.c rev. 1.6): stage didn't progress correctly
due to catastrophic underflow of time.
Also reorganized to check for special characters then blank.
(info): Add length boundary check to filename variable.
Change WIN32 to use the same code.
(info) [_WIN32]: Fix check for invalid file attributes.
(apro): Ensure the user does not see the directory information on error.
See #1028552 for reference.
(apro): Ensure the directories, operating system files, and
hidden files are skipped.
(nullify_objects, do_desi): Simpify designate restrictions of options
NO_LCMS, NO_HCMS, NO_OIL.
(show_sect_build): Suppress printing of sectors only deity can
designate. This was broken in rev. 1.15.
Get it from environment variable LOGNAME if set,
else get the user name from the system.
(main) [_DWIN32]: Add stdin redirection ability to the Win32 port.
The client reads until stdin redirection empty and then terminates.
defines, import these defines into plague.h, drop var.h and include
plague.h where appropriate.
Remove some 'register' keywords at the same time.
No functional changes.
be skipped or stored in arrays of size I_MAX. I_NONE's int equivalent
becomes -1 by this patch, so all array indices of type i_type have been
checked not to use I_NONE as index. This change reduces the size of the
arrays stored in files.
error messages. Properly log all system errors and return RET_SYS.
Closes#1028552.
(info): Fix use of uninitialized variable when fopen() succeeds but
fstat() or the st_mode check fails.
(info) [_WIN32]: Fix '//' to be '\\'. Add file type check to prevent
opening hidden or operating system files.
integer. When 5 * sect.sct_mobil - 4 < nshot < 5 * sect.sct_mobil,
nshot was rounded up to the next multiple of 5. This could shoot more
people than present, resulting in negative population. Before
rev. 1.3, putvar() swept this error under the rug.
This can happen when unload_it() can't unload, e.g. because sector is
full. This can push the sector's amount beyond ITEM_MAX, and can even
overflow to negative amounts.