mirror of
https://github.com/Russell-S-Harper/COMMON.git
synced 2024-11-27 14:50:43 +00:00
Adding check for EXP_FRAC compatibility in xapp.
This commit is contained in:
parent
2bbd304ec7
commit
d175355972
@ -7,6 +7,11 @@
|
|||||||
|
|
||||||
long long result;
|
long long result;
|
||||||
|
|
||||||
|
/* Check if EXP_FRAC is compatible */
|
||||||
|
#if (1 << EXP_FRAC) != (1 << CHAR_BIT) * ((EXP_FULL + CHAR_BIT - 1) / CHAR_BIT)
|
||||||
|
#error "Code needs to be modified to handle current EXP_FRAC!"
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
TOKEN tokens[TOKENS];
|
TOKEN tokens[TOKENS];
|
||||||
@ -33,7 +38,7 @@ int main(int argc, char **argv)
|
|||||||
p = strchr(tokens[i].text, '"') + 1;
|
p = strchr(tokens[i].text, '"') + 1;
|
||||||
q = strrchr(tokens[i].text, '"');
|
q = strrchr(tokens[i].text, '"');
|
||||||
j = (int)(q - p);
|
j = (int)(q - p);
|
||||||
/* Output in .BYTE format */
|
/* Output in .BYTE format - this code is actually dependent on EXP_FRAC */
|
||||||
printf("0, <(%.*s - _data), >(%.*s - _data), 0", j, p, j, p);
|
printf("0, <(%.*s - _data), >(%.*s - _data), 0", j, p, j, p);
|
||||||
break;
|
break;
|
||||||
/* Process each _SET_V("<expression>") command */
|
/* Process each _SET_V("<expression>") command */
|
||||||
|
Loading…
Reference in New Issue
Block a user