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.
upda,ef_open,logerror,emp_config,match_user,show_motd,gamedown,
typed_wu,delete_old_announcements,mobility_check,mobility_init,
allocate_memory,write_newcap_script,main,files,fairland,doconfig,)
[_WIN32]: Switchback to default mode of text.
"t" (text) is not included the ISO/ANSI C standard but "b" (binary)
is included.
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.
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.
Windows, therefore could miss info files depending on the status
(archive, read-only). Also changed the error message to user to
provide a more accurate description of the problem. Closes#1018297.
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.
instead of declaring them all over the place. This uncovered type
errors:
(s_p_etu, adj_update): Defined long, sometimes declared int. Kills
big endian machines where sizeof(long) != sizeof(int). Change to
int.
(set_option, delete_option, optstrset, intset, floatset, doubleset,
longset, optionset, optiondel, worldxset): Change linkage to static.