*** empty log message ***

svn path=/trunk/; revision=376
This commit is contained in:
David Welch 1999-04-14 00:58:52 +00:00
parent d837d19fac
commit 0691de94b5
8 changed files with 133 additions and 4 deletions

View file

@ -1,4 +1,5 @@
0.0.14 (so far):
0.0.14:
0.0.13: Mostly bugfixes (I think)

View file

@ -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<argc; i++)
{
debug_printf("Args: %x\n",argv[i]);
debug_printf("Args: '%s'\n",argv[i]);
}
#endif
}

View file

@ -0,0 +1,21 @@
#
#
#
OBJECTS= test-stdio.o
all: test-stdio.exe
.phony: all
clean:
- $(RM) test-stdio.o
- $(RM) test-stdio.exe
- $(RM) test-stdio.sym
.phony: clean
test-stdio.exe: $(OBJECTS)
$(CC) $(OBJECTS) -lkernel32 -o test-stdio.exe
$(NM) --numeric-sort test-stdio.exe > test-stdio.sym
include ../../rules.mak

View file

@ -0,0 +1,55 @@
#include <stdio.h>
#include <string.h>
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);
}

View file

@ -0,0 +1,19 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i;
FILE* in;
char ch;
for (i=1; i<argc; i++)
{
in = fopen(argv[i],"r");
while ((ch = fgetc(in)) != EOF)
{
putchar(ch);
}
fclose(in);
}
}

View file

@ -0,0 +1,21 @@
#
#
#
OBJECTS= cat.o
all: cat.exe
.phony: all
clean:
- $(RM) cat.o
- $(RM) cat.exe
- $(RM) cat.sym
.phony: clean
cat.exe: $(OBJECTS) $(LIBS)
$(CC) $(OBJECTS) -o cat.exe
$(NM) --numeric-sort cat.exe > args.sym
include ../../rules.mak

View file

@ -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);

View file

@ -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)