Changeset 12490
 Timestamp:
 02/20/10 20:36:40 (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/abcl/src/org/armedbear/lisp/StringFunctions.java
r12489 r12490 256 256 }; 257 257 258 private static LispObject 259 swapReturnValue(int original, 260 StringIndicesAndChars indicesAndChars) { 261 if (original < 0) { 262 return NIL; 263 } 264 int delta = original  indicesAndChars.start1; 265 int retVal = indicesAndChars.start2 + delta; 266 return Fixnum.getInstance(retVal); 267 } 268 258 269 // ### %string> 259 270 // Case sensitive. … … 274 285 third, fourth); 275 286 int tmp = lessThan(indicesAndChars); 276 if (tmp < 0) { 277 return NIL; 278 } 279 int delta = tmp  indicesAndChars.start1; 280 int retVal = indicesAndChars.start2 + delta; 281 return Fixnum.getInstance(retVal); 287 return swapReturnValue(tmp, indicesAndChars); 282 288 } 283 289 }; … … 347 353 third, fourth); 348 354 int tmp = lessThanOrEqual(indicesAndChars); 349 if (tmp < 0) { 350 return NIL; 351 } 352 int delta = tmp  indicesAndChars.start1; 353 int retVal = indicesAndChars.start2 + delta; 354 return Fixnum.getInstance(retVal); 355 return swapReturnValue(tmp, indicesAndChars); 355 356 } 356 357 }; … … 421 422 third, fourth); 422 423 int tmp = stringLessp(indicesAndChars); 423 if (tmp < 0) { 424 return NIL; 425 } 426 int delta = tmp  indicesAndChars.start1; 427 int retVal = indicesAndChars.start2 + delta; 428 return Fixnum.getInstance(retVal); 424 return swapReturnValue(tmp, indicesAndChars); 429 425 } 430 426 }; … … 496 492 third, fourth); 497 493 int tmp = stringNotLessp(indicesAndChars); 498 if (tmp < 0) { 499 return NIL; 500 } 501 int delta = tmp  indicesAndChars.start1; 502 int retVal = indicesAndChars.start2 + delta; 503 return Fixnum.getInstance(retVal); 494 return swapReturnValue(tmp, indicesAndChars); 504 495 } 505 496 };
Note: See TracChangeset
for help on using the changeset viewer.