--- a/UnixOperatingSystem.st Wed Feb 12 15:18:20 2014 +0100
+++ b/UnixOperatingSystem.st Wed Feb 12 15:18:31 2014 +0100
@@ -10719,6 +10719,7 @@
case SWORDARRAY:
case SLONGARRAY:
case FLOATARRAY:
+ break;
case DOUBLEARRAY:
#ifdef __NEED_DOUBLE_ALIGN
nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
@@ -10729,6 +10730,7 @@
#ifdef __NEED_LONGLONG_ALIGN
nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
#endif
+ break;
default:
goto bad;
}
@@ -10859,6 +10861,7 @@
case SWORDARRAY:
case SLONGARRAY:
case FLOATARRAY:
+ break;
case DOUBLEARRAY:
#ifdef __NEED_DOUBLE_ALIGN
nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1);
@@ -10869,6 +10872,7 @@
#ifdef __NEED_LONGLONG_ALIGN
nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1);
#endif
+ break;
default:
goto bad;
}
@@ -12995,64 +12999,65 @@
int offs, __startIndex, __maxBytes;
if (!__isSmallInteger(__INST(fd))) {
- error = @symbol(badFd);
- goto err;
+ error = @symbol(badFd);
+ goto err;
}
if (!__isSmallInteger(startIndex) ||
- (__startIndex = __intVal(startIndex)-1) < 0) {
- if (startIndex == nil) {
- __startIndex = 0;
- } else {
- error = @symbol(badArgument3);
- goto err;
- }
+ (__startIndex = __intVal(startIndex)-1) < 0) {
+ if (startIndex == nil) {
+ __startIndex = 0;
+ } else {
+ error = @symbol(badArgument3);
+ goto err;
+ }
}
if (__isSmallInteger(maxBytes)) {
- __maxBytes = __intVal(maxBytes);
+ __maxBytes = __intVal(maxBytes);
} else if (maxBytes == nil) {
- __maxBytes = -1;
+ __maxBytes = -1;
} else {
- error = @symbol(badArgument4);
- goto err;
+ error = @symbol(badArgument4);
+ goto err;
}
if (!__isInteger(flags)) {
- error = @symbol(badArgument5);
- goto err;
+ error = @symbol(badArgument5);
+ goto err;
}
__flags = __longIntVal(flags);
sock = __smallIntegerVal(__INST(fd));
oClass = __Class(aDataBuffer);
switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
- case BYTEARRAY:
- offs = __startIndex;
- break;
- case WORDARRAY:
- case SWORDARRAY:
- offs = __startIndex * 2;
- break;
- case LONGARRAY:
- case SLONGARRAY:
- offs = __startIndex * 4;
- break;
- case LONGLONGARRAY:
- case SLONGLONGARRAY:
- offs = __startIndex * 8;
+ case BYTEARRAY:
+ offs = __startIndex;
+ break;
+ case WORDARRAY:
+ case SWORDARRAY:
+ offs = __startIndex * 2;
+ break;
+ case LONGARRAY:
+ case SLONGARRAY:
+ offs = __startIndex * 4;
+ break;
+ case LONGLONGARRAY:
+ case SLONGLONGARRAY:
+ offs = __startIndex * 8;
# ifdef __NEED_LONGLONG_ALIGN
- offs += 4;
-# endif
- case FLOATARRAY:
- offs = __startIndex * sizeof(float);
- break;
- case DOUBLEARRAY:
- offs = __startIndex * sizeof(double);
+ offs += 4;
+# endif
+ break;
+ case FLOATARRAY:
+ offs = __startIndex * sizeof(float);
+ break;
+ case DOUBLEARRAY:
+ offs = __startIndex * sizeof(double);
# ifdef __NEED_DOUBLE_ALIGN
- offs += 4;
-# endif
- break;
- default:
- error = @symbol(badArgument2);
- goto err;
+ offs += 4;
+# endif
+ break;
+ default:
+ error = @symbol(badArgument2);
+ goto err;
}
nInstVars = __smallIntegerVal(__ClassInstPtr(oClass)->c_ninstvars);
@@ -13061,35 +13066,35 @@
if (__maxBytes >= 0 && __maxBytes < objSize) {
# ifdef DGRAM_DEBUG
- printf("cut off ...\n");
-# endif
- objSize = __maxBytes;
+ printf("cut off ...\n");
+# endif
+ objSize = __maxBytes;
}
if (socketAddress == nil) {
- alen = 0;
+ alen = 0;
} else {
- if (! __isByteArrayLike(socketAddress)) {
- error = @symbol(badArgument1);
- goto err;
- }
- alen = __byteArraySize(socketAddress);
+ if (! __isByteArrayLike(socketAddress)) {
+ error = @symbol(badArgument1);
+ goto err;
+ }
+ alen = __byteArraySize(socketAddress);
}
saPtr = (struct sockaddr *)0;
again:
if (alen)
- saPtr = (struct sockaddr *)__byteArrayVal(socketAddress);
+ saPtr = (struct sockaddr *)__byteArrayVal(socketAddress);
cp = (char *)__InstPtr(aDataBuffer) + nInstBytes + offs;
n = sendto(sock, cp, objSize, __flags, saPtr, alen);
if (n < 0) {
- if (errno == EINTR) {
- __HANDLE_INTERRUPTS__;
- goto again;
- } else {
- error = __mkSmallInteger(errno);
- goto err;
- }
+ if (errno == EINTR) {
+ __HANDLE_INTERRUPTS__;
+ goto again;
+ } else {
+ error = __mkSmallInteger(errno);
+ goto err;
+ }
}
RETURN (__mkSmallInteger(n));
#endif
@@ -13454,11 +13459,11 @@
!UnixOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.344 2014-02-12 12:55:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.345 2014-02-12 14:18:31 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.344 2014-02-12 12:55:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.345 2014-02-12 14:18:31 stefan Exp $'
! !