FreeCalypso > hg > sms-coding-utils
comparison libcoding/hexout.c @ 1:13518c86b73c
libcoding: add hexout.c, implementing emit_hex_out()
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 05 Aug 2023 02:06:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:2d0082216916 | 1:13518c86b73c |
---|---|
1 /* | |
2 * The function implemented in this module emits hex bytes to a stdio output. | |
3 */ | |
4 | |
5 #include <sys/types.h> | |
6 #include <stdio.h> | |
7 | |
8 emit_hex_out(buf, buflen, outf) | |
9 u_char *buf; | |
10 unsigned buflen; | |
11 FILE *outf; | |
12 { | |
13 unsigned n; | |
14 | |
15 for (n = 0; n < buflen; n++) | |
16 fprintf(outf, "%02X", buf[n]); | |
17 } |