Romain Vimont
|
ab912c23e7
|
Define feature test macros in common.h
This enables necessary functions once for all.
As a consequence, define common.h before any other header.
|
5 years ago |
Romain Vimont
|
199c74f62f
|
Declare main() with argc/argv params in tests
Declaring the main method as "int main(void)" causes issues with SDL.
Fixes #1209 <https://github.com/Genymobile/scrcpy/issues/1209>
|
6 years ago |
Romain Vimont
|
2a3a9d4ea9
|
Add util function to parse a list of integers
This will help parsing arguments like '1234:5678' into a list of
integers.
|
6 years ago |
Romain Vimont
|
ba1b36758e
|
Define SDL_MAIN_HANDLED in all tests
Each test defines its own main() function. If this flag is not set, then
SDL redefines it to SDL_main(), causing compilation failures.
|
6 years ago |
Romain Vimont
|
61274a7cdb
|
Factorize integer argument parsing
Add util functions for integer parsing (with tests), and factorize
integer argument parsing to avoid code duplication.
|
6 years ago |
Romain Vimont
|
3259c60b22
|
Fix test compilation on mingw
Including SDL2/SDL.h redefines main to SDL_main by default.
|
6 years ago |
Yu-Chen Lin
|
5eeaed09ae
|
Add test_strquote
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
|
6 years ago |
Romain Vimont
|
dfd0707a29
|
Move utilities to util/
|
6 years ago |
Romain Vimont
|
0a7fe7ad57
|
Add helpers to truncate UTF-8 at code points
This will help to avoid truncating a UTF-8 string in the middle of a
code point, producing an invalid UTF-8 result.
|
7 years ago |
Romain Vimont
|
ff4430b2a3
|
Declare fun(void) functions with no parameters
This is not C++.
|
7 years ago |
Romain Vimont
|
536b31829a
|
Separate multi-words filenames by '_'
Rename foobar.ext to foo_bar.ext.
<https://github.com/Genymobile/scrcpy/pull/226#discussion_r209454865>
|
7 years ago |
Romain Vimont
|
f75c404a26
|
Add tests for strutil
Test our custom string handling functions.
|
8 years ago |