UnixOperatingSystem.st
changeset 5460 bf02ab313db2
parent 5451 2e21cd54b656
child 5462 1e927c58c446
--- a/UnixOperatingSystem.st	Wed Jul 12 01:07:28 2000 +0200
+++ b/UnixOperatingSystem.st	Wed Jul 12 14:13:58 2000 +0200
@@ -19,15 +19,15 @@
 	category:'OS-Unix'
 !
 
-Object subclass:#OSProcessStatus
-	instanceVariableNames:'pid status code core'
+Object subclass:#FileStatusInfo
+	instanceVariableNames:'type mode uid gid size id accessed modified statusChanged path'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:UnixOperatingSystem
 !
 
-Object subclass:#FileStatusInfo
-	instanceVariableNames:'type mode uid gid size id accessed modified statusChanged path'
+Object subclass:#OSProcessStatus
+	instanceVariableNames:'pid status code core'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:UnixOperatingSystem
@@ -6972,23 +6972,31 @@
 %{  /* NOCONTEXT */
  
     /*
-     * TODO: newer systems provide a query function for this ... use it
+     * TODO: new systems provide a query function for this ... use it
      */
-#   if defined(BSD) || defined(SYSV4) || defined(LONGFILENAMES)
-     RETURN ( __MKSMALLINT(255) );
-#   endif
-
-#   ifdef realIX
-      RETURN ( __MKSMALLINT(127) );
-#   endif
-
-#   ifdef SYSV
-      RETURN ( __MKSMALLINT(14) );
+#   if defined(MAXFILENAMELEN)
+      RETURN ( __MKSMALLINT(MAXFILENAMELEN) );
+#   else
+#    if defined(BSD) || defined(SYSV4) || defined(LONGFILENAMES)
+      RETURN ( __MKSMALLINT(255) );
+#    endif
+
+#    ifdef realIX
+       RETURN ( __MKSMALLINT(127) );
+#    endif
+
+#    ifdef SYSV
+       RETURN ( __MKSMALLINT(14) );
+#    endif
 #   endif
 %}.
     "unix default"
 
     ^ 14
+
+    "
+     OperatingSystem maxFileNameLength
+    "
 !
 
 maxPathLength
@@ -8685,6 +8693,130 @@
     ^ self primitiveFailed
 ! !
 
+!UnixOperatingSystem::FileStatusInfo class methodsFor:'instance creation'!
+
+type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP
+    ^ self basicNew
+        type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP 
+! !
+
+!UnixOperatingSystem::FileStatusInfo methodsFor:'accessing'!
+
+accessed
+    "return accessed"
+
+    ^ accessed!
+
+alternativeName
+    "return the files other name (DOS name on windows).
+     Nil if there is no other name"
+
+    ^ nil
+!
+
+fixedHeaderSize
+    "return the fixedHeaderSize (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
+gid
+    "return gid"
+
+    ^ gid!
+
+id
+    "return id"
+
+    ^ id!
+
+mode
+    "return mode"
+
+    ^ mode!
+
+modified
+    "return modified"
+
+    ^ modified!
+
+path
+    "for symbolic links only: return the path where the symbolic link points to"
+
+    ^ path
+
+!
+
+recordAttributes
+    "return the recordAttributes (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
+recordFormat
+    "return the recordFormat (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
+recordFormatNumeric
+    "return the recordFormat as numeric (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
+recordSize
+    "return the recordSize (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
+size
+    "return size"
+
+    ^ size!
+
+statusChanged
+    "return statusChanged"
+
+    ^ statusChanged!
+
+type
+    "return type"
+
+    ^ type!
+
+uid
+    "return uid"
+
+    ^ uid
+! !
+
+!UnixOperatingSystem::FileStatusInfo methodsFor:'backward compatibility'!
+
+at:key
+    "backward compatibility access: in previous releases, IdentityDictionaries
+     were used to hold my information. Allow access via key messages.
+     This method will vanish - use the proper access protocol."
+
+    ^ self perform:key
+! !
+
+!UnixOperatingSystem::FileStatusInfo methodsFor:'private accessing'!
+
+type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP
+    type := t.
+    mode := m.
+    uid := u.
+    gid := g.
+    size := s.
+    id := i.
+    accessed := aT.
+    modified := mT.
+    statusChanged := sT.
+    path := lP.
+! !
+
 !UnixOperatingSystem::OSProcessStatus class methodsFor:'documentation'!
 
 documentation
@@ -8843,133 +8975,9 @@
     "Modified: 28.12.1995 / 14:13:41 / stefan"
 ! !
 
-!UnixOperatingSystem::FileStatusInfo class methodsFor:'instance creation'!
-
-type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP
-    ^ self basicNew
-        type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP 
-! !
-
-!UnixOperatingSystem::FileStatusInfo methodsFor:'accessing'!
-
-accessed
-    "return accessed"
-
-    ^ accessed!
-
-alternativeName
-    "return the files other name (DOS name on windows).
-     Nil if there is no other name"
-
-    ^ nil
-!
-
-fixedHeaderSize
-    "return the fixedHeaderSize (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
-gid
-    "return gid"
-
-    ^ gid!
-
-id
-    "return id"
-
-    ^ id!
-
-mode
-    "return mode"
-
-    ^ mode!
-
-modified
-    "return modified"
-
-    ^ modified!
-
-path
-    "for symbolic links only: return the path where the symbolic link points to"
-
-    ^ path
-
-!
-
-recordAttributes
-    "return the recordAttributes (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
-recordFormat
-    "return the recordFormat (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
-recordFormatNumeric
-    "return the recordFormat as numeric (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
-recordSize
-    "return the recordSize (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
-size
-    "return size"
-
-    ^ size!
-
-statusChanged
-    "return statusChanged"
-
-    ^ statusChanged!
-
-type
-    "return type"
-
-    ^ type!
-
-uid
-    "return uid"
-
-    ^ uid
-! !
-
-!UnixOperatingSystem::FileStatusInfo methodsFor:'backward compatibility'!
-
-at:key
-    "backward compatibility access: in previous releases, IdentityDictionaries
-     were used to hold my information. Allow access via key messages.
-     This method will vanish - use the proper access protocol."
-
-    ^ self perform:key
-! !
-
-!UnixOperatingSystem::FileStatusInfo methodsFor:'private accessing'!
-
-type:t mode:m uid:u gid:g size:s id:i accessed:aT modified:mT statusChanged:sT path:lP
-    type := t.
-    mode := m.
-    uid := u.
-    gid := g.
-    size := s.
-    id := i.
-    accessed := aT.
-    modified := mT.
-    statusChanged := sT.
-    path := lP.
-! !
-
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.86 2000-07-07 14:33:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.87 2000-07-12 12:13:58 cg Exp $'
 ! !
 UnixOperatingSystem initialize!