]> git.sur5r.net Git - cc65/commitdiff
Added stroserror-test.c
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 18 Jul 2002 13:38:40 +0000 (13:38 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 18 Jul 2002 13:38:40 +0000 (13:38 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1366 b7a2c559-68d2-44c3-8de9-860c34a00d81

testcode/lib/stroserror-test.c [new file with mode: 0644]

diff --git a/testcode/lib/stroserror-test.c b/testcode/lib/stroserror-test.c
new file mode 100644 (file)
index 0000000..9eabf5f
--- /dev/null
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <string.h>
+#include <conio.h>
+
+
+int main (void)
+{
+    unsigned char error = 0;
+    unsigned char line = 0;
+    unsigned char maxx, maxy;
+    screensize (&maxx, &maxy);
+    do {
+        printf ("%2d: %s\n", error, _stroserror (error));
+        if (line == maxy-3) {
+            printf ("Press any key...\n");
+            if (cgetc () == 'q') {
+                return 0;
+            }
+            clrscr ();
+            line = 0;
+        } else {
+            ++line;
+        }
+        ++error;
+    } while (error != 0);
+
+    return 0;
+}
+
+
+