Commit Graph

5916 Commits

Author SHA1 Message Date
b51a0187bf Fix potential unfreed memory on shutdown
This was SVN commit r7200.
2009-11-14 19:12:09 +00:00
78bc63d92c VC fix: mustn't use filename/parent_path instead of leaf/branch_path because those aren't yet available in the version of boost we're currently using.
remove needless restriction on wdbg_printf buffer size
update description of wdbg_printf to match wvsprintfW's real behavior

This was SVN commit r7199.
2009-11-14 18:32:27 +00:00
a444e6febc Don't use wide print functions on typically-byte-oriented streams
This was SVN commit r7198.
2009-11-14 11:03:43 +00:00
c377a69823 # Fix startup problem on Linux
Fix CreateDirectories when paths end in '/'
Use boost::filesystem parent_path in it, instead of deprecated
branch_path

This was SVN commit r7197.
2009-11-14 10:57:08 +00:00
51f16c30d1 Fix recently-introduced bug
This was SVN commit r7196.
2009-11-14 00:08:16 +00:00
af8d7ce98d Fix tests on Linux
This was SVN commit r7195.
2009-11-13 20:51:04 +00:00
6c8c99a107 # Greatly improve startup time on Linux, and avoid deadlocks
Handle FAM events in a background thread, instead of reading
synchronously

This was SVN commit r7194.
2009-11-13 20:26:20 +00:00
beb3417b03 Build and link with the more correct -pthread option on Linux, instead of -lpthread
This was SVN commit r7193.
2009-11-13 20:24:21 +00:00
5174a0a1ce Fix GCC warnings
This was SVN commit r7192.
2009-11-13 00:49:58 +00:00
44066f5ae4 GCC build fix
This was SVN commit r7191.
2009-11-12 19:35:28 +00:00
345395375a wchar: only raise warning dialog if caller doesn't ask for a return code
update test_wchar accordingly.
app_hooks: update documentation

This was SVN commit r7190.
2009-11-10 21:07:18 +00:00
7a6109f474 debug_SkipNextError changed to debug_SkipErrors (allow skipping multiple instances of the same error code until the next debug_StopSkippingErrors, which returns the number that were skipped)
also:
- add listing of error codes to avoid collisions
- cpu: add cpu_MemoryBarrier
- wchar: warn whenever a character is replaced/invalid bytes are
encountered

This was SVN commit r7189.
2009-11-10 15:48:41 +00:00
6ee9dd8afe GCC build fixes
This was SVN commit r7188.
2009-11-09 21:40:24 +00:00
ff15c522fe implement changes suggested by Philip:
- add self-test
- allow decoding UTF8 values beyond BMP (and replace them later)
- quietly replace invalid bytes

This was SVN commit r7187.
2009-11-09 20:53:48 +00:00
593bf6a571 GCC build fixes
This was SVN commit r7186.
2009-11-09 17:36:39 +00:00
450da0aaf7 rename [w]string_to_[w]string UTF8
add safer/more portable/less dependent on locale implementation of
wchar_t <-> UTF8

This was SVN commit r7185.
2009-11-09 14:52:51 +00:00
33ec9060dd gcc compile fix (thanks to Heron for reporting the problem)
This was SVN commit r7184.
2009-11-08 18:58:14 +00:00
6cc0b1649a robustified GetPatch / GetTile:
- clarify the meaning of mapSize (patchesPerSide)
- use a single ClampCoordToMap function for clamping
- add annotations to all call sites when it is sure they will succeed
- otherwise, ensure return value is checked or at least add debug_assert
fixes #311 (successfully built house and dock at top of latium map)
thanks to Heron for tracking down the cause!

This was SVN commit r7183.
2009-11-08 16:49:52 +00:00
259f3990df Fix inconsistency in Dehydra script
This was SVN commit r7182.
2009-11-07 13:38:31 +00:00
934bc31246 Fix GCC build error
This was SVN commit r7181.
2009-11-07 13:34:11 +00:00
43e26aa3f6 2 more dehydra fixes
This was SVN commit r7180.
2009-11-07 12:31:18 +00:00
2ef4e7353e self-test and x64 fixes:
- headerless: distinguish between allocation granularity and min size
(hopefully fixes test failure on x64)
- test_wdbg_sym: disable printf spew
- hpet: use workaround when x64 MOVD isn't available due to processor or
compiler
- JSConversions: VC2005 x64 apparently distinguishes ssize_t from long
int (as it does with size_t)

This was SVN commit r7179.
2009-11-07 12:26:40 +00:00
7cf2888323 fix to sys_vswprintf's buffer termination (caught by self-test)
This was SVN commit r7178.
2009-11-07 09:42:25 +00:00
f432d9d18b fix dehydra warnings (some of which were dangerous pass-user-string-as-format-string vulnerabilities)
This was SVN commit r7177.
2009-11-07 09:32:19 +00:00
378bd89c1d Annotate some more printf-style functions, for type checking
This was SVN commit r7176.
2009-11-06 23:06:50 +00:00
d7a057143d An initial Dehydra-based static analysis script for type-checking printf-style functions
This was SVN commit r7175.
2009-11-06 22:48:11 +00:00
3334c83ce0 Fix build and tests on Linux
This was SVN commit r7174.
2009-11-06 18:35:32 +00:00
048d4c41c8 fix: unix doesn't have a standard wopen(). we'd like to use wchar_t _wopen on Windows, and convert to UTF8+open() on unix, which calls for adding a new sys_wopen() interface to sysdep.
This was SVN commit r7173.
2009-11-06 16:46:08 +00:00
607ea6f8b4 chip away at gcc errors/warnings
This was SVN commit r7172.
2009-11-06 16:15:09 +00:00
6ec9128e78 refactor: move reload functionality into ps/Filesystem to allow reloading non-resource files (e.g. scripts); VFS is now responsible for returning VirtualPath and invalidating the changed file/directory
This was SVN commit r7171.
2009-11-06 11:50:04 +00:00
9662666403 more string drudgery
- sprintf, snprintf -> sprintf_s (ensures 0-termination of result)
- use %s instead of %hs with sprintf_s to avoid GCC warnings
- convert h_mgr's to_string to unicode

