mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
578 B
23 lines
578 B
#include <stdio.h>
|
|
#include <limits.h>
|
|
|
|
#define SRCLEN 21 /* to avoid complicating errors */
|
|
|
|
void main( int argc, char **argv )
|
|
{
|
|
int c;
|
|
unsigned char *psrc, *pdst;
|
|
unsigned char src[SRCLEN] = "ABCDEFGHIJKLMNOPQRST";
|
|
unsigned char dst[100];
|
|
|
|
for (c = 'a'; c <= UCHAR_MAX; c++) {
|
|
src[9] = c;
|
|
strcpy( dst, src);
|
|
for (psrc = src, pdst = dst; *psrc; psrc++, pdst++) {
|
|
if (*psrc != *pdst) {
|
|
printf("Fail - Could not find '%c' 0x%x in %s\n", c, c, src);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|