89 |
int i,max; |
int i,max; |
90 |
object l; |
object l; |
91 |
|
|
92 |
if (index < 0) { |
if (index < 0) |
93 |
vs_push(make_fixnum(index)); |
TYPE_ERROR(make_fixnum(index),sLnon_negative_fixnum); |
|
FEwrong_type_argument(sLnon_negative_fixnum, vs_head); |
|
|
} |
|
94 |
switch (type_of(seq)) { |
switch (type_of(seq)) { |
95 |
case t_cons: |
case t_cons: |
96 |
for (i = index, l = seq; i > 0; --i) |
for (i = index, l = seq; i > 0; --i) |
120 |
} |
} |
121 |
return(code_char(seq->ust.ust_self[index])); |
return(code_char(seq->ust.ust_self[index])); |
122 |
|
|
123 |
|
case t_symbol: |
124 |
|
if (seq == Cnil) { |
125 |
|
max=0; |
126 |
|
goto E; |
127 |
|
} |
128 |
default: |
default: |
129 |
/* if (seq == Cnil) goto E; */ |
TYPE_ERROR(seq,sLsequence); |
130 |
FEwrong_type_argument(sLsequence, seq); |
return(Cnil); |
|
return(Cnil); |
|
131 |
} |
} |
132 |
|
|
133 |
E: |
E: |
134 |
l = vs_push( make_fixnum(max) ); |
TYPE_ERROR(make_fixnum(index),MMcons(sLinteger, |
135 |
vs_push( make_fixnum(0) ); |
MMcons(make_fixnum(0), |
136 |
l = vs_head = make_cons(vs_head, l); |
MMcons(MMcons(make_fixnum(max),Cnil),Cnil)))); |
|
l = vs_head = make_cons(sLinteger, l); |
|
|
vs_push(make_fixnum(index)); |
|
|
/* FIXME message should indicate out of range |
|
|
Icall_error_handler(sKwrong_type_argument, |
|
|
make_simple_string("The index, ~S, is too large."), |
|
|
1,vs_head); */ |
|
|
FEwrong_type_argument(l,vs_head); |
|
137 |
return(Cnil); |
return(Cnil); |
138 |
} |
} |
139 |
|
|
156 |
int i,max; |
int i,max; |
157 |
object l; |
object l; |
158 |
|
|
159 |
if (index < 0) { |
if (index < 0) |
160 |
vs_push(make_fixnum(index)); |
TYPE_ERROR(make_fixnum(index),sLnon_negative_fixnum); |
|
FEwrong_type_argument(sLnon_negative_fixnum, vs_head); |
|
|
} |
|
161 |
switch (type_of(seq)) { |
switch (type_of(seq)) { |
162 |
case t_cons: |
case t_cons: |
163 |
for (i = index, l = seq; i > 0; --i) |
for (i = index, l = seq; i > 0; --i) |
186 |
goto E; |
goto E; |
187 |
} |
} |
188 |
if (type_of(val) != t_character) |
if (type_of(val) != t_character) |
189 |
FEwrong_type_argument(sLcharacter, val); |
TYPE_ERROR(val,sLcharacter); |
190 |
seq->st.st_self[index] = val->ch.ch_code; |
seq->st.st_self[index] = val->ch.ch_code; |
191 |
return(val); |
return(val); |
192 |
|
|
193 |
default: |
default: |
194 |
max=0; |
max=0; |
195 |
FEwrong_type_argument(sLsequence, seq); |
TYPE_ERROR(seq,sLsequence); |
196 |
} |
} |
197 |
|
|
198 |
E: |
E: |
199 |
l = vs_push( make_fixnum(max) ); |
TYPE_ERROR(make_fixnum(index),MMcons(sLinteger, |
200 |
vs_push( make_fixnum(0) ); |
MMcons(make_fixnum(0), |
201 |
l = vs_head = make_cons(vs_head, l); |
MMcons(MMcons(make_fixnum(max),Cnil),Cnil)))); |
|
l = vs_head = make_cons(sLinteger, l); |
|
|
vs_push(make_fixnum(index)); |
|
|
|
|
|
/* FIXME error message should indicate value out of range - |
|
|
fixed kraehe */ |
|
|
FEwrong_type_argument(l, vs_head); |
|
202 |
return(Cnil); |
return(Cnil); |
203 |
} |
} |
204 |
|
|
585 |
unsigned int y; |
unsigned int y; |
586 |
y = UINT_GCL(x, i); |
y = UINT_GCL(x, i); |
587 |
UINT_GCL(x, i) = UINT_GCL(x, j); |
UINT_GCL(x, i) = UINT_GCL(x, j); |
588 |
UINT_GCL(x, y) = y; |
UINT_GCL(x, j) = y; |
589 |
} |
} |
590 |
return(seq); |
return(seq); |
591 |
|
|
596 |
unsigned short y; |
unsigned short y; |
597 |
y = USHORT_GCL(x, i); |
y = USHORT_GCL(x, i); |
598 |
USHORT_GCL(x, i) = USHORT_GCL(x, j); |
USHORT_GCL(x, i) = USHORT_GCL(x, j); |
599 |
USHORT_GCL(x, y) = y; |
USHORT_GCL(x, j) = y; |
600 |
} |
} |
601 |
return(seq); |
return(seq); |
602 |
case aet_char: |
case aet_char: |