fixed a bug in printing a single character when hcl_ooch_t is hcl_bch_t

implemented the primitive printf function partially
This commit is contained in:
2018-02-28 10:17:05 +00:00
parent aaafc1371b
commit ffa6c39852
6 changed files with 111 additions and 283 deletions

View File

@ -803,6 +803,7 @@ static int get_sharp_token (hcl_t* hcl)
"invalid hexadecimal character in %.*js", TOKEN_NAME_LEN(hcl), TOKEN_NAME_PTR(hcl));
return -1;
}
/* TODO: check for the max charcter value and raise an error... */
c = c * 16 + CHAR_TO_NUM(hcl->c->tok.name.ptr[i], 16); /* don't care if it is for 'p' */
}
}