.
--- a/DirStr.st Sat Sep 16 19:14:32 1995 +0200
+++ b/DirStr.st Sun Sep 17 19:57:55 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.22 1995-09-16 17:13:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.23 1995-09-17 17:56:01 claus Exp $
'!
!DirectoryStream class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.22 1995-09-16 17:13:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.23 1995-09-17 17:56:01 claus Exp $
"
!
@@ -73,7 +73,9 @@
# ifdef NEXT
# include <sys/dir.h>
# else
-# include <dirent.h>
+# ifndef VMS
+# include <dirent.h>
+# endif /* not VMS */
# endif
# endif
#endif
@@ -88,6 +90,285 @@
%}
! !
+!DirectoryStream primitiveFunctions!
+
+%{
+#ifdef VMS
+
+/*
+** VMS readdir() routines.
+** Written by Rich $alz, <rsalz@bbn.com> in August, 1990.
+** This code has no copyright.
+*/
+
+/* 12-NOV-1990 added d_namlen field and special case "." name -GJC@MITECH.COM
+ */
+
+#ifndef _STDIO_H_INCLUDED_
+# include <stdio.h>
+# define _STDIO_H_INCLUDED_
+#endif
+
+#ifndef _CTYPE_H_INCLUDED_
+# include <ctype.h>
+# define _CTYPE_H_INCLUDED_
+#endif
+
+#ifndef _ERRNO_H_INCLUDED_
+# include <errno.h>
+# define _ERRNO_H_INCLUDED_
+#endif
+
+#ifndef _DESCRIP_H_INCLUDED_
+# include <descrip.h>
+# define _DESCRIP_H_INCLUDED_
+#endif
+
+#ifndef _RMSDEF_H_INCLUDED_
+# include <rmsdef.h>
+# define _RMSDEF_H_INCLUDED_
+#endif
+
+/*
+ * actually, the following has to go into dirent.h ...
+ */
+/* BEGIN dirent.h
+ *
+** Header file for VMS readdir() routines.
+** Written by Rich $alz, <rsalz@bbn.com> in August, 1990.
+** This code has no copyright.
+**
+** You must #include <descrip.h> before this file.
+*/
+
+/* 12-NOV-1990 added d_namlen field -GJC@MITECH.COM */
+
+ /* Data structure returned by READDIR(). */
+struct dirent {
+ char d_name[100]; /* File name */
+ int d_namlen;
+ int vms_verscount; /* Number of versions */
+ int vms_versions[20]; /* Version numbers */
+};
+
+ /* Handle returned by opendir(), used by the other routines. You
+ * are not supposed to care what's inside this structure. */
+typedef struct _dirdesc {
+ long context;
+ int vms_wantversions;
+ char *pattern;
+ struct dirent entry;
+ struct dsc$descriptor_s pat;
+} DIR;
+
+
+#define rewinddir(dirp) seekdir((dirp), 0L)
+
+
+extern DIR *opendir();
+extern struct dirent *readdir();
+extern long telldir();
+extern void seekdir();
+extern void closedir();
+extern void vmsreaddirversions();
+#define _DIRENT_H_INCLUDED_
+/*
+ * END dirent.h
+ */
+
+
+ /* Number of elements in vms_versions array */
+#define VERSIZE(e) (sizeof e->vms_versions / sizeof e->vms_versions[0])
+
+ /* Linked in later. */
+extern char *strrchr();
+extern char *strcpy();
+/* Don't need this when all these programs are lumped together. RLD
+extern char *malloc();
+*/
+
+/*
+** Open a directory, return a handle for later use.
+*/
+DIR *
+opendir(name)
+ char *name;
+{
+ DIR *dd;
+
+ /* Get memory for the handle, and the pattern. */
+ if ((dd = (DIR *)malloc(sizeof *dd)) == NULL) {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ if (strcmp(".",name) == 0) name = "";
+
+ dd->pattern = malloc((unsigned int)(strlen(name) + sizeof "*.*" + 1));
+ if (dd->pattern == NULL) {
+ free((char *)dd);
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ /* Fill in the fields; mainly playing with the descriptor. */
+ (void)sprintf(dd->pattern, "%s*.*", name);
+ dd->context = 0;
+ dd->vms_wantversions = 0;
+ dd->pat.dsc$a_pointer = dd->pattern;
+ dd->pat.dsc$w_length = strlen(dd->pattern);
+ dd->pat.dsc$b_dtype = DSC$K_DTYPE_T;
+ dd->pat.dsc$b_class = DSC$K_CLASS_S;
+
+ return dd;
+}
+
+/*
+** Set the flag to indicate we want versions or not.
+*/
+void
+vmsreaddirversions(dd, flag)
+ DIR *dd;
+ int flag;
+{
+ dd->vms_wantversions = flag;
+}
+
+/*
+** Free up an opened directory.
+*/
+void
+closedir(dd)
+ DIR *dd;
+{
+ free(dd->pattern);
+ free((char *)dd);
+}
+
+/*
+** Collect all the version numbers for the current file.
+*/
+static void
+collectversions(dd)
+ DIR *dd;
+{
+ struct dsc$descriptor_s pat;
+ struct dsc$descriptor_s res;
+ struct dirent *e;
+ char *p;
+ char buff[sizeof dd->entry.d_name];
+ int i;
+ char *text;
+ long context;
+
+ /* Convenient shorthand. */
+ e = &dd->entry;
+
+ /* Add the version wildcard, ignoring the "*.*" put on before */
+ i = strlen(dd->pattern);
+ text = malloc((unsigned int)(i + strlen(e->d_name)+ 2 + 1));
+ if (text == NULL)
+ return;
+ (void)strcpy(text, dd->pattern);
+ (void)sprintf(&text[i - 3], "%s;*", e->d_name);
+
+ /* Set up the pattern descriptor. */
+ pat.dsc$a_pointer = text;
+ pat.dsc$w_length = strlen(text);
+ pat.dsc$b_dtype = DSC$K_DTYPE_T;
+ pat.dsc$b_class = DSC$K_CLASS_S;
+
+ /* Set up result descriptor. */
+ res.dsc$a_pointer = buff;
+ res.dsc$w_length = sizeof buff - 2;
+ res.dsc$b_dtype = DSC$K_DTYPE_T;
+ res.dsc$b_class = DSC$K_CLASS_S;
+
+ /* Read files, collecting versions. */
+ for (context = 0; e->vms_verscount < VERSIZE(e); e->vms_verscount++) {
+ if (lib$find_file(&pat, &res, &context) == RMS$_NMF || context == 0)
+ break;
+ buff[sizeof buff - 1] = '\0';
+ if (p = strchr(buff, ';'))
+ e->vms_versions[e->vms_verscount] = atoi(p + 1);
+ else
+ e->vms_versions[e->vms_verscount] = -1;
+ }
+
+ free(text);
+}
+
+/*
+** Read the next entry from the directory.
+*/
+struct dirent *
+readdir(dd)
+ DIR *dd;
+{
+ struct dsc$descriptor_s res;
+ char *p;
+ char buff[sizeof dd->entry.d_name];
+ int i;
+
+ /* Set up result descriptor, and get next file. */
+ res.dsc$a_pointer = buff;
+ res.dsc$w_length = sizeof buff - 2;
+ res.dsc$b_dtype = DSC$K_DTYPE_T;
+ res.dsc$b_class = DSC$K_CLASS_S;
+ if (lib$find_file(&dd->pat, &res, &dd->context) == RMS$_NMF
+ || dd->context == 0L)
+ /* None left... */
+ return NULL;
+
+ /* Force the buffer to end with a NUL. */
+ buff[sizeof buff - 1] = '\0';
+ for (p = buff; !isspace(*p); p++)
+ ;
+ *p = '\0';
+
+ /* Skip any directory component and just copy the name. */
+ if (p = strchr(buff, ']'))
+ (void)strcpy(dd->entry.d_name, p + 1);
+ else
+ (void)strcpy(dd->entry.d_name, buff);
+
+ /* Clobber the version. */
+ if (p = strchr(dd->entry.d_name, ';'))
+ *p = '\0';
+
+ dd->entry.d_namlen = strlen(dd->entry.d_name);
+
+ dd->entry.vms_verscount = 0;
+ if (dd->vms_wantversions)
+ collectversions(dd);
+ return &dd->entry;
+}
+
+/*
+** Return something that can be used in a seekdir later.
+*/
+long
+telldir(dd)
+ DIR *dd;
+{
+ return dd->context;
+}
+
+/*
+** Return to a spot where we used to be.
+*/
+void
+seekdir(dd, pos)
+ DIR *dd;
+ long pos;
+{
+ dd->context = pos;
+}
+
+#endif /* VMS */
+%}
+! !
+
!DirectoryStream methodsFor:'instance release'!
closeFile
--- a/DirectoryStream.st Sat Sep 16 19:14:32 1995 +0200
+++ b/DirectoryStream.st Sun Sep 17 19:57:55 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.22 1995-09-16 17:13:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.23 1995-09-17 17:56:01 claus Exp $
'!
!DirectoryStream class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.22 1995-09-16 17:13:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.23 1995-09-17 17:56:01 claus Exp $
"
!
@@ -73,7 +73,9 @@
# ifdef NEXT
# include <sys/dir.h>
# else
-# include <dirent.h>
+# ifndef VMS
+# include <dirent.h>
+# endif /* not VMS */
# endif
# endif
#endif
@@ -88,6 +90,285 @@
%}
! !
+!DirectoryStream primitiveFunctions!
+
+%{
+#ifdef VMS
+
+/*
+** VMS readdir() routines.
+** Written by Rich $alz, <rsalz@bbn.com> in August, 1990.
+** This code has no copyright.
+*/
+
+/* 12-NOV-1990 added d_namlen field and special case "." name -GJC@MITECH.COM
+ */
+
+#ifndef _STDIO_H_INCLUDED_
+# include <stdio.h>
+# define _STDIO_H_INCLUDED_
+#endif
+
+#ifndef _CTYPE_H_INCLUDED_
+# include <ctype.h>
+# define _CTYPE_H_INCLUDED_
+#endif
+
+#ifndef _ERRNO_H_INCLUDED_
+# include <errno.h>
+# define _ERRNO_H_INCLUDED_
+#endif
+
+#ifndef _DESCRIP_H_INCLUDED_
+# include <descrip.h>
+# define _DESCRIP_H_INCLUDED_
+#endif
+
+#ifndef _RMSDEF_H_INCLUDED_
+# include <rmsdef.h>
+# define _RMSDEF_H_INCLUDED_
+#endif
+
+/*
+ * actually, the following has to go into dirent.h ...
+ */
+/* BEGIN dirent.h
+ *
+** Header file for VMS readdir() routines.
+** Written by Rich $alz, <rsalz@bbn.com> in August, 1990.
+** This code has no copyright.
+**
+** You must #include <descrip.h> before this file.
+*/
+
+/* 12-NOV-1990 added d_namlen field -GJC@MITECH.COM */
+
+ /* Data structure returned by READDIR(). */
+struct dirent {
+ char d_name[100]; /* File name */
+ int d_namlen;
+ int vms_verscount; /* Number of versions */
+ int vms_versions[20]; /* Version numbers */
+};
+
+ /* Handle returned by opendir(), used by the other routines. You
+ * are not supposed to care what's inside this structure. */
+typedef struct _dirdesc {
+ long context;
+ int vms_wantversions;
+ char *pattern;
+ struct dirent entry;
+ struct dsc$descriptor_s pat;
+} DIR;
+
+
+#define rewinddir(dirp) seekdir((dirp), 0L)
+
+
+extern DIR *opendir();
+extern struct dirent *readdir();
+extern long telldir();
+extern void seekdir();
+extern void closedir();
+extern void vmsreaddirversions();
+#define _DIRENT_H_INCLUDED_
+/*
+ * END dirent.h
+ */
+
+
+ /* Number of elements in vms_versions array */
+#define VERSIZE(e) (sizeof e->vms_versions / sizeof e->vms_versions[0])
+
+ /* Linked in later. */
+extern char *strrchr();
+extern char *strcpy();
+/* Don't need this when all these programs are lumped together. RLD
+extern char *malloc();
+*/
+
+/*
+** Open a directory, return a handle for later use.
+*/
+DIR *
+opendir(name)
+ char *name;
+{
+ DIR *dd;
+
+ /* Get memory for the handle, and the pattern. */
+ if ((dd = (DIR *)malloc(sizeof *dd)) == NULL) {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ if (strcmp(".",name) == 0) name = "";
+
+ dd->pattern = malloc((unsigned int)(strlen(name) + sizeof "*.*" + 1));
+ if (dd->pattern == NULL) {
+ free((char *)dd);
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ /* Fill in the fields; mainly playing with the descriptor. */
+ (void)sprintf(dd->pattern, "%s*.*", name);
+ dd->context = 0;
+ dd->vms_wantversions = 0;
+ dd->pat.dsc$a_pointer = dd->pattern;
+ dd->pat.dsc$w_length = strlen(dd->pattern);
+ dd->pat.dsc$b_dtype = DSC$K_DTYPE_T;
+ dd->pat.dsc$b_class = DSC$K_CLASS_S;
+
+ return dd;
+}
+
+/*
+** Set the flag to indicate we want versions or not.
+*/
+void
+vmsreaddirversions(dd, flag)
+ DIR *dd;
+ int flag;
+{
+ dd->vms_wantversions = flag;
+}
+
+/*
+** Free up an opened directory.
+*/
+void
+closedir(dd)
+ DIR *dd;
+{
+ free(dd->pattern);
+ free((char *)dd);
+}
+
+/*
+** Collect all the version numbers for the current file.
+*/
+static void
+collectversions(dd)
+ DIR *dd;
+{
+ struct dsc$descriptor_s pat;
+ struct dsc$descriptor_s res;
+ struct dirent *e;
+ char *p;
+ char buff[sizeof dd->entry.d_name];
+ int i;
+ char *text;
+ long context;
+
+ /* Convenient shorthand. */
+ e = &dd->entry;
+
+ /* Add the version wildcard, ignoring the "*.*" put on before */
+ i = strlen(dd->pattern);
+ text = malloc((unsigned int)(i + strlen(e->d_name)+ 2 + 1));
+ if (text == NULL)
+ return;
+ (void)strcpy(text, dd->pattern);
+ (void)sprintf(&text[i - 3], "%s;*", e->d_name);
+
+ /* Set up the pattern descriptor. */
+ pat.dsc$a_pointer = text;
+ pat.dsc$w_length = strlen(text);
+ pat.dsc$b_dtype = DSC$K_DTYPE_T;
+ pat.dsc$b_class = DSC$K_CLASS_S;
+
+ /* Set up result descriptor. */
+ res.dsc$a_pointer = buff;
+ res.dsc$w_length = sizeof buff - 2;
+ res.dsc$b_dtype = DSC$K_DTYPE_T;
+ res.dsc$b_class = DSC$K_CLASS_S;
+
+ /* Read files, collecting versions. */
+ for (context = 0; e->vms_verscount < VERSIZE(e); e->vms_verscount++) {
+ if (lib$find_file(&pat, &res, &context) == RMS$_NMF || context == 0)
+ break;
+ buff[sizeof buff - 1] = '\0';
+ if (p = strchr(buff, ';'))
+ e->vms_versions[e->vms_verscount] = atoi(p + 1);
+ else
+ e->vms_versions[e->vms_verscount] = -1;
+ }
+
+ free(text);
+}
+
+/*
+** Read the next entry from the directory.
+*/
+struct dirent *
+readdir(dd)
+ DIR *dd;
+{
+ struct dsc$descriptor_s res;
+ char *p;
+ char buff[sizeof dd->entry.d_name];
+ int i;
+
+ /* Set up result descriptor, and get next file. */
+ res.dsc$a_pointer = buff;
+ res.dsc$w_length = sizeof buff - 2;
+ res.dsc$b_dtype = DSC$K_DTYPE_T;
+ res.dsc$b_class = DSC$K_CLASS_S;
+ if (lib$find_file(&dd->pat, &res, &dd->context) == RMS$_NMF
+ || dd->context == 0L)
+ /* None left... */
+ return NULL;
+
+ /* Force the buffer to end with a NUL. */
+ buff[sizeof buff - 1] = '\0';
+ for (p = buff; !isspace(*p); p++)
+ ;
+ *p = '\0';
+
+ /* Skip any directory component and just copy the name. */
+ if (p = strchr(buff, ']'))
+ (void)strcpy(dd->entry.d_name, p + 1);
+ else
+ (void)strcpy(dd->entry.d_name, buff);
+
+ /* Clobber the version. */
+ if (p = strchr(dd->entry.d_name, ';'))
+ *p = '\0';
+
+ dd->entry.d_namlen = strlen(dd->entry.d_name);
+
+ dd->entry.vms_verscount = 0;
+ if (dd->vms_wantversions)
+ collectversions(dd);
+ return &dd->entry;
+}
+
+/*
+** Return something that can be used in a seekdir later.
+*/
+long
+telldir(dd)
+ DIR *dd;
+{
+ return dd->context;
+}
+
+/*
+** Return to a spot where we used to be.
+*/
+void
+seekdir(dd, pos)
+ DIR *dd;
+ long pos;
+{
+ dd->context = pos;
+}
+
+#endif /* VMS */
+%}
+! !
+
!DirectoryStream methodsFor:'instance release'!
closeFile
--- a/ExtStream.st Sat Sep 16 19:14:32 1995 +0200
+++ b/ExtStream.st Sun Sep 17 19:57:55 1995 +0200
@@ -24,7 +24,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.52 1995-09-16 17:13:10 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.53 1995-09-17 17:56:12 claus Exp $
'!
!ExternalStream primitiveDefinitions!
@@ -91,7 +91,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.52 1995-09-16 17:13:10 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.53 1995-09-17 17:56:12 claus Exp $
"
!
@@ -535,6 +535,13 @@
!ExternalStream methodsFor:'queries'!
+isExternalStream
+ "return true, if the receiver is some kind of externalStream;
+ true is returned here - the method redefined from Object."
+
+ ^ true
+!
+
isReadable
"return true, if this stream can be read from"
@@ -2997,7 +3004,7 @@
if (_INST(binary) != true) {
f = MKFD(fp);
- if (feof(f)) {
+ if (feof(f)) {
_INST(hitEOF) = true;
RETURN ( nil );
}
--- a/ExternalStream.st Sat Sep 16 19:14:32 1995 +0200
+++ b/ExternalStream.st Sun Sep 17 19:57:55 1995 +0200
@@ -24,7 +24,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.52 1995-09-16 17:13:10 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.53 1995-09-17 17:56:12 claus Exp $
'!
!ExternalStream primitiveDefinitions!
@@ -91,7 +91,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.52 1995-09-16 17:13:10 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.53 1995-09-17 17:56:12 claus Exp $
"
!
@@ -535,6 +535,13 @@
!ExternalStream methodsFor:'queries'!
+isExternalStream
+ "return true, if the receiver is some kind of externalStream;
+ true is returned here - the method redefined from Object."
+
+ ^ true
+!
+
isReadable
"return true, if this stream can be read from"
@@ -2997,7 +3004,7 @@
if (_INST(binary) != true) {
f = MKFD(fp);
- if (feof(f)) {
+ if (feof(f)) {
_INST(hitEOF) = true;
RETURN ( nil );
}
--- a/Method.st Sat Sep 16 19:14:32 1995 +0200
+++ b/Method.st Sun Sep 17 19:57:55 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Method.st,v 1.48 1995-09-08 16:46:11 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Method.st,v 1.49 1995-09-17 17:56:43 claus Exp $
'!
!Method class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Method.st,v 1.48 1995-09-08 16:46:11 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Method.st,v 1.49 1995-09-17 17:56:43 claus Exp $
"
!
@@ -70,6 +70,12 @@
Do not depend on any value in the flags field - it may change without
notice.
+ Notice, that in ST/X, method can be subclassed; executable code is
+ identified not by being a subclass of Block or Method, but instead by
+ having the executable flag bit set in the class. The VM can execute anything
+ which is identified as executable (assuming that the first instance variable
+ is the machine-code address) - this allows for easy future extension.
+
Instance variables:
source <String> the source itself (if sourcePosition isNil)
@@ -125,6 +131,19 @@
may change (in case of some ANSI standard being defined).
Be warned and send me suggestions & critics (constructive ;-)
"
+!
+
+dynamicMethods
+"
+ On systems which support dynamic loading of machine code (SYS5.4, Linux),
+ methods may now be compiled to machine code from within the browser,
+ and the resulting machine code object be loaded in.
+ The ObjectFileLoader keeps (weak) handles to the resulting methods and
+ invalidates the corresponding method objects, if the underlying methods
+ object code is unloaded.
+ Invalid methods will trap into the debugger when executed;
+ also, the browser marks them as '(* not executable *)' in its method list.
+"
! !
!Method class methodsFor:'initialization'!
@@ -953,6 +972,37 @@
^ false
! !
+!Method methodsFor:'trap methods'!
+
+makeInvalid
+ "make the receiver an invalid method, which raises an invalidCodeObject
+ signal when executed. This is not for public use - it is required for
+ the objectFileLoader to invalidate methods whose code is unloaded."
+
+ |invldMethod|
+
+ invldMethod := self class compiledMethodAt:#invalidCodeObject.
+ self code:invldMethod code.
+ self byteCode:invldMethod byteCode.
+
+ "Created: 17.9.1995 / 15:00:52 / claus"
+!
+
+makeUncompiled
+ "make the receiver an uncompiled method, which raises an invalidCodeObject
+ signal when executed. This is not for public use - it is required for
+ the compiler to invalidate methods which cannot be compiled due to errors
+ after a class definition change (for example: instvars are no longer there)."
+
+ |invldMethod|
+
+ invldMethod := self class compiledMethodAt:#uncompiledCodeObject.
+ self code:invldMethod code.
+ self byteCode:invldMethod byteCode.
+
+ "Created: 17.9.1995 / 15:01:14 / claus"
+! !
+
!Method methodsFor:'error handling'!
invalidCodeObject
--- a/ObjMem.st Sat Sep 16 19:14:32 1995 +0200
+++ b/ObjMem.st Sun Sep 17 19:57:55 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.55 1995-09-14 23:22:26 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.56 1995-09-17 17:56:54 claus Exp $
'!
!ObjectMemory class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.55 1995-09-14 23:22:26 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.56 1995-09-17 17:56:54 claus Exp $
"
!
@@ -2844,7 +2844,8 @@
modules := IdentityDictionary new.
self allBinaryModulesDo:[:entry |
- |id name type libName subModuleName module dynamic infoRec pathName|
+ |id name type libName subModuleName module dynamic infoRec pathName
+ typeName nameString|
id := entry at:1.
subModuleName := (entry at:2) asSymbol.
@@ -2853,16 +2854,26 @@
id > 0 ifTrue:[
pathName := ObjectFileLoader pathNameFromID:id.
dynamic := true.
- name := 'dynamic module ' , (pathName asFilename baseName).
+ typeName := 'dynamic '.
+ name := pathName asFilename baseName
] ifFalse:[
dynamic := false.
+ typeName := 'builIn '.
pathName := nil.
libName isNil ifTrue:[
- name := 'builtIn module ' , subModuleName
+ name := subModuleName
] ifFalse:[
- name := 'builtIn classLib ' , libName
+ name := libName
].
].
+ nameString := typeName.
+ libName isNil ifTrue:[
+ nameString := nameString, 'module '
+ ] ifFalse:[
+ nameString := nameString, 'classLib '
+ ].
+ nameString := nameString , name.
+
libName isNil ifTrue:[
type := #classObject
] ifFalse:[
@@ -2876,7 +2887,7 @@
infoRec at:#id put:id.
infoRec at:#classNames put:(Set with:subModuleName).
infoRec at:#pathName put:pathName.
- infoRec at:#name put:name.
+ infoRec at:#name put:nameString.
infoRec at:#libraryName put:libName.
infoRec at:#dynamic put:dynamic.
infoRec at:#type put:type.
@@ -2889,7 +2900,7 @@
ObjectMemory binaryModuleInfo
"
- "Modified: 30.8.1995 / 17:29:34 / claus"
+ "Modified: 17.9.1995 / 16:33:02 / claus"
!
fullBinaryModuleInfo
--- a/Object.st Sat Sep 16 19:14:32 1995 +0200
+++ b/Object.st Sun Sep 17 19:57:55 1995 +0200
@@ -30,7 +30,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Object.st,v 1.63 1995-09-03 15:05:41 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Object.st,v 1.64 1995-09-17 17:57:05 claus Exp $
'!
!Object class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Object.st,v 1.63 1995-09-03 15:05:41 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Object.st,v 1.64 1995-09-17 17:57:05 claus Exp $
"
!
@@ -631,6 +631,13 @@
^ false
!
+isExternalStream
+ "return true, if the receiver is some kind of externalStream;
+ false is returned here - the method is only redefined in ExternalStream."
+
+ ^false
+!
+
isFileStream
"return true, if the receiver is some kind of fileStream;
false is returned here - the method is only redefined in FileStream."
--- a/ObjectMemory.st Sat Sep 16 19:14:32 1995 +0200
+++ b/ObjectMemory.st Sun Sep 17 19:57:55 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.55 1995-09-14 23:22:26 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.56 1995-09-17 17:56:54 claus Exp $
'!
!ObjectMemory class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.55 1995-09-14 23:22:26 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.56 1995-09-17 17:56:54 claus Exp $
"
!
@@ -2844,7 +2844,8 @@
modules := IdentityDictionary new.
self allBinaryModulesDo:[:entry |
- |id name type libName subModuleName module dynamic infoRec pathName|
+ |id name type libName subModuleName module dynamic infoRec pathName
+ typeName nameString|
id := entry at:1.
subModuleName := (entry at:2) asSymbol.
@@ -2853,16 +2854,26 @@
id > 0 ifTrue:[
pathName := ObjectFileLoader pathNameFromID:id.
dynamic := true.
- name := 'dynamic module ' , (pathName asFilename baseName).
+ typeName := 'dynamic '.
+ name := pathName asFilename baseName
] ifFalse:[
dynamic := false.
+ typeName := 'builIn '.
pathName := nil.
libName isNil ifTrue:[
- name := 'builtIn module ' , subModuleName
+ name := subModuleName
] ifFalse:[
- name := 'builtIn classLib ' , libName
+ name := libName
].
].
+ nameString := typeName.
+ libName isNil ifTrue:[
+ nameString := nameString, 'module '
+ ] ifFalse:[
+ nameString := nameString, 'classLib '
+ ].
+ nameString := nameString , name.
+
libName isNil ifTrue:[
type := #classObject
] ifFalse:[
@@ -2876,7 +2887,7 @@
infoRec at:#id put:id.
infoRec at:#classNames put:(Set with:subModuleName).
infoRec at:#pathName put:pathName.
- infoRec at:#name put:name.
+ infoRec at:#name put:nameString.
infoRec at:#libraryName put:libName.
infoRec at:#dynamic put:dynamic.
infoRec at:#type put:type.
@@ -2889,7 +2900,7 @@
ObjectMemory binaryModuleInfo
"
- "Modified: 30.8.1995 / 17:29:34 / claus"
+ "Modified: 17.9.1995 / 16:33:02 / claus"
!
fullBinaryModuleInfo
--- a/Unix.st Sat Sep 16 19:14:32 1995 +0200
+++ b/Unix.st Sun Sep 17 19:57:55 1995 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.55 1995-09-16 17:14:32 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.56 1995-09-17 17:57:55 claus Exp $
'!
!OperatingSystem primitiveDefinitions!
@@ -362,6 +362,63 @@
}
# define HAS_REALPATH
#endif /* WANT_REALPATH && not HAS_REALPATH */
+
+#ifdef VMS
+char *getwd(p)
+ char *p;
+{
+ int c;
+ char *root_dir,*l2;
+
+ getcwd(p,512,0); /* get current working directory in unix format*/
+
+ root_dir = strstr ( p, "/000000" );
+ if ( root_dir != NULL ) {
+ /* trim root directory out of specification */
+ if ( (strlen(root_dir) == 7) &&
+ (strpbrk(p+1,"/") == root_dir) ) *root_dir = '\0';
+ }
+ /* special kludge for "/" directory */
+ if ( strcmp ( p, "/DEVICE_LIST_ROOT" ) == 0 )
+ strcpy ( p, "/" );
+ return(p);
+}
+
+unlink(p)
+ char *p;
+{
+#ifdef VMSDEBUG
+ printf("unlink: '%s'\n",p);
+#endif
+ delete(p);
+}
+
+int
+lstat(f,st) /* fake a stat operation to return file type */
+ char *f;
+ stat_t *st;
+{
+ char *dirext, *name;
+ int extlen;
+
+ st->st_mode = S_IFREG; /* default to normal file */
+ name = strrchr ( f, '/' ); /* locate rightmost slash */
+ if ( name == NULL ) name = f; else name++;
+
+ dirext = strstr ( name, ".DIR" );
+ if ( dirext != NULL ) {
+ /* make it an exact match */
+ extlen = strcspn(&dirext[1],".;");
+ if ( (extlen == 0) || (extlen == 3) ) {
+ st->st_mode = S_IFDIR;
+ if ( strncmp ( name, "000000.", 7 ) == 0 ) return 0;
+ else return (stat ( f, st ));
+ }
+ }
+ return 0;
+}
+# endif /* VMS */
+
%}
! !
@@ -516,7 +573,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.55 1995-09-16 17:14:32 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.56 1995-09-17 17:57:55 claus Exp $
"
!