Mercurial > pub > dyncall > dyncall
changeset 527:ed8835abe05f
- cosmetics
author | Tassilo Philipp |
---|---|
date | Thu, 14 Apr 2022 10:13:10 +0200 |
parents | 93628a1eaed4 |
children | e56241bba0f5 |
files | test/call_suite/main.c test/call_suite_aggrs/main.c test/call_suite_aggrs/mk-cases.lua |
diffstat | 3 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/test/call_suite/main.c Thu Apr 14 10:06:58 2022 +0200 +++ b/test/call_suite/main.c Thu Apr 14 10:13:10 2022 +0200 @@ -3,7 +3,7 @@ Package: dyncall Library: test File: test/call_suite/main.c - Description: + Description: License: Copyright (c) 2011-2022 Daniel Adler <dadler@uni-goettingen.de>, @@ -23,7 +23,6 @@ */ - #include "dyncall.h" #include "globals.h" #include <string.h> @@ -44,7 +43,7 @@ int s = 0; clear_V(); - + dcReset(p); /* locate return type in sig; if no ')' separator, test failed */ @@ -76,8 +75,8 @@ } ++pos; } - - switch(*rtype) + + switch(*rtype) { case 'v': dcCallVoid (p,t); s=1; break; /*TODO:check that no return-arg was touched.*/ case 'B': s = ( dcCallBool (p,t) == K_B[pos]); break; @@ -130,7 +129,7 @@ } static int run_test(int i) -{ +{ char const * sig; void * target; int success;
--- a/test/call_suite_aggrs/main.c Thu Apr 14 10:06:58 2022 +0200 +++ b/test/call_suite_aggrs/main.c Thu Apr 14 10:13:10 2022 +0200 @@ -3,7 +3,7 @@ Package: dyncall Library: test File: test/call_suite_aggrs/main.c - Description: + Description: License: Copyright (c) 2022 Tassilo Philipp <tphilipp@potion-studios.com> @@ -39,7 +39,7 @@ const char* agg_sig = G_agg_sigs[i]; int l = strlen(agg_sig); if(len) - *len = l; + *len = l; if(strncmp(agg_sig, sig, l) == 0) return i; } @@ -122,7 +122,7 @@ ++sig; } - switch(*rtype) + switch(*rtype) { case 'v': dcCallVoid(p,t); s=1; break; /*TODO:check that no return-arg was touched.*/ case 'B': s = ( dcCallBool (p,t) == K_B[pos]); break; @@ -203,7 +203,7 @@ } static int run_test(int i) -{ +{ char const * sig; void * target; int success;
--- a/test/call_suite_aggrs/mk-cases.lua Thu Apr 14 10:06:58 2022 +0200 +++ b/test/call_suite_aggrs/mk-cases.lua Thu Apr 14 10:13:10 2022 +0200 @@ -44,7 +44,7 @@ if seen_aggrs[aggr_sig[n_nest]] == nil then aggrs[#aggrs+1] = aggr_sig[n_nest] if ch == '}' then ch = 'struct ' else ch = 'union ' end - ch = ch..'A'..#aggrs + ch = ch..'A'..#aggrs seen_aggrs[aggr_sig[n_nest]] = { aggr[n_nest], ch } end ch = seen_aggrs[aggr_sig[n_nest]][2] @@ -110,7 +110,7 @@ for line in io.lines() do local sig = trim(line) - local c, n = mkcase(lineno, sig, aggrs, seen_aggrs) + local c, n = mkcase(lineno, sig, aggrs, seen_aggrs) cases = cases..c max_numargs = math.max(max_numargs, n) sigtab[#sigtab+1] = sig