Commit Graph

37 Commits

Author SHA1 Message Date
Lioncash beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
JosJuice bc2b9f4c3c Translate Swedish in example strings to English 2017-02-04 22:51:01 +01:00
Sepalani a6114bad34 Import/Export signature files as CSV 2016-12-18 00:27:10 +00:00
JosJuice c74c317ab5 IOS HLE: More robust escaping of NAND paths
Prevents path traversal without needing an absolute path
function, and also improves accuracy (character sequences
like ../ appear to have no special meaning in IOS).

This removes the creation and usage of /sys/replace,
because the new escapes are too complicated to all
be representable in its format and because no other
NAND handling software seems to use /sys/replace.
2016-11-26 22:49:46 +01:00
Anthony J. Bentley 5c90738638 OpenBSD doesn't support per-thread locales. 2016-07-17 04:08:44 -06:00
Léo Lam 213373f5f9 StringUtil: Make TryParse parse floats as booleans
This is needed to keep compatibility with old configuration files which
didn't store booleans as booleans, but as floats/doubles.
2016-07-13 13:50:48 +02:00
Pierre Bourdon 5fcb4bb3ab Further fixes to the formatting change. WX sucks. 2016-06-24 12:16:10 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Pierre Bourdon fe51de23f1 StringUtil: Add a HexDump function.
Generates a string like the following from a binary blob:

000000: 00 00 04 74 79 70 65 00 09 61 70 70 2d 73 74 61  ...type..app-sta
000010: 72 74                                            rt
2016-06-18 16:37:09 +02:00
mathieui f15ffda5a7 Correct ampersands as well 2016-01-21 21:27:56 +01:00
mathieui 3e283ea9f1 More asterisks 2016-01-21 21:16:51 +01:00
mathieui 78aa398e7c Common: asterisks go against the type name
not the variable name
2016-01-21 20:46:25 +01:00
Markus Wick 3ed29cce0c Merge pull request #2733 from AdmiralCurtiss/string-from-float
IniFile: Fix floating point number locale issues.
2015-12-02 15:22:42 +01:00
Lioncash cc036ca86c Common: Remove other Common prefixed headers from Common.h 2015-09-26 18:51:58 -04:00
Tillmann Karras 5a05187b3b Fix some warnings
reorder, sign-compare, pessimizing-move
2015-08-04 10:58:24 +02:00
Admiral H. Curtiss a48f2add68 StringUtil: Always use the default C locale for StringFromFormat() instead of a system-specific one. 2015-07-11 16:30:32 +02:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Rohit Nirmal 48ec42d4a0 Core: Change NULLs to nullptrs. 2015-03-14 20:20:41 -05:00
Gabriel Corona 266d50c811 Use the C locale for non-Windows CharArrayFromFormatV() and StringFromFormat()
The Windows implementations of CharArrayFromFormatV() and
StringFromFormat() use the "C"/".1252" locale instead of the user
locale (using _vsnprintf_l). On non-Windows, the user locale was used.

This leads to bugs on non-Windows: the Overclock parameter was
serialised with the user locale ("0,279322" in some locale) and was
interpreted back as "0" (because the C locale is used for parsing the
string).

Make non-Windows CharArrayFromFormatV() and StringFromFormat()
consistent with their Windows counterpart.

The locale code is not enables for Android:: uselocale is only
available since API 21 and API 21 only supports C and C.UTF-8.
2015-02-04 17:49:22 +01:00
Gabriel Corona a957f93532 Use printf-like format in JitRegister::Register
The API is cleaner (no more magic default parameter) and more
extensible like this.
2015-01-28 09:47:08 +01:00
Stevoisiak cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
Lioncash 9bcadc8029 Common: Remove locale based functions from CommonFuncs.
Since %f isn't used anymore in the shader generators, these can go.
2014-12-05 20:55:29 -05:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
lioncash 3e0c04a83e Common: Fix a potential infinite loop in ReplaceAll
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.

e.g.

std::string some_str = "test";
ReplaceAll(some_str, "test", "test");

This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-05 15:12:17 -04:00
Lioncash 6369173981 DolphinWX: Simplify wiki link construction 2014-09-04 21:30:33 -04:00
Lioncash 5afb9cc5c4 Common: Fix AsciiToHex returning true on overflow values
We should be checking errno against ERANGE.
2014-08-12 02:49:04 -04:00
Lioncash a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane 31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Pierre Bourdon 83b7bb64aa Make Common/ mostly IWYU clean (and fix errors in rest of the project detected by this change). 2014-02-22 23:37:29 +01:00
Pierre Bourdon 3f9c38d231 Fix more header sorting issues in Common/ (now check-includes clean). 2014-02-20 01:01:10 +01:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash 3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Pierre Bourdon 70e2ed320d Revert "Merge pull request #47 from lioncash/remove-stringfromint"
Breaks Android build.

This reverts commit 12d026c544, reversing
changes made to 6d678490f5.
2014-02-07 00:26:33 +01:00
Lioncash 05742ffd48 Remove function StringFromInt from StringUtil.cpp/.h. C++11 has std::to_string for this now. 2014-02-06 18:08:31 -05:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00