1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-11-09 21:32:02 +05:30

bool-operations.c: optimize printf(s "\n") to puts(s)

This commit is contained in:
Intel A80486DX2-66 2024-07-03 11:21:19 +03:00
parent 1ff2eec112
commit 5a785bfd9f
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -19,29 +19,29 @@
int main(void) {
bool boolean = false;
unsigned char integer = (unsigned char) boolean;
printf("Loop:\n");
puts("Loop:");
for (uint8_t i = 0; i < 3; i++) {
SHOW_BOOL_INT;
boolean++; integer++;
}
printf("\n* 2:\n");
puts("\n* 2:");
boolean *= 2; integer *= 2;
SHOW_BOOL_INT;
printf("\n<< 1:\n");
puts("\n<< 1:");
boolean <<= 1; integer <<= 1;
SHOW_BOOL_INT;
printf("\n/ 2:\n");
puts("\n/ 2:");
boolean /= 2; integer /= 2;
SHOW_BOOL_INT;
printf("\n^ 0x10:\n");
puts("\n^ 0x10:");
boolean ^= 0x10; integer ^= 0x10;
SHOW_BOOL_INT;
printf("\n>> 1:\n");
puts("\n>> 1:");
boolean >>= 1; integer >>= 1;
SHOW_BOOL_INT;