Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use <inttypes.h> format identifiers. #28

Open
ascherer opened this issue Jan 15, 2025 · 0 comments
Open

Use <inttypes.h> format identifiers. #28

ascherer opened this issue Jan 15, 2025 · 0 comments

Comments

@ascherer
Copy link
Owner

ascherer commented Jan 15, 2025

\def\title{C}
\def\PRIx#1#2{\.{PRIx#1#2}}

@s uint32_t int
@s PRIx32 TeX

@* Test.

@$printf "<stdio.h>" \zip@>
@$uint32_t "<stdint.h>" \zip@>
@$PRIx32 "<inttypes.h>" \zip@>

@c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>

int main(void)
{
  uint32_t x=42;
  printf("%08"PRIx32"\n",x);
}

results in c.pdf.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant