summaryrefslogtreecommitdiffstats
path: root/private/crt32/string/mips/strcpyt.c
diff options
context:
space:
mode:
Diffstat (limited to 'private/crt32/string/mips/strcpyt.c')
-rw-r--r--private/crt32/string/mips/strcpyt.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/private/crt32/string/mips/strcpyt.c b/private/crt32/string/mips/strcpyt.c
new file mode 100644
index 000000000..4d0d99279
--- /dev/null
+++ b/private/crt32/string/mips/strcpyt.c
@@ -0,0 +1,23 @@
+#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;
+ }
+ }
+ }
+}