Bladeren bron

Added some missing CVS headers and did a bit of cleaning up.

dtrg 17 jaren geleden
bovenliggende
commit
c40a44b52e

+ 1 - 0
plat/pc86/README

@@ -1,5 +1,6 @@
 # $Source$
 # $State$
+# $Revision$
 
 The pc86 platform
 =================

+ 1 - 0
plat/pc86/boot.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 3 - 0
plat/pc86/descr

@@ -1,4 +1,7 @@
+# $Source$
+# $State$
 # $Revision$
+
 var w=2
 var p=2
 var s=2

+ 1 - 0
plat/pc86/libsys/_brk.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 1 - 0
plat/pc86/libsys/_mon.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 0 - 87
plat/pc86/libsys/_sbrk.c

@@ -1,87 +0,0 @@
-/* There should be a header for brk and sbrk, but there isn't. */
-
-#include <stdlib.h>
-#include <errno.h>
-/* #include <unistd.h> */
-
-extern char _end[];
-static char* brkpointer = _end;
-
-static void prints(char* s)
-{
-	for (;;)
-	{
-		char c = *s++;
-		if (!c)
-			break;
-		write(0, &c, 1);
-	}
-}
-
-static void printc(unsigned int n)
-{
-	char c;
-	
-	n &= 0xF;
-	if (n < 10)
-		c = n + '0';
-	else
-		c = n + 'A' - 10;
-	
-	write(0, &c, 1);
-}
-
-static void printh(unsigned int n)
-{
-	printc(n>>12);
-	printc(n>>8);
-	printc(n>>4);
-	printc(n);
-}
- 
-static void waitforkey(void)
-{
-	char c;
-	read(1, &c, 1);
-}
-
-int _brk(char* newend)
-{
-	char dummy;
-	
-	/* Ensure that newend is reasonable. */
-	
-	if ((newend < _end) || (newend > (&dummy - 256)))
-	{
-		prints("[brk to ");
-		printh((unsigned int) newend);
-		prints(" failed]\n\r");
-		waitforkey();
-		errno = ENOMEM;
-		return -1;
-	}
-	
-	prints("[brk to ");
-	printh((unsigned int) newend);
-	prints("]\n\r");
-	waitforkey();
-	brkpointer = newend;
-	return 0;
-}
-
-char* _sbrk(int delta)
-{
-	char* oldpointer = brkpointer;
-	prints("[sbrk delta ");
-	printh((unsigned int) delta);
-	prints(" from ");
-	printh((unsigned int) oldpointer);
-	prints("]\n\r");
-	printh((unsigned int) brkpointer);
-	prints(" ");
-	printh((unsigned int) _end);
-	if (_brk(oldpointer + delta) == -1)
-		return (char*)-1;
-	
-	return oldpointer;
-}

+ 4 - 0
plat/pc86/libsys/_sys_ioctl.c

@@ -1,3 +1,7 @@
+/* $Source$
+ * $State$
+ */
+
 #include <stdlib.h>
 #include <errno.h>
 #include <sgtty.h>

+ 1 - 0
plat/pc86/libsys/_sys_rawread.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 1 - 0
plat/pc86/libsys/_sys_rawwrite.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 5 - 0
plat/pc86/libsys/_sys_read.c

@@ -1,3 +1,8 @@
+/* $Source$
+ * $State$
+ * $Revision$
+ */
+
 #include <stdlib.h>
 #include <errno.h>
 #include <sgtty.h>

+ 5 - 0
plat/pc86/libsys/_sys_write.c

@@ -1,3 +1,8 @@
+/* $Source$
+ * $State$
+ * $Revision$
+ */
+
 #include <stdlib.h>
 #include <errno.h>
 #include <sgtty.h>

+ 1 - 0
plat/pc86/libsys/errno.s

@@ -1,6 +1,7 @@
 #
 ! $Source$
 ! $State$
+! $Revision$
 
 ! Declare segments (the order is important).
 

+ 5 - 0
plat/pc86/libsys/libsys.h

@@ -1,3 +1,8 @@
+/* $Source$
+ * $State$
+ * $Revision$
+ */
+
 #ifndef LIBSYS_H
 #define LIBSYS_H
 

+ 1 - 0
plat/pc86/libsys/pmfile

@@ -1,5 +1,6 @@
 -- $Source$
 -- $State$
+-- $Revision$
 
 local d = ROOTDIR.."plat/pc86/libsys/"
 

+ 1 - 0
plat/pc86/pmfile

@@ -1,5 +1,6 @@
 -- $Source$
 -- $State$
+-- $Revision$
 
 local d = ROOTDIR.."plat/pc86/"