checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 30 Jul 1998 17:25:26 +0200
changeset 3691 985cebf62d06
parent 3690 7b7c5ff84986
child 3692 0f0377cca3d6
checkin from browser
UnixOS.st
UnixOperatingSystem.st
--- a/UnixOS.st	Thu Jul 30 17:02:03 1998 +0200
+++ b/UnixOS.st	Thu Jul 30 17:25:26 1998 +0200
@@ -6600,24 +6600,24 @@
        This method is mainly provided to augment error reports with some system
        information. 
        (in case of system/version specific OS errors, conditional workarounds and patches
-	may be based upon this info).
+        may be based upon this info).
        Your application should NOT depend upon this in any way.
 
      The returned info may (or may not) contain:
-	#system -> some operating system identification (irix, Linux, nt, win32s ...) 
-	#version -> OS version (some os version identification)
-	#release -> OS release (3.5, 1.2.1 ...)
-	#node   -> some host identification (hostname)
-	#domain  -> domain name (hosts domain)
-	#machine -> type of machine (i586, mips ...)
+        #system -> some operating system identification (irix, Linux, nt, win32s ...) 
+        #version -> OS version (some os version identification)
+        #release -> OS release (3.5, 1.2.1 ...)
+        #node   -> some host identification (hostname)
+        #domain  -> domain name (hosts domain)
+        #machine -> type of machine (i586, mips ...)
      
      those are only returned on some machines (currently: linux):
         #freeMem -> amount of free memory
-	#sharedMem -> amount of memory which is shared among processes
-		      (i.e. shared code)
-	#bufferMem -> amount used for buffers
-	#swapSize -> total size of swap space
-	#freeSwap -> free amount in swapSpace
+        #sharedMem -> amount of memory which is shared among processes
+                      (i.e. shared code)
+        #bufferMem -> amount used for buffers
+        #swapSize -> total size of swap space
+        #freeSwap -> free amount in swapSpace
     "
 
     |sys node rel ver mach dom mtyp brel info arch
@@ -6632,11 +6632,11 @@
     struct sysinfo infoBuffer;
 
     if (sysinfo(&infoBuffer) >= 0) {
-	totalRam   = __MKUINT(infoBuffer.totalram);
-	sharedRam = __MKUINT(infoBuffer.sharedram);
-	bufferRam = __MKUINT(infoBuffer.bufferram);
-	swapSize  = __MKUINT(infoBuffer.totalswap);
-	freeSwap  = __MKUINT(infoBuffer.freeswap);
+        totalRam   = __MKUINT(infoBuffer.totalram);
+        sharedRam = __MKUINT(infoBuffer.sharedram);
+        bufferRam = __MKUINT(infoBuffer.bufferram);
+        swapSize  = __MKUINT(infoBuffer.totalswap);
+        freeSwap  = __MKUINT(infoBuffer.freeswap);
     }
 #endif /* LINUX */
 
@@ -6645,13 +6645,13 @@
         struct utsname ubuff;
 
         if (uname(&ubuff) >= 0) {
-	    sys  = __MKSTRING(ubuff.sysname);
-	    node = __MKSTRING(ubuff.nodename);
-	    rel  = __MKSTRING(ubuff.release);
-	    ver  = __MKSTRING(ubuff.version);
-	    mach = __MKSTRING(ubuff.machine);
+            sys  = __MKSTRING(ubuff.sysname);
+            node = __MKSTRING(ubuff.nodename);
+            rel  = __MKSTRING(ubuff.release);
+            ver  = __MKSTRING(ubuff.version);
+            mach = __MKSTRING(ubuff.machine);
 # ifdef HAS_UTS_DOMAINNAME
-	    dom  = __MKSTRING(ubuff.domainname);
+            dom  = __MKSTRING(ubuff.domainname);
 # endif /* no HAS_UTS_DOMAINNAME */
         }
     }
@@ -6665,39 +6665,39 @@
 
 #if defined(HAS_SYSINFO) && defined(SI_ARCHITECTURE)
     if (arch == nil) {
-	char buffer[128];
-
-	if (sysinfo(SI_ARCHITECTURE, buffer, sizeof(buffer))) {
-	    arch = __MKSTRING(buffer);
-	}
+        char buffer[128];
+
+        if (sysinfo(SI_ARCHITECTURE, buffer, sizeof(buffer))) {
+            arch = __MKSTRING(buffer);
+        }
     }
 #endif /* HAS_SYSINFO & SI_ARCHITECTURE */
 
 #if defined(HAS_GETDOMAINNAME)
     if (dom == nil) {
-	char buffer[128];
-
-	if (getdomainname(buffer, sizeof(buffer)) == 0) {
-	    dom = __MKSTRING(buffer);
-	}
+        char buffer[128];
+
+        if (getdomainname(buffer, sizeof(buffer)) == 0) {
+            dom = __MKSTRING(buffer);
+        }
     }
 #endif /* HAS_GETDOMAINNAME */
 
 %}.
     sys isNil ifTrue:[
-	sys := self getSystemType.
+        sys := self getSystemType.
     ].
     node isNil ifTrue:[
-	node := self getHostName.
+        node := self getHostName.
     ].
     dom isNil ifTrue:[
-	dom := self getDomainName.
+        dom := self getDomainName.
     ].
     mach isNil ifTrue:[
-	mach := self getCPUType.
+        mach := self getCPUType.
     ].
     arch isNil ifTrue:[
-	arch := 'unknown'.
+        arch := sys.
     ].
 
     info := IdentityDictionary new.
