JohnS Guru
 Joined: 18/11/2011 Location: United KingdomPosts: 4276 |
| Posted: 09:36pm 22 Feb 2022 |
|
|
|
I use typedef to get
uchar (an unsigned char) - usually just an 8-bit item, often not a character
schar (a signed char) - hardly ever used
char (don't care) - commonly actually is a character
Seems to survive porting well.
OTOH I don't tend to be porting existing code written by someone else.
I wonder if you could use C++ overloading to make strlen(unsigned char *) the same as strlen(char *).
John |