* Replaced short with int16_t where necessary.
git-svn-id: svn://svn.zoy.org/elk/trunk@189 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
3d3e4af0f3
commit
8865c1ea8f
|
@ -256,7 +256,7 @@ struct S_Promise {
|
|||
|
||||
struct S_Port {
|
||||
Object name; /* string */
|
||||
short flags;
|
||||
uint16_t flags;
|
||||
char unread;
|
||||
unsigned int ptr;
|
||||
FILE *file;
|
||||
|
|
|
@ -144,13 +144,11 @@ static Object P_Get_Property (Object w, Object prop, Object type, Object start,
|
|||
} else {
|
||||
Object v;
|
||||
GC_Node;
|
||||
/* Assumes short is 16 bits and int is 32 bits.
|
||||
*/
|
||||
v = Make_Vector ((int)nitems, Null);
|
||||
GC_Link (v);
|
||||
for (i = 0; i < nitems; i++) {
|
||||
x = Make_Unsigned (format == 16 ?
|
||||
*((short *)data + i) : *((int *)data + i));
|
||||
*((int16_t *)data + i) : *((int32_t *)data + i));
|
||||
VECTOR(v)->data[i] = x;
|
||||
}
|
||||
Car (t) = v;
|
||||
|
@ -189,8 +187,8 @@ static Object P_Change_Property (Object w, Object prop, Object type,
|
|||
if (f == 16) {
|
||||
if (x > 65535)
|
||||
Primitive_Error ("format mismatch");
|
||||
*((short *)buf + i) = x; /* Assumes short is 16 bits */
|
||||
} else *((int *)buf + i) = x; /* and int is 32 bits. */
|
||||
*((int16_t *)buf + i) = x;
|
||||
} else *((int32_t *)buf + i) = x;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue