diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-08 15:16:21 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-08 15:16:21 +0200 |
| commit | e4f356b9592599ad91aac34bf2265c9bcdfbb81f (patch) | |
| tree | 5a95908f9cb9cf5ad7d7802661e1d0c3bc2a0e3a /test/test.h | |
| parent | c5a6ff0443fc9e5e890fe72cb13ea78d4fe2bbcb (diff) | |
| download | nissy-core-e4f356b9592599ad91aac34bf2265c9bcdfbb81f.tar.gz nissy-core-e4f356b9592599ad91aac34bf2265c9bcdfbb81f.zip | |
Some minor changes to the interface.
- Simplified logger to accept only a string, not a variadic list
of args like printf(). This can still use some improvement,
but now it is easier to use from other languages.
- Fixed some misuses of the logger (wrong types etc)
- Renamed some constants
- Fixed some typos in comments.
Diffstat (limited to '')
| -rw-r--r-- | test/test.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/test.h b/test/test.h index 615402b..0b12fb7 100644 --- a/test/test.h +++ b/test/test.h | |||
| @@ -31,13 +31,9 @@ int64_t writecube(const char *, cube_t, size_t n, char [n]); | |||
| 31 | /* Test function to be implemented by all tests */ | 31 | /* Test function to be implemented by all tests */ |
| 32 | void run(void); | 32 | void run(void); |
| 33 | 33 | ||
| 34 | void log_stderr(const char *str, ...) | 34 | void log_stderr(const char *str) |
| 35 | { | 35 | { |
| 36 | va_list args; | 36 | fprintf(stderr, "%s", str); |
| 37 | |||
| 38 | va_start(args, str); | ||
| 39 | vfprintf(stderr, str, args); | ||
| 40 | va_end(args); | ||
| 41 | } | 37 | } |
| 42 | 38 | ||
| 43 | int main(void) { | 39 | int main(void) { |
