day1: added shim for part 2

Fortune for aoc2021's current commit: Half blessing − 半吉
master
Avril 3 years ago
parent 7598a8d6b9
commit c705154f09
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -3,7 +3,17 @@
#include <input.h>
extern int part1(uint64_t* restrict);
extern int part2();
extern int part2(uint64_t* restrict);
inline static void print_value(int part, uint64_t p)
{
#ifdef DEBUG
printf("[%d] >>> %lu\n", part, p);
#else
(void)part;
printf("%lu\n", p);
#endif
}
int main()
{
@ -11,14 +21,12 @@ int main()
#ifdef _PART1
uint64_t p1;
if( (r = part1(&p1)) ) return r;
#ifdef DEBUG
printf("[1] >>> %lu\n", p1);
#else
printf("%lu\n", p1);
#endif
print_value(1, p1);
#endif
#ifdef _PART2
if( (r = part2()) ) return r;
uint64_t p2;
if( (r = part2(&p2)) ) return r;
print_value(2, p2);
#endif
return r;
}

@ -0,0 +1,11 @@
#include <input.h>
#include <tracem/macros.h>
int part2(uint64_t* restrict _res)
{
uint64_t res=0;
TODO("unimplemented");
*_res = res;
return 0;
}
Loading…
Cancel
Save