@@ -8621,6 +8621,6 @@
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/UnixOS.st,v 1.30 1998-07-30 15:02:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/UnixOS.st,v 1.31 1998-07-30 15:25:26 cg Exp $'
 ! !
 UnixOperatingSystem initialize!
--- a/UnixOperatingSystem.st	Thu Jul 30 17:02:03 1998 +0200
+++ b/UnixOperatingSystem.st	Thu Jul 30 17:25:26 1998 +0200
@@ -6600,24 +6600,24 @@
        This method is mainly provided to augment error reports with some system
        information. 
        (in case of system/version specific OS errors, conditional workarounds and patches
-	may be based upon this info).
+        may be based upon this info).
        Your application should NOT depend upon this in any way.
 
      The returned info may (or may not) contain:
-	#system -> some operating system identification (irix, Linux, nt, win32s ...) 
-	#version -> OS version (some os version identification)
-	#release -> OS release (3.5, 1.2.1 ...)
-	#node   -> some host identification (hostname)
-	#domain  -> domain name (hosts domain)
-	#machine -> type of machine (i586, mips ...)
+        #system -> some operating system identification (irix, Linux, nt, win32s ...) 
+        #version -> OS version (some os version identification)
+        #release -> OS release (3.5, 1.2.1 ...)
+        #node   -> some host identification (hostname)
+        #domain  -> domain name (hosts domain)
+        #machine -> type of machine (i586, mips ...)
      
      those are only returned on some machines (currently: linux):
         #freeMem -> amount of free memory
-	#sharedMem -> amount of memory which is shared among processes
-		      (i.e. shared code)
-	#bufferMem -> amount used for buffers
-	#swapSize -> total size of swap space
-	#freeSwap -> free amount in swapSpace
+        #sharedMem -> amount of memory which is shared among processes
+                      (i.e. shared code)
+        #bufferMem -> amount used for buffers
+        #swapSize -> total size of swap space
+        #freeSwap -> free amount in swapSpace
     "
 
     |sys node rel ver mach dom mtyp brel info arch
@@ -6632,11 +6632,11 @@
     struct sysinfo infoBuffer;
 
     if (sysinfo(&infoBuffer) >= 0) {
-	totalRam   = __MKUINT(infoBuffer.totalram);
-	sharedRam = __MKUINT(infoBuffer.sharedram);
-	bufferRam = __MKUINT(infoBuffer.bufferram);
-	swapSize  = __MKUINT(infoBuffer.totalswap);
-	freeSwap  = __MKUINT(infoBuffer.freeswap);
+        totalRam   = __MKUINT(infoBuffer.totalram);
+        sharedRam = __MKUINT(infoBuffer.sharedram);
+        bufferRam = __MKUINT(infoBuffer.bufferram);
+        swapSize  = __MKUINT(infoBuffer.totalswap);
+        freeSwap  = __MKUINT(infoBuffer.freeswap);
     }
 #endif /* LINUX */
 
@@ -6645,13 +6645,13 @@
         struct utsname ubuff;
 
         if (uname(&ubuff) >= 0) {
-	    sys  = __MKSTRING(ubuff.sysname);
-	    node = __MKSTRING(ubuff.nodename);
-	    rel  = __MKSTRING(ubuff.release);
-	    ver  = __MKSTRING(ubuff.version);
-	    mach = __MKSTRING(ubuff.machine);
+            sys  = __MKSTRING(ubuff.sysname);
+            node = __MKSTRING(ubuff.nodename);
+            rel  = __MKSTRING(ubuff.release);
+            ver  = __MKSTRING(ubuff.version);
+            mach = __MKSTRING(ubuff.machine);
 # ifdef HAS_UTS_DOMAINNAME
-	    dom  = __MKSTRING(ubuff.domainname);
+            dom  = __MKSTRING(ubuff.domainname);
 # endif /* no HAS_UTS_DOMAINNAME */
         }
     }
@@ -6665,39 +6665,39 @@
 
 #if defined(HAS_SYSINFO) && defined(SI_ARCHITECTURE)
     if (arch == nil) {
-	char buffer[128];
-
-	if (sysinfo(SI_ARCHITECTURE, buffer, sizeof(buffer))) {
-	    arch = __MKSTRING(buffer);
-	}
+        char buffer[128];
+
+        if (sysinfo(SI_ARCHITECTURE, buffer, sizeof(buffer))) {
+            arch = __MKSTRING(buffer);
+        }
     }
 #endif /* HAS_SYSINFO & SI_ARCHITECTURE */
 
 #if defined(HAS_GETDOMAINNAME)
     if (dom == nil) {
-	char buffer[128];
-
-	if (getdomainname(buffer, sizeof(buffer)) == 0) {
-	    dom = __MKSTRING(buffer);
-	}
+        char buffer[128];
+
+        if (getdomainname(buffer, sizeof(buffer)) == 0) {
+            dom = __MKSTRING(buffer);
+        }
     }
 #endif /* HAS_GETDOMAINNAME */
 
 %}.
     sys isNil ifTrue:[
-	sys := self getSystemType.
+        sys := self getSystemType.
     ].
     node isNil ifTrue:[
-	node := self getHostName.
+        node := self getHostName.
     ].
     dom isNil ifTrue:[
-	dom := self getDomainName.
+        dom := self getDomainName.
     ].
     mach isNil ifTrue:[
-	mach := self getCPUType.
+        mach := self getCPUType.
     ].
     arch isNil ifTrue:[
-	arch := 'unknown'.
+        arch := sys.
     ].
 
     info := IdentityDictionary new.
@@ -8621,6 +8621,6 @@
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.30 1998-07-30 15:02:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.31 1998-07-30 15:25:26 cg Exp $'
 ! !
 UnixOperatingSystem initialize!