Skip to content

Commit 73d6f90

Browse files
committed
Add missing isprint function for CoCo.
1 parent 811c2b8 commit 73d6f90

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

common/src/util/hex_dump.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
#include <ctype.h>
1010
#endif /* _CMOC_VERSION_ */
1111

12+
13+
#ifdef _CMOC_VERSION_
14+
int isprint(int c)
15+
{
16+
// Check if c falls within the ASCII range for printable characters (0x20 to 0x7E)
17+
// This range includes space (0x20) up to tilde (0x7E).
18+
return (c >= 0x20 && c <= 0x7E);
19+
}
20+
#endif
21+
1222
void hd(void* data, unsigned int size) {
1323
unsigned int i = 0;
1424
unsigned int j = 0;

0 commit comments

Comments
 (0)