Zacam
c7240f4e85
Some more Parity/drift correction between Antipodes and Trunk: cfile update for better handling.
2011-09-09 14:06:29 +00:00
The_E
d02e2387e1
Marking a bunch of PVS Studio warnings as false alarms. While the warnings are technically correct, none of these are in places where performance matters.
2011-09-04 12:31:33 +00:00
Goober5000
3e6f68096d
PVS-Studio fix: V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string.
2011-09-03 01:15:20 +00:00
Goober5000
16443faa90
PVS-Studio fix: V805 Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) != 0' construct. A more efficient way is to check: str[0] != '\0'.
...
(and sorry Kazan, you don't get to call your for statement a work of art if you use strlen inefficiently)
2011-09-03 01:05:00 +00:00
The_E
6e17a7f6ae
PVS Studio related: Mark false alarms as such.
2011-08-30 17:46:49 +00:00
Echelon9
74bce78b0f
PVS-Studio fix: V803 Decreased performance. In case 'tvs' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator.
...
For further discussion see, http://www.viva64.com/en/b/0093/
The scenarios where it will improve performance are under Debug builds. This improvement will however allow quicker use of other profiling tools that need to run on Debug builds.
Note. Code with size_t does not see the performance improvement comparison to iterators due to absence of array overrun check.
2011-08-28 08:31:25 +00:00
The_E
8c81e1c220
Valathil's code cleanup patch.
2011-07-20 18:04:43 +00:00
Goober5000
b094820d73
a wee bit more is needed
2011-07-06 05:06:22 +00:00
Goober5000
e947d4919c
make things compile
2011-07-06 04:44:25 +00:00
The_E
3aaf723acf
And -safeloading bites the dust too.
2011-07-02 19:43:02 +00:00
The_E
909ec96d06
Fix compiler warnings re: signed/unsigned mismatch
2011-06-18 21:36:05 +00:00
The_E
dd11cdd17b
Bumping the max number of files CFile can handle to 2^16
2011-06-16 17:09:30 +00:00
taylor
1398c8f4d5
more sane memory reserve
2010-05-29 15:53:28 +00:00
portej05
a96e70737a
Remove name concatenation issue from cfilesystem (hopefully mantis 2042 solved, but that callstack changes depending on whether dbg_filter.cfg is there)
2009-11-22 15:05:33 +00:00
portej05
6bc7f30d78
safe_strings - from Antipodes build #1
2009-07-27 16:06:24 +00:00
portej05
d8079622b6
Replace most instances of std::vector with SCP_vector. Memory is now all run through vm_malloc and vm_free.
...
Watch it go up AND down in mission.
2009-07-11 07:07:57 +00:00
portej05
2a09ecc89b
The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
...
I've tested this through compiling and through hand checking.
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
Goober5000
57cab322b4
add apostrophes to contractions, lol
2009-04-10 07:49:12 +00:00
karajorma
55811201ea
Fix multiplayer for Inferno builds.
2009-03-17 20:25:36 +00:00
phreak
cf6bce2299
Add additional filename extension filters to fix Mantis #1484
2008-10-11 12:08:09 +00:00
taylor
6938df2d3b
be sure to skip filenames that are too long in cf_get_file_list() too, since we still need them to be of a certain size later
2008-04-01 06:30:05 +00:00
taylor
0bb4c916e2
tweaks for slightly more efficient file matching
...
minor cleanup
2008-03-20 17:45:31 +00:00
taylor
11ca1ef4a8
move stable branch to the primary under trunk
2008-03-16 16:25:19 +00:00
taylor
eb8c44c2a0
move HEAD to it's own dir under trunk
2008-03-16 16:21:11 +00:00
Goober5000
4811257f31
revert the directory move
2008-02-09 21:33:46 +00:00
Goober5000
8909d048b3
remove extraneous fs2_open folder from all branches and tags
2008-02-09 19:21:05 +00:00
taylor
f4fb5a03b9
make the chcksum spew in logs always have a full 8-set of values
...
skip over files found on system which are over the max filename length, prevents several crashes (partial for Mantis #1182 )
2007-05-28 19:45:14 +00:00
taylor
d03ffec411
cleanup of chksum stuff (works properly on 64-bit systems now)
...
add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
2007-04-11 18:24:28 +00:00
taylor
aadf64aa0b
a little better error handling for cf_exists_full()
...
add a cf_exists_full_ext() which can find a series of extensions and returns true if any of them exist
use cf_exists_full_ext() for eventmusic file checks (to check for ogg and wav)
get rid of SPM hack, it's wrong (just commented out for now though)
fix a bunch of bugs in cf_find_file_location_ext():
- try to handle files with multiple periods a bit better (for the wav files like: blah_1.5.wav)
- load issue with finding incorrect files by mistake
- prevent finding different file types in various paths/roots
2007-03-22 20:22:45 +00:00
taylor
c730a586ac
add the number of files that CFILE is going to try and use in each root to the debug info
...
optimizations for cf_find_file_location_ext()
2007-02-09 23:57:24 +00:00
wmcoolmon
7366176e79
WMC codebase commit. See pre-commit build thread for details on changes.
2006-12-28 00:59:54 +00:00
taylor
35d24f1475
various small cleanup and speedup changes
...
add a cf_find_file_location_ext() function, which you can pass a filename and a list of extensions and it will search for all of them at once
2006-09-11 05:49:05 +00:00
taylor
7d4b222a0e
include CF_TYPE_PLAYERS in special pilot path consideration, prevents moddirs from always getting and empty data/players/
2006-07-28 02:36:07 +00:00
taylor
6d62bbc1c0
extra safety check when creating a default path string, filename is optional be we need to available if root0 is missing (CFILE not initted yet)
...
fix that crazy compiler<->constructor<->linker<->server.txt deal caused by some bad code and a freaky link thing in freespace.cpp
2006-04-16 05:28:10 +00:00
taylor
bfdce36d7a
fix up cf_find_file_location() and related elements so that it's safer (based on WMC's work, but actually safe this time ;))
2005-12-28 22:06:48 +00:00
taylor
0fd5616000
fix quite a few CFILE issues:
...
use #define's for path lengths when possible so it's easier to move between functions
fix huge Cfile_stack[] issue (how the hell did that get through ✌️ QA?)
add Int3() check on cfopen() so it's easier to know if it get's called before cfile is ready to use
move path separators to pstypes.h
fix possible string overruns when setting up CFILE roots
make sure we don't try to init current directory again thinking it's a CD-ROM
add the list of VP roots to debug log, this will undoubtedly be useful
when -nosound is use go ahead and set -nomusic too to both checks are correct
add list of cmdline options to debug log
fix possible overwrite issues with get_version_string() and remove '(fs2_open)' from string plus change OGL->OpenGL, D3D->Direct3D
2005-12-06 03:13:49 +00:00
taylor
5ecaf658f4
switch from strchr() to strrchr() for extension checks in order to allow for multiple periods in a filename
2005-11-16 21:25:34 +00:00
taylor
636bc06e5b
fix memory errors from new[]/delete[] mismatch
2005-10-23 11:44:07 +00:00
wmcoolmon
a0f0735de9
Ack, missed testing compile under an Inferno build
2005-10-23 05:37:59 +00:00
wmcoolmon
5fb1ece53e
Some cfile changes that slipped by
2005-10-17 00:13:28 +00:00
wmcoolmon
4d6db9104b
Hardened cfile against array overflows
2005-10-16 23:15:47 +00:00
taylor
e4131e25e4
use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
...
fixes various problems and is past time to make the switch
2005-05-12 17:49:18 +00:00
taylor
fa0172afb0
merge with Linux/OSX tree - p0130
2005-01-30 12:50:08 +00:00
taylor
71b718a3b9
some 64-bit OS comaptibility fixes
2004-11-21 11:27:31 +00:00
taylor
bf0a46d3f6
support new pilot code, Linux code tree merge, don't use same pilot directory for Inferno builds
2004-10-31 21:28:38 +00:00
Kazan
89e6af4fb5
remove MCD complete
2004-07-26 20:47:56 +00:00
taylor
e1ab4e4532
add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
2004-07-17 09:26:00 +00:00
Kazan
f7dd512ba8
MCD - define _MCD_CHECK to use memory tracking
2004-07-12 16:33:09 +00:00
wmcoolmon
16163aad45
Fixed cf_matches_spec; small bug was introduced.
2004-05-26 22:02:36 +00:00
wmcoolmon
1cb372a8e7
Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages
2004-05-26 21:02:27 +00:00