X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/22708ca2c46da8412b10b87324190a6aa9d27314..refs/heads/mdw/xdh:/crypto-test.h diff --git a/crypto-test.h b/crypto-test.h index 94bb009..807ae07 100644 --- a/crypto-test.h +++ b/crypto-test.h @@ -66,7 +66,8 @@ union regval { long i; /* signed integer */ unsigned long u; /* unsigned integer */ - struct { void *p; size_t sz; } bytes; /* buffer of bytes */ + struct { unsigned char *p; size_t sz; } bytes; /* buffer of bytes */ + struct { char *p; size_t sz; } str; /* text string */ #ifdef REG_MEMBERS REG_MEMBERS /* your members here */ #endif @@ -120,12 +121,14 @@ extern void dump_hex(FILE *fp, const uint8_t *b, size_t sz); extern void trivial_regty_init(union regval *v); extern void trivial_regty_release(union regval *v); extern void allocate_bytes(union regval *v, size_t sz); +extern void allocate_string(union regval *v, size_t sz); /* Built-in register types. */ extern const struct regty regty_int, regty_uint, - regty_bytes; + regty_bytes, + regty_string; /* Running tests. */ extern void check_test_output(struct test_state *state,