2021-12-04 21:53:56 +10:30
|
|
|
#include "config.h"
|
2019-07-23 15:53:44 -05:00
|
|
|
#include "enum.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
void towire_test_enum(u8 **pptr, const enum test_enum test_enum)
|
|
|
|
{
|
|
|
|
printf("this would have been the towire for enum %u\n", test_enum);
|
|
|
|
}
|
|
|
|
|
|
|
|
enum test_enum fromwire_test_enum(const u8 **cursor, size_t *max)
|
|
|
|
{
|
2019-07-25 11:49:21 +09:30
|
|
|
printf("fromwire_test_enum at %zu\n", *max);
|
2019-07-23 15:53:44 -05:00
|
|
|
return TEST_ONE;
|
|
|
|
}
|
|
|
|
|
2022-03-23 10:01:14 +10:30
|
|
|
bool printwire_test_enum(const char *fieldname, const u8 **cursor, size_t *max)
|
2019-07-23 15:53:44 -05:00
|
|
|
{
|
2022-03-23 10:01:14 +10:30
|
|
|
enum test_enum e = fromwire_test_enum(cursor, max);
|
|
|
|
if (!*cursor)
|
|
|
|
return false;
|
|
|
|
printf("%u\n", e);
|
|
|
|
return true;
|
2019-07-23 15:53:44 -05:00
|
|
|
}
|