This was SVN commit r7170.
2009-11-06 10:59:10 +00:00
25717ef768 add VirtualPath API to VFS in preparation for moving hotload logic out of library code and into the game. also rename GetRealPath -> RealPath + some cleanup/documentation
This was SVN commit r7169.
2009-11-06 01:30:16 +00:00
8fefedb5ae fix: native and vfs directory paths should end with '/' (more code cares about this now)
refactor: simplify dir_watch_Poll interface (returns vector)
wdir_watch: major refactor: use shared_ptr for reference-counting shared
watch state
remove no longer needed path_util functions

This was SVN commit r7168.
2009-11-05 20:46:15 +00:00
5ba40becc5 avoid unspecified behavior due to definition of __WFILE__ (now use WIDEN(__FILE__) instead)
fix inadvertent breakage of gfx_detect's SHORTEN

This was SVN commit r7167.
2009-11-04 23:00:53 +00:00
4c44602ea0 add support for hotloading (i.e. reacting to directory change notifications and reloading the affected files)
also clean up VFS a bit.
ogl_tex now tolerates deleting/renaming texture files that are in use
(except for a warning message which can be 'continue'd)

This was SVN commit r7166.
2009-11-04 22:35:54 +00:00
b48e877f5b VFS fixes+refactoring
- fix: archive_zip: avoid crash if zip file contains empty filenames
- real_directory: enable dir watch
- refactor vfs_tree interface (move recursive calls into VFS)
- VFS: return text representation instead of only printing it

This was SVN commit r7165.
2009-11-04 17:26:54 +00:00
77d2c67ada misc. string fixes
convert remaining %s to %hs or %ls
use WPRINTF_ARGS on unicode printf functions
fix: __func__ can't be widened via preprocessor (-> revert to char*)
convert remaining external_[directory|file_string to string()
Util: don't mix fwprintf and fprintf
Formation: fix dangling pointer (storing result of c_str())

This was SVN commit r7164.
2009-11-04 15:29:28 +00:00
e29d5a779f fix: wprintf: buffer mustn't be unicode (caught by self-test)
test_wdbg_sym - reenable, add test for basic stack walking
ia32_GetCallTarget - move frequent cases to front, add support for ILT
function trampolines
wdbg_sym: fix: ia32_walk_stack wasn't setting AddrStack; fix string
output

This was SVN commit r7163.
2009-11-04 14:24:54 +00:00
da3030cfe6 more unicode/string cleanup:
- swprintf -> swprintf_s
- use secure_crt's _wfopen_s instead of conversion+fopen
- centralize all MBS <-> WCS conversion in new wchar.cpp (requires
workspace rebuild)
- remove no longer needed os_path
- remove unnecessary fs::wpath / VfsPath constructor casts
- fixed buffer size parameters -> ARRAY_SIZE

This was SVN commit r7162.
2009-11-03 22:27:25 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
a46f3432f3 harmless changes in preparation for moving to unicode
ia32: fix: ia32_GetCallTarget wasn't always initializing target
x86_x64: use macro implementation for rdtsc to reduce timing overhead

This was SVN commit r7160.
2009-11-03 16:30:21 +00:00
e6f9d25925 Exclude system headers from dependency generation. (Speeds up 'make' with no file changes by ~80%)
This was SVN commit r7159.
2009-10-29 16:45:34 +00:00
f1e3468f10 Fix paths in makefile dependency generation
This was SVN commit r7157.
2009-10-23 21:41:23 +00:00
d63acc604f Apparently GUI should be able to try and set a setting, without it actually being defined, see comments in IGUIObject::LoadStyle.
Removing invalid access to setting in progress bar.
closes #314

This was SVN commit r7155.
2009-10-13 22:59:21 +00:00
85179afa0d This was SVN commit r7154. 2009-10-12 11:40:36 +00:00
b343249fcc add missing terrains.xml
avoid data-dependent bug (null pointer when no terrain properties
loaded)
fixes #307
thanks go to BadassTester and Heron!

This was SVN commit r7153.
2009-10-11 21:27:35 +00:00
e257bef5da Fix even more 64-bit warnings
This was SVN commit r7152.
2009-10-05 16:15:51 +00:00
6f9eaf769c Fix some more 64-bit warnings
This was SVN commit r7151.
2009-10-05 15:33:38 +00:00
f76dc5a062 by request of sluzky: add JS files to VS workspace to allow find-in-files and open-file-in-workspace
This was SVN commit r7150.
2009-10-04 11:49:07 +00:00
ea4abb8f3c Fix a 64-bit warning
This was SVN commit r7149.
2009-10-03 09:31:51 +00:00