*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 21 Dec 1998 12:43:34 +0100
changeset 3946 bdb1c55980c1
parent 3945 1745e97364cb
child 3947 2bebbaee8af8
*** empty log message ***
Win32OS.st
Win32OperatingSystem.st
--- a/Win32OS.st	Wed Dec 16 18:56:05 1998 +0100
+++ b/Win32OS.st	Mon Dec 21 12:43:34 1998 +0100
@@ -37,7 +37,6 @@
 
 # define WRAP_STDIO
 
-#if defined(MSWINDOWS) || defined(OS2) || defined(MSDOS) || defined(WIN32)
 # ifndef MSDOS_LIKE
 #  define MSDOS_LIKE
 # endif
@@ -47,7 +46,6 @@
 #   define _X86_
 #  endif
 # endif
-#endif /* any MS-non-OS */
 
 /*
  * notice: although many systems' include files
@@ -116,16 +114,16 @@
 #  undef Context
 
 #  include <stdarg.h> /* */
-#  if defined(__BORLANDC__)
-#   include <windows.h>
-#  else
-#   include <windows.h>
-#  define stat _stat
-#undef chmod
-#undef access
-#  define chmod _chmod
-#  define access _access
-#define MAXFILELEN 256
+#  include <windows.h>
+
+#  if !defined(__BORLANDC__)
+#   undef stat
+#   define stat _stat
+#   undef chmod
+#   define chmod _chmod
+#   undef access
+#   define access _access
+#   define MAXFILELEN 256
 #  endif
 
 #  ifdef __DEF_Array
@@ -2400,51 +2398,51 @@
     "Internal lowLevel entry for combined fork & exec for WIN32
 
      If fork is false (chain a command):
-         execute the OS command specified by the argument, aCommandPath, with
-         arguments in argArray (no arguments, if nil).
-         If successful, this method does not return and smalltalk is gone.
-         If not successful, it does return.
-         Normal use is with forkForCommand.
+	 execute the OS command specified by the argument, aCommandPath, with
+	 arguments in argArray (no arguments, if nil).
+	 If successful, this method does not return and smalltalk is gone.
+	 If not successful, it does return.
+	 Normal use is with forkForCommand.
 
      If fork is true (subprocess command execution):
-        fork a child to do the above.
-        The process id of the child process is returned; nil if the fork failed.
+	fork a child to do the above.
+	The process id of the child process is returned; nil if the fork failed.
 
      fdArray contains the filedescriptors, to be used for the child (if fork is true).
-        fdArray[1] = 15 -> use fd 15 as stdin.
-        If an element of the array is set to nil, the corresponding filedescriptor
-        will be closed for the child.
-        fdArray[0] == StdIn for child
-        fdArray[1] == StdOut for child
-        fdArray[2] == StdErr for child
-        on VMS, these must be channels as returned by createMailBox.
+	fdArray[1] = 15 -> use fd 15 as stdin.
+	If an element of the array is set to nil, the corresponding filedescriptor
+	will be closed for the child.
+	fdArray[0] == StdIn for child
+	fdArray[1] == StdOut for child
+	fdArray[2] == StdErr for child
+	on VMS, these must be channels as returned by createMailBox.
 
      closeFdArray contains descriptors that will be closed in the subprocess.
-        closeDescriptors are ignored in the WIN32 & VMS versions.
+	closeDescriptors are ignored in the WIN32 & VMS versions.
 
      NOTE that in WIN32 the fds are HANDLES!!
 
      If newPgrp is true, the subprocess will be established in a new process group.
-        The processgroup will be equal to id.
-        newPgrp is not used on WIN32 and VMS systems."
+	The processgroup will be equal to id.
+	newPgrp is not used on WIN32 and VMS systems."
 
     |path|
 
     aDirectory notNil ifTrue:[
-        path := aDirectory asFilename asAbsoluteFilename osNameForDirectory.
-        (path endsWith:':') ifTrue:[
-            path := path , '\'.
-        ].
+	path := aDirectory asFilename asAbsoluteFilename osNameForDirectory.
+	(path endsWith:':') ifTrue:[
+	    path := path , '\'.
+	].
     ].
 
     ^ self 
-        primExec:aCommandPath 
-        withArguments:argArray 
-        fileDescriptors:fdArray 
-        closeDescriptors:closeFdArray 
-        fork:doFork 
-        newPgrp:newPgrp 
-        inPath:path
+	primExec:aCommandPath 
+	withArguments:argArray 
+	fileDescriptors:fdArray 
+	closeDescriptors:closeFdArray 
+	fork:doFork 
+	newPgrp:newPgrp 
+	inPath:path
 
     "Modified: / 31.1.1998 / 10:54:24 / md"
     "Modified: / 10.11.1998 / 20:44:24 / cg"
@@ -2715,24 +2713,24 @@
     |in out err shellAndArgs|
 
     anExternalInStream notNil ifTrue:[
-        in := anExternalInStream fileDescriptor.
+	in := anExternalInStream fileDescriptor.
     ].
     anExternalOutStream notNil ifTrue:[
-        out := anExternalOutStream fileDescriptor.
+	out := anExternalOutStream fileDescriptor.
     ].
     anExternalErrStream notNil ifTrue:[
-        err := anExternalErrStream fileDescriptor.
+	err := anExternalErrStream fileDescriptor.
     ].
 
     shellAndArgs := self commandAndArgsForOSCommand:aCommandString.
     ^ self
-        exec:(shellAndArgs at:1)
-        withArguments:(shellAndArgs at:2)
-        fileDescriptors:(Array with:in with:out with:err)
-        closeDescriptors:nil
-        fork:true
-        newPgrp:false
-        inDirectory:dirOrNil
+	exec:(shellAndArgs at:1)
+	withArguments:(shellAndArgs at:2)
+	fileDescriptors:(Array with:in with:out with:err)
+	closeDescriptors:nil
+	fork:true
+	newPgrp:false
+	inDirectory:dirOrNil
 
     "Modified: / 10.11.1998 / 20:43:12 / cg"
     "Created: / 10.11.1998 / 20:48:35 / cg"
@@ -6653,6 +6651,6 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Win32OS.st,v 1.35 1998-11-11 15:09:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Win32OS.st,v 1.36 1998-12-21 11:43:34 cg Exp $'
 ! !
 Win32OperatingSystem initialize!
--- a/Win32OperatingSystem.st	Wed Dec 16 18:56:05 1998 +0100
+++ b/Win32OperatingSystem.st	Mon Dec 21 12:43:34 1998 +0100
@@ -37,7 +37,6 @@
 
 # define WRAP_STDIO
 
-#if defined(MSWINDOWS) || defined(OS2) || defined(MSDOS) || defined(WIN32)
 # ifndef MSDOS_LIKE
 #  define MSDOS_LIKE
 # endif
@@ -47,7 +46,6 @@
 #   define _X86_
 #  endif
 # endif
-#endif /* any MS-non-OS */
 
 /*
  * notice: although many systems' include files
@@ -116,16 +114,16 @@
 #  undef Context
 
 #  include <stdarg.h> /* */
-#  if defined(__BORLANDC__)
-#   include <windows.h>
-#  else
-#   include <windows.h>
-#  define stat _stat
-#undef chmod
-#undef access
-#  define chmod _chmod
-#  define access _access
-#define MAXFILELEN 256
+#  include <windows.h>
+
+#  if !defined(__BORLANDC__)
+#   undef stat
+#   define stat _stat
+#   undef chmod
+#   define chmod _chmod
+#   undef access
+#   define access _access
+#   define MAXFILELEN 256
 #  endif
 
 #  ifdef __DEF_Array
@@ -2400,51 +2398,51 @@
     "Internal lowLevel entry for combined fork & exec for WIN32
 
      If fork is false (chain a command):
-         execute the OS command specified by the argument, aCommandPath, with
-         arguments in argArray (no arguments, if nil).
-         If successful, this method does not return and smalltalk is gone.
-         If not successful, it does return.
-         Normal use is with forkForCommand.
+	 execute the OS command specified by the argument, aCommandPath, with
+	 arguments in argArray (no arguments, if nil).
+	 If successful, this method does not return and smalltalk is gone.
+	 If not successful, it does return.
+	 Normal use is with forkForCommand.
 
      If fork is true (subprocess command execution):
-        fork a child to do the above.
-        The process id of the child process is returned; nil if the fork failed.
+	fork a child to do the above.
+	The process id of the child process is returned; nil if the fork failed.
 
      fdArray contains the filedescriptors, to be used for the child (if fork is true).
-        fdArray[1] = 15 -> use fd 15 as stdin.
-        If an element of the array is set to nil, the corresponding filedescriptor
-        will be closed for the child.
-        fdArray[0] == StdIn for child
-        fdArray[1] == StdOut for child
-        fdArray[2] == StdErr for child
-        on VMS, these must be channels as returned by createMailBox.
+	fdArray[1] = 15 -> use fd 15 as stdin.
+	If an element of the array is set to nil, the corresponding filedescriptor
+	will be closed for the child.
+	fdArray[0] == StdIn for child
+	fdArray[1] == StdOut for child
+	fdArray[2] == StdErr for child
+	on VMS, these must be channels as returned by createMailBox.
 
      closeFdArray contains descriptors that will be closed in the subprocess.
-        closeDescriptors are ignored in the WIN32 & VMS versions.
+	closeDescriptors are ignored in the WIN32 & VMS versions.
 
      NOTE that in WIN32 the fds are HANDLES!!
 
      If newPgrp is true, the subprocess will be established in a new process group.
-        The processgroup will be equal to id.
-        newPgrp is not used on WIN32 and VMS systems."
+	The processgroup will be equal to id.
+	newPgrp is not used on WIN32 and VMS systems."
 
     |path|
 
     aDirectory notNil ifTrue:[
-        path := aDirectory asFilename asAbsoluteFilename osNameForDirectory.
-        (path endsWith:':') ifTrue:[
-            path := path , '\'.
-        ].
+	path := aDirectory asFilename asAbsoluteFilename osNameForDirectory.
+	(path endsWith:':') ifTrue:[
+	    path := path , '\'.
+	].
     ].
 
     ^ self 
-        primExec:aCommandPath 
-        withArguments:argArray 
-        fileDescriptors:fdArray 
-        closeDescriptors:closeFdArray 
-        fork:doFork 
-        newPgrp:newPgrp 
-        inPath:path
+	primExec:aCommandPath 
+	withArguments:argArray 
+	fileDescriptors:fdArray 
+	closeDescriptors:closeFdArray 
+	fork:doFork 
+	newPgrp:newPgrp 
+	inPath:path
 
     "Modified: / 31.1.1998 / 10:54:24 / md"
     "Modified: / 10.11.1998 / 20:44:24 / cg"
@@ -2715,24 +2713,24 @@
     |in out err shellAndArgs|
 
     anExternalInStream notNil ifTrue:[
-        in := anExternalInStream fileDescriptor.
+	in := anExternalInStream fileDescriptor.
     ].
     anExternalOutStream notNil ifTrue:[
-        out := anExternalOutStream fileDescriptor.
+	out := anExternalOutStream fileDescriptor.
     ].
     anExternalErrStream notNil ifTrue:[
-        err := anExternalErrStream fileDescriptor.
+	err := anExternalErrStream fileDescriptor.
     ].
 
     shellAndArgs := self commandAndArgsForOSCommand:aCommandString.
     ^ self
-        exec:(shellAndArgs at:1)
-        withArguments:(shellAndArgs at:2)
-        fileDescriptors:(Array with:in with:out with:err)
-        closeDescriptors:nil
-        fork:true
-        newPgrp:false
-        inDirectory:dirOrNil
+	exec:(shellAndArgs at:1)
+	withArguments:(shellAndArgs at:2)
+	fileDescriptors:(Array with:in with:out with:err)
+	closeDescriptors:nil
+	fork:true
+	newPgrp:false
+	inDirectory:dirOrNil
 
     "Modified: / 10.11.1998 / 20:43:12 / cg"
     "Created: / 10.11.1998 / 20:48:35 / cg"
@@ -6653,6 +6651,6 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.35 1998-11-11 15:09:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.36 1998-12-21 11:43:34 cg Exp $'
 ! !
 Win32OperatingSystem initialize!