diff --git a/gen_intrange.c b/gen_intrange.c index 754553106e7a0e4db3dc0970c12388a0de8bffd0..7006d14e6ad4804d944443f9f4ea675c6013a659 100644 --- a/gen_intrange.c +++ b/gen_intrange.c @@ -23,6 +23,17 @@ void charset_set(struct charset *cs, uint8_t char_idx, uint8_t indicator) { } } +struct charset * new_charset(void) { + return (struct charset *) calloc(sizeof(struct charset), 1); +} + +void print_charset(struct charset *cs) { + for (int i = 0; i<32; i++) + { + printf("%hhx ",cs->bitmap[i]); + } + printf("\n"); +} int main(int argc, char *argv[]) { assert(argc == 4); uint8_t bytes = atoi(argv[1]); @@ -39,17 +50,16 @@ int main(int argc, char *argv[]) { charset_set(cs, 255, 1); charset_set(cs, 254, 0); - for (int i = 0; i<32; i++) - { - printf("bitmapism %d = %hhu\n",i, cs->bitmap[i]); -} + print_charset(cs); + } +/* void gen_int_range(uint64_t low, uint64_t high, uint8_t bytes) { // Possible FIXME: TallerThanMe if (1 == bytes) { - HCharset cs = new_charset(mm__); + struct charset *cs = new_charset(); for (uint64_t i=low; i<=high; ++i) { charset_set(cs, i, 1); } @@ -95,4 +105,4 @@ void gen_int_range(uint64_t low, uint64_t high, uint8_t bytes) { } } } - +*/