aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-05-11 16:08:20 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-05-11 16:08:20 -0700
commit3cb520bd67c3a270a8dfe38654674943d01ff541 (patch)
tree056cf25866e346f644b7963cf1e1ee890a906d5e /com32/samples
parent4d6d5f91c3e6c69dc22cd51225f1a3e87fa19468 (diff)
downloadsyslinux-3cb520bd67c3a270a8dfe38654674943d01ff541.tar.gz
syslinux-3cb520bd67c3a270a8dfe38654674943d01ff541.tar.xz
syslinux-3cb520bd67c3a270a8dfe38654674943d01ff541.zip
cat.c32: move from samples to modules; remove debug code
Move cat.c32 from samples to modules, and remove debugging messages. Real users may want to use this. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/samples')
-rw-r--r--com32/samples/Makefile2
-rw-r--r--com32/samples/cat.c36
2 files changed, 1 insertions, 37 deletions
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index 482769ef..bee2b992 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -17,7 +17,7 @@
topdir = ../..
include ../MCONFIG
-all: hello.c32 cat.c32 resolv.c32 serialinfo.c32 \
+all: hello.c32 resolv.c32 serialinfo.c32 \
localboot.c32 \
fancyhello.c32 fancyhello.lnx \
keytest.c32 keytest.lnx \
diff --git a/com32/samples/cat.c b/com32/samples/cat.c
deleted file mode 100644
index 3930f744..00000000
--- a/com32/samples/cat.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <console.h>
-
-int main(int argc, char *argv[])
-{
- FILE *f;
- int ch;
- int i;
-
- openconsole(&dev_stdcon_r, &dev_stdcon_w);
-
- printf("argv = %p\n", argv);
- for (i = 0; i <= argc; i++)
- printf("argv[%d] = %p = \"%s\"\n", i, argv[i], argv[i]);
-
- if (argc < 2) {
- fprintf(stderr, "Usage: cat.c32 filename\n");
- return 1;
- }
-
- printf("File = %s\n", argv[1]);
-
- f = fopen(argv[1], "r");
- if (!f) {
- fprintf(stderr, "File name \"%s\" does not exist.\n", argv[1]);
- return 1;
- }
-
- while ((ch = getc(f)) != EOF)
- putchar(ch);
-
- fclose(f);
-
- return 0;
-}