From 0691de94b5766f6740ae3a105f15630e4513382d Mon Sep 17 00:00:00 2001 From: David Welch Date: Wed, 14 Apr 1999 00:58:52 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/; revision=376 --- reactos/NEWS | 3 +- reactos/apps/tests/args/args.c | 3 +- reactos/apps/tests/test_old/makefile | 21 +++++++++ reactos/apps/tests/test_old/test-stdio.c | 55 ++++++++++++++++++++++++ reactos/apps/utils/cat/cat.c | 19 ++++++++ reactos/apps/utils/cat/makefile | 21 +++++++++ reactos/apps/utils/shell/shell.c | 13 ++++++ reactos/makefile_rex | 2 +- 8 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 reactos/apps/tests/test_old/makefile create mode 100644 reactos/apps/tests/test_old/test-stdio.c create mode 100644 reactos/apps/utils/cat/cat.c create mode 100644 reactos/apps/utils/cat/makefile diff --git a/reactos/NEWS b/reactos/NEWS index 654b9a26a67..e62eb2a332b 100644 --- a/reactos/NEWS +++ b/reactos/NEWS @@ -1,4 +1,5 @@ -0.0.14 (so far): +0.0.14: + 0.0.13: Mostly bugfixes (I think) diff --git a/reactos/apps/tests/args/args.c b/reactos/apps/tests/args/args.c index 63eea2fd4cf..cce17e98cee 100644 --- a/reactos/apps/tests/args/args.c +++ b/reactos/apps/tests/args/args.c @@ -28,11 +28,10 @@ void main(int argc, char* argv[]) OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); debug_printf("GetCommandLineA() %s\n",GetCommandLineA()); - #if 0 for (i=0; i test-stdio.sym + +include ../../rules.mak diff --git a/reactos/apps/tests/test_old/test-stdio.c b/reactos/apps/tests/test_old/test-stdio.c new file mode 100644 index 00000000000..913abc2e807 --- /dev/null +++ b/reactos/apps/tests/test_old/test-stdio.c @@ -0,0 +1,55 @@ +#include +#include + +int main() +{ + char msg1[] = "testing _write\n"; + char msg2[] = "testing putchar."; + char msg3[] = "testing printf."; + char tmpbuf[255]; + FILE* f1; + + write(1, msg1, strlen(msg1)); + + write(1, msg2, strlen(msg2)); + putchar('o'); putchar('k'); putchar('\n'); + + write(1, msg3, strlen(msg3)); + printf("ok\n"); + + printf("Testing fopen\n"); + f1 = fopen("tmp.txt","w+b"); + if (f1 == NULL) + { + printf("fopen failed\n"); + return(1); + } + + printf("Testing fwrite\n"); + if (fwrite(msg1, 1, strlen(msg1)+1, f1) != (strlen(msg1)+1)) + { + printf("fwrite failed\n"); + return(1); + } + + printf("Testing fread\n"); + fseek(f1, 0, SEEK_SET); + if (fread(tmpbuf, 1, strlen(msg1)+1, f1) != (strlen(msg1)+1)) + { + printf("fread failed\n"); + return(1); + } + if (strcmp(tmpbuf,msg1) != 0) + { + printf("fread failed, data corrupt\n"); + return(1); + } + + printf("Testing fclose\n"); + if (fclose(f1) != 0) + { + printf("fclose failed\n"); + return(1); + } + return(0); +} diff --git a/reactos/apps/utils/cat/cat.c b/reactos/apps/utils/cat/cat.c new file mode 100644 index 00000000000..441b5b3d82d --- /dev/null +++ b/reactos/apps/utils/cat/cat.c @@ -0,0 +1,19 @@ +#include +#include + +int main(int argc, char* argv[]) +{ + int i; + FILE* in; + char ch; + + for (i=1; i args.sym + +include ../../rules.mak diff --git a/reactos/apps/utils/shell/shell.c b/reactos/apps/utils/shell/shell.c index 8f25ca83562..612f5b215e6 100644 --- a/reactos/apps/utils/shell/shell.c +++ b/reactos/apps/utils/shell/shell.c @@ -160,6 +160,19 @@ void ExecuteCommand(char* line) ExecuteType(tail); return; } + if (strcmp(cmd,"validate")==0) + { + debug_printf("Validating heap..."); + if (HeapValidate(GetProcessHeap(),0,NULL)) + { + debug_printf("succeeded\n"); + } + else + { + debug_printf("failed\n"); + } + return; + } if (strcmp(cmd,"exit")==0) { ExitProcess(0); diff --git a/reactos/makefile_rex b/reactos/makefile_rex index 154b9febc20..98ee9f383b5 100644 --- a/reactos/makefile_rex +++ b/reactos/makefile_rex @@ -38,7 +38,7 @@ FS_DRIVERS = minix vfat ext2 # FS_DRIVERS = template KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) -APPS = args hello shell +APPS = args hello shell test cat # APPS = cmd all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)