chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
@@@ tvec doc wip
[mLib]
/
utils
/
t
/
versioncmp-test.c
diff --git
a/utils/t/versioncmp-test.c
b/utils/t/versioncmp-test.c
index 5e13e155e5f0f7685fb7ae544b7e784e74cba4e3..fb462d04df02893847de01669f2ef343267bf388 100644
(file)
--- a/
utils/t/versioncmp-test.c
+++ b/
utils/t/versioncmp-test.c
@@
-35,7
+35,7
@@
enum {
static void test_versioncmp(const struct tvec_reg *in, struct tvec_reg *out,
void *ctx)
static void test_versioncmp(const struct tvec_reg *in, struct tvec_reg *out,
void *ctx)
- { out[RRC].v.i = versioncmp(in[RV0].v.
str.p, in[RV1].v.str
.p); }
+ { out[RRC].v.i = versioncmp(in[RV0].v.
text.p, in[RV1].v.text
.p); }
static void swap_test(struct tvec_state *tv, tvec_testfn *fn, void *ctx)
{
static void swap_test(struct tvec_state *tv, tvec_testfn *fn, void *ctx)
{
@@
-49,11
+49,10
@@
static void swap_test(struct tvec_state *tv, tvec_testfn *fn, void *ctx)
}
static const struct tvec_env swap_testenv = { 0, 0, 0, 0, swap_test, 0, 0 };
}
static const struct tvec_env swap_testenv = { 0, 0, 0, 0, swap_test, 0, 0 };
-static const struct tvec_irange cmp_range = { -1, +1 };
static const struct tvec_regdef versioncmp_regs[] = {
static const struct tvec_regdef versioncmp_regs[] = {
- { "v0", RV0, &tvty_
string
, 0 },
- { "v1", RV1, &tvty_
string
, 0 },
- { "rc", RRC, &tvty_i
nt, 0, { &cmp_range
} },
+ { "v0", RV0, &tvty_
text
, 0 },
+ { "v1", RV1, &tvty_
text
, 0 },
+ { "rc", RRC, &tvty_i
enum, 0, { &tvenum_cmp
} },
TVEC_ENDREGS
};
TVEC_ENDREGS
};