70 */ |
74 */ |
71 # include <rms.h> |
75 # include <rms.h> |
72 #endif |
76 #endif |
73 |
77 |
74 #ifndef WIN32 |
78 #ifndef WIN32 |
75 extern long ftell(), lseek(); |
79 extern long ftell(), lseek(); |
|
80 # define HFILE FILE * |
|
81 |
76 #endif |
82 #endif |
|
83 |
|
84 #ifdef WIN32 |
|
85 # define NO_STDIO |
|
86 # ifdef i386 |
|
87 # define _X86_ |
|
88 # endif |
|
89 |
|
90 # undef INT |
|
91 # undef Array |
|
92 # undef Number |
|
93 # undef Method |
|
94 # undef Point |
|
95 # undef Rectangle |
|
96 # undef Block |
|
97 # undef Time |
|
98 # undef Date |
|
99 |
|
100 # define NOATOM |
|
101 # define NOGDICAPMASKS |
|
102 # define NOMETAFILE |
|
103 # define NOMINMAX |
|
104 //# define NOOPENFILE |
|
105 # define NOSOUND |
|
106 # define NOWH |
|
107 //# define NOCOMM |
|
108 # define NOKANJI |
|
109 # define NOCRYPT |
|
110 //# define NOMCX |
|
111 # define WIN32_LEAN_AND_MEAN |
|
112 |
|
113 # include <windows.h> |
|
114 # include <winsock.h> /* */ |
|
115 |
|
116 # if !defined(__BORLANDC__) |
|
117 # define stat _stat |
|
118 # endif |
|
119 |
|
120 # ifdef __DEF_Array |
|
121 # define Array __DEF_Array |
|
122 # endif |
|
123 # ifdef __DEF_Number |
|
124 # define Number __DEF_Number |
|
125 # endif |
|
126 # ifdef __DEF_Method |
|
127 # define Method __DEF_Method |
|
128 # endif |
|
129 # ifdef __DEF_Point |
|
130 # define Point __DEF_Point |
|
131 # endif |
|
132 # ifdef __DEF_Block |
|
133 # define Block __DEF_Block |
|
134 # endif |
|
135 # ifdef __DEF_Time |
|
136 # define Time __DEF_Time |
|
137 # endif |
|
138 # ifdef __DEF_Date |
|
139 # define Date __DEF_Date |
|
140 # endif |
|
141 |
|
142 # define INT int |
|
143 |
|
144 # ifdef NO_STDIO |
|
145 |
|
146 /*# define HFILE HANDLE*/ |
|
147 # define HFILE FILE * |
|
148 //# define fileno(f) f |
|
149 |
|
150 # define TELL(currentPosition,f,buffered) \ |
|
151 if (buffered) { \ |
|
152 currentPosition = ftell(f); \ |
|
153 } else { \ |
|
154 OBJ rA = __INST(readAhead); \ |
|
155 if (rA != nil) { \ |
|
156 __INST(readAhead) = nil; \ |
|
157 currentPosition = lseek(fileno(f), -1L, SEEK_CUR); \ |
|
158 } else { \ |
|
159 currentPosition = lseek(fileno(f), 0L, SEEK_CUR); \ |
|
160 } \ |
|
161 } |
|
162 |
|
163 # define SEEK(ret,f,nP,buffered) \ |
|
164 if (buffered) { \ |
|
165 ret = fseek(f, nP, SEEK_SET); \ |
|
166 } else { \ |
|
167 OBJ rA = __INST(readAhead); \ |
|
168 if (rA != nil) { \ |
|
169 __INST(readAhead) = nil; \ |
|
170 } \ |
|
171 ret = lseek(fileno(f), nP, SEEK_SET); \ |
|
172 } |
|
173 |
|
174 # define TOEND(ret,f,buffered) \ |
|
175 if (buffered) { \ |
|
176 ret = fseek(f, 0L, SEEK_END); \ |
|
177 } else { \ |
|
178 OBJ rA = __INST(readAhead); \ |
|
179 if (rA != nil) { \ |
|
180 __INST(readAhead) = nil; \ |
|
181 } \ |
|
182 ret = lseek(fileno(f), 0L, SEEK_END); \ |
|
183 } |
|
184 |
|
185 # else /* use STDIO */ |
|
186 |
|
187 # define HFILE FILE * |
|
188 |
|
189 # define TELL(currentPosition,f,buffered) \ |
|
190 if (buffered) { \ |
|
191 currentPosition = ftell(f); \ |
|
192 } else { \ |
|
193 currentPosition = lseek(fileno(f), 0L, SEEK_CUR); \ |
|
194 } |
|
195 |
|
196 # define SEEK(ret,f,nP,buffered) \ |
|
197 if (buffered) { \ |
|
198 ret = fseek(f, nP, SEEK_SET); \ |
|
199 } else { \ |
|
200 ret = lseek(fileno(f), nP, SEEK_SET); \ |
|
201 } |
|
202 |
|
203 # define TOEND(ret,f,buffered) \ |
|
204 if (buffered) { \ |
|
205 ret = fseek(f, 0L, SEEK_END); \ |
|
206 } else { \ |
|
207 ret = lseek(fileno(f), 0L, SEEK_END); \ |
|
208 } |
|
209 |
|
210 extern long ftell(), lseek(); |
|
211 # endif /* use STDIO */ |
|
212 |
|
213 #endif /* WIN32 */ |
77 |
214 |
78 /* |
215 /* |
79 * on some systems errno is a macro ... check for it here |
216 * on some systems errno is a macro ... check for it here |
80 */ |
217 */ |
81 #ifndef errno |
218 #ifndef errno |
755 |ok| |
904 |ok| |
756 |
905 |
757 filePointer notNil ifTrue:[^ self errorAlreadyOpen]. |
906 filePointer notNil ifTrue:[^ self errorAlreadyOpen]. |
758 ok := false. |
907 ok := false. |
759 %{ |
908 %{ |
760 FILE *f; |
909 HFILE f; |
761 FILE *fopen(); |
910 HFILE fopen(); |
762 OBJ path, fp; |
911 OBJ path, fp; |
763 int pass = 0; |
912 int pass = 0; |
764 |
913 |
765 retry: |
914 retry: |
766 path = __INST(pathName); |
915 path = __INST(pathName); |
767 if (__isNonNilObject(path) && (__qClass(path)==String)) { |
916 if (__isNonNilObject(path) && (__qClass(path)==String)) { |
768 #ifdef __VMS__ |
917 #ifdef __VMS__ |
769 do { |
918 do { |
770 /* |
919 /* |
771 * allow passing additional RMS arguments. |
920 * allow passing additional RMS arguments. |
772 * stupid: DEC does not seem to offer an interface for passing a char **. |
921 * stupid: DEC does not seem to offer an interface for passing a char **. |
773 */ |
922 */ |
774 errno = 0; |
923 errno = 0; |
775 |
924 |
776 { |
925 { |
777 if (__isArray(attributeSpec)) { |
926 if (__isArray(attributeSpec)) { |
778 OBJ *ap = __ArrayInstPtr(attributeSpec)->a_element; |
927 OBJ *ap = __ArrayInstPtr(attributeSpec)->a_element; |
779 int numAttrib = 0; |
928 int numAttrib = 0; |
780 int i; |
929 int i; |
781 |
930 |
782 numAttrib = __arraySize(attributeSpec); |
931 numAttrib = __arraySize(attributeSpec); |
783 for (i=0; i<numAttrib;i++) { |
932 for (i=0; i<numAttrib;i++) { |
784 if (! __isString(ap[i])) { |
933 if (! __isString(ap[i])) { |
785 f = NULL; |
934 f = NULL; |
786 errno = EINVAL; /* invalid argument */ |
935 errno = EINVAL; /* invalid argument */ |
787 goto getOutOfHere; |
936 goto getOutOfHere; |
788 } |
937 } |
789 } |
938 } |
790 switch (numAttrib) { |
939 switch (numAttrib) { |
791 case 0: |
940 case 0: |
792 __BEGIN_INTERRUPTABLE__ |
941 __BEGIN_INTERRUPTABLE__ |
793 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode)); |
942 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode)); |
794 __END_INTERRUPTABLE__ |
943 __END_INTERRUPTABLE__ |
795 break; |
944 break; |
796 case 1: |
945 case 1: |
797 __BEGIN_INTERRUPTABLE__ |
946 __BEGIN_INTERRUPTABLE__ |
798 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
947 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
799 __stringVal(ap[0])); |
948 __stringVal(ap[0])); |
800 __END_INTERRUPTABLE__ |
949 __END_INTERRUPTABLE__ |
801 break; |
950 break; |
802 case 2: |
951 case 2: |
803 __BEGIN_INTERRUPTABLE__ |
952 __BEGIN_INTERRUPTABLE__ |
804 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
953 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
805 __stringVal(ap[0]), __stringVal(ap[1])); |
954 __stringVal(ap[0]), __stringVal(ap[1])); |
806 __END_INTERRUPTABLE__ |
955 __END_INTERRUPTABLE__ |
807 break; |
956 break; |
808 case 3: |
957 case 3: |
809 __BEGIN_INTERRUPTABLE__ |
958 __BEGIN_INTERRUPTABLE__ |
810 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
959 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
811 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2])); |
960 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2])); |
812 __END_INTERRUPTABLE__ |
961 __END_INTERRUPTABLE__ |
813 break; |
962 break; |
814 case 4: |
963 case 4: |
815 __BEGIN_INTERRUPTABLE__ |
964 __BEGIN_INTERRUPTABLE__ |
816 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
965 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
817 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
966 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
818 __stringVal(ap[3])); |
967 __stringVal(ap[3])); |
819 __END_INTERRUPTABLE__ |
968 __END_INTERRUPTABLE__ |
820 break; |
969 break; |
821 case 5: |
970 case 5: |
822 __BEGIN_INTERRUPTABLE__ |
971 __BEGIN_INTERRUPTABLE__ |
823 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
972 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
824 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
973 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
825 __stringVal(ap[3]), __stringVal(ap[4])); |
974 __stringVal(ap[3]), __stringVal(ap[4])); |
826 __END_INTERRUPTABLE__ |
975 __END_INTERRUPTABLE__ |
827 break; |
976 break; |
828 case 6: |
977 case 6: |
829 __BEGIN_INTERRUPTABLE__ |
978 __BEGIN_INTERRUPTABLE__ |
830 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
979 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
831 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
980 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
832 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5])); |
981 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5])); |
833 __END_INTERRUPTABLE__ |
982 __END_INTERRUPTABLE__ |
834 break; |
983 break; |
835 case 7: |
984 case 7: |
836 __BEGIN_INTERRUPTABLE__ |
985 __BEGIN_INTERRUPTABLE__ |
837 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
986 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
838 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
987 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
839 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
988 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
840 __stringVal(ap[6])); |
989 __stringVal(ap[6])); |
841 __END_INTERRUPTABLE__ |
990 __END_INTERRUPTABLE__ |
842 break; |
991 break; |
843 case 8: |
992 case 8: |
844 __BEGIN_INTERRUPTABLE__ |
993 __BEGIN_INTERRUPTABLE__ |
845 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
994 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
846 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
995 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
847 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
996 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
848 __stringVal(ap[6]), __stringVal(ap[7])); |
997 __stringVal(ap[6]), __stringVal(ap[7])); |
849 __END_INTERRUPTABLE__ |
998 __END_INTERRUPTABLE__ |
850 break; |
999 break; |
851 case 9: |
1000 case 9: |
852 __BEGIN_INTERRUPTABLE__ |
1001 __BEGIN_INTERRUPTABLE__ |
853 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
1002 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
854 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
1003 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
855 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
1004 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
856 __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8])); |
1005 __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8])); |
857 __END_INTERRUPTABLE__ |
1006 __END_INTERRUPTABLE__ |
858 break; |
1007 break; |
859 case 10: |
1008 case 10: |
860 __BEGIN_INTERRUPTABLE__ |
1009 __BEGIN_INTERRUPTABLE__ |
861 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
1010 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), |
862 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
1011 __stringVal(ap[0]), __stringVal(ap[1]), __stringVal(ap[2]), |
863 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
1012 __stringVal(ap[3]), __stringVal(ap[4]), __stringVal(ap[5]), |
864 __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]), |
1013 __stringVal(ap[6]), __stringVal(ap[7]), __stringVal(ap[8]), |
865 __stringVal(ap[9])); |
1014 __stringVal(ap[9])); |
866 __END_INTERRUPTABLE__ |
1015 __END_INTERRUPTABLE__ |
867 break; |
1016 break; |
868 default: |
1017 default: |
869 f = NULL; |
1018 f = NULL; |
870 errno = E2BIG; /* too many args */ |
1019 errno = E2BIG; /* too many args */ |
871 goto getOutOfHere; |
1020 goto getOutOfHere; |
872 } |
1021 } |
873 } else if (attributeSpec != nil) { |
1022 } else if (attributeSpec != nil) { |
874 f = NULL; |
1023 f = NULL; |
875 errno = EINVAL; /* invalid argument */ |
1024 errno = EINVAL; /* invalid argument */ |
876 goto getOutOfHere; |
1025 goto getOutOfHere; |
877 } else { |
1026 } else { |
878 /* |
1027 /* |
879 * create file as sequential streamLF by default. |
1028 * create file as sequential streamLF by default. |
880 */ |
1029 */ |
881 __BEGIN_INTERRUPTABLE__ |
1030 __BEGIN_INTERRUPTABLE__ |
882 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), "rfm=stmlf"); |
1031 f = fopen((char *)__stringVal(path), (char *)__stringVal(openmode), "rfm=stmlf"); |
883 __END_INTERRUPTABLE__ |
1032 __END_INTERRUPTABLE__ |
884 } |
1033 } |
885 } |
1034 } |
886 /* must refetch - could be GC'd */ |
1035 /* must refetch - could be GC'd */ |
887 path = __INST(pathName); |
1036 path = __INST(pathName); |
888 } while ((f == NULL) && (errno == EINTR)); |
1037 } while ((f == NULL) && (errno == EINTR)); |
889 #else |
1038 |
890 do { |
1039 #else /* not VMS */ |
891 __BEGIN_INTERRUPTABLE__ |
1040 |
892 # ifdef LINUX |
1041 # ifdef WIN32 |
893 /* |
1042 |
894 * LINUX may ret a non-NULL f even when interrupted. |
1043 do { |
895 * Therefore, check errno and fake a null-ret. |
1044 # ifdef NO_STDIO |
896 */ |
1045 /*printf("open %s mode=%s\n",__stringVal(path),__stringVal(openmode)); */ |
897 errno = 0; |
1046 # ifdef DO_WRAP_CALLS |
898 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
1047 f = __STX_C_CALL2((void*)fopen,(void *)__stringVal(path), (void *)__stringVal(openmode)); |
899 if (errno == EINTR) |
1048 # else |
900 f = NULL; |
1049 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
901 # else |
1050 # endif |
902 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
1051 # else /* use_STDIO */ |
903 # endif |
1052 __BEGIN_INTERRUPTABLE__ |
904 __END_INTERRUPTABLE__ |
1053 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
905 /* must refetch - could be GC'd */ |
1054 __END_INTERRUPTABLE__ |
906 path = __INST(pathName); |
1055 # endif /* use_STDIO */ |
907 } while ((f == NULL) && (errno == EINTR)); |
1056 /* must refetch - could be GC'd */ |
908 #endif |
1057 path = __INST(pathName); |
909 |
1058 } while ((f == NULL) && (errno == EINTR)); |
910 if (f == NULL) { |
1059 |
911 /* |
1060 # else /* not WIN32 */ |
912 * If no filedescriptors available, try to finalize |
1061 |
913 * possibly collected fd's and try again. |
1062 do { |
914 */ |
1063 __BEGIN_INTERRUPTABLE__ |
915 if (pass == 0 && (errno == ENFILE || errno == EMFILE)) { |
1064 # ifdef LINUX |
916 pass = 1; |
1065 /* |
917 __SSEND0(@global(ObjectMemory), @symbol(scavenge), 0); |
1066 * LINUX may ret a non-NULL f even when interrupted. |
918 __SSEND0(@global(ObjectMemory), @symbol(finalize), 0); |
1067 * Therefore, check errno and fake a null-ret. |
919 goto retry; |
1068 */ |
920 } |
1069 errno = 0; |
921 getOutOfHere: ; |
1070 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
922 __INST(lastErrorNumber) = __MKSMALLINT(errno); |
1071 if (errno == EINTR) |
923 __INST(position) = nil; |
1072 f = NULL; |
924 } else { |
1073 # else /* not LINUX */ |
|
1074 f = fopen((char *) __stringVal(path), (char *) __stringVal(openmode)); |
|
1075 # endif /* not LINUX */ |
|
1076 __END_INTERRUPTABLE__ |
|
1077 /* must refetch - could be GC'd */ |
|
1078 path = __INST(pathName); |
|
1079 } while ((f == NULL) && (errno == EINTR)); |
|
1080 |
|
1081 # endif /* not WIN32 */ |
|
1082 #endif /* not VMS */ |
|
1083 |
|
1084 if (f == NULL) { |
|
1085 /* |
|
1086 * If no filedescriptors available, try to finalize |
|
1087 * possibly collected fd's and try again. |
|
1088 */ |
|
1089 if (pass == 0 && (errno == ENFILE || errno == EMFILE)) { |
|
1090 pass = 1; |
|
1091 __SSEND0(@global(ObjectMemory), @symbol(scavenge), 0); |
|
1092 __SSEND0(@global(ObjectMemory), @symbol(finalize), 0); |
|
1093 goto retry; |
|
1094 } |
|
1095 getOutOfHere: ; |
|
1096 __INST(lastErrorNumber) = __MKSMALLINT(errno); |
|
1097 __INST(position) = nil; |
|
1098 } else { |
925 #ifdef __VMS__ |
1099 #ifdef __VMS__ |
926 /* |
1100 /* |
927 * check to see if this is positionable ... |
1101 * check to see if this is positionable ... |
928 */ |
1102 */ |
929 __INST(canPosition) = false; |
1103 __INST(canPosition) = false; |
930 # ifndef _POSIX_C_SOURCE |
1104 # ifndef _POSIX_C_SOURCE |
931 { |
1105 { |
932 struct stat statBuffer; |
1106 struct stat statBuffer; |
933 |
1107 |
934 if (fstat(fileno(f), &statBuffer) >= 0) { |
1108 if (fstat(fileno(f), &statBuffer) >= 0) { |
935 switch (statBuffer.st_fab_rfm) { |
1109 switch (statBuffer.st_fab_rfm) { |
936 case FAB$C_UDF: /* undefined (also stream binary) */ |
1110 case FAB$C_UDF: /* undefined (also stream binary) */ |
937 case FAB$C_VAR: /* variable length records */ |
1111 case FAB$C_VAR: /* variable length records */ |
938 case FAB$C_VFC: /* variable fixed control */ |
1112 case FAB$C_VFC: /* variable fixed control */ |
939 case FAB$C_STM: /* RMS-11 stream (valid only for sequen> */ |
1113 case FAB$C_STM: /* RMS-11 stream (valid only for sequen> */ |
940 default: |
1114 default: |
941 __INST(canPosition) = false; |
1115 __INST(canPosition) = false; |
942 break; |
1116 break; |
943 |
1117 |
944 case FAB$C_FIX: /* fixed length records */ |
1118 case FAB$C_FIX: /* fixed length records */ |
945 case FAB$C_STMLF: /* LF stream (valid only for sequential> */ |
1119 case FAB$C_STMLF: /* LF stream (valid only for sequential> */ |
946 case FAB$C_STMCR: /* CR stream (valid only for sequential> */ |
1120 case FAB$C_STMCR: /* CR stream (valid only for sequential> */ |
947 __INST(canPosition) = true; |
1121 __INST(canPosition) = true; |
948 break; |
1122 break; |
949 } |
1123 } |
950 } |
1124 } |
951 } |
1125 } |
952 # endif |
1126 # endif |
953 #else /* not VMS */ |
1127 #else /* not VMS */ |
954 __INST(canPosition) = true; |
1128 __INST(canPosition) = true; |
955 #endif /* poor VMS */ |
1129 #endif /* poor VMS */ |
956 |
1130 |
957 __INST(filePointer) = fp = __MKOBJ((INT)f); __STORE(self, fp); |
1131 __INST(filePointer) = fp = __MKOBJ((INT)f); __STORE(self, fp); |
958 __INST(position) = __MKSMALLINT(1); |
1132 __INST(position) = __MKSMALLINT(1); |
959 ok = true; |
1133 ok = true; |
960 } |
1134 } |
961 } |
1135 } |
962 %}. |
1136 %}. |
963 ok ifFalse:[ |
1137 ok ifFalse:[ |
964 " |
1138 " |
965 the open failed for some reason ... |
1139 the open failed for some reason ... |
966 " |
1140 " |
967 ^ self openError |
1141 ^ self openError |
968 ]. |
1142 ]. |
969 buffered := true. "default is buffered" |
1143 buffered := true. "default is buffered" |
970 Lobby register:self. |
1144 Lobby register:self. |
971 ! |
1145 ! |
972 |
1146 |