comparison src/insdel.c @ 267:966663fcf606 r20-5b32

Import from CVS: tag r20-5b32
author cvs
date Mon, 13 Aug 2007 10:26:29 +0200
parents 262b8bb4a523
children c5d627a313b1
comparison
equal deleted inserted replaced
266:18d185df8c54 267:966663fcf606
314 # define LONG_BYTES 4 314 # define LONG_BYTES 4
315 # define ALIGN_MASK 0xFFFFFFFCU 315 # define ALIGN_MASK 0xFFFFFFFCU
316 # define HIGH_BIT_MASK 0x80808080U 316 # define HIGH_BIT_MASK 0x80808080U
317 # else 317 # else
318 # define LONG_BYTES 8 318 # define LONG_BYTES 8
319 # define ALIGN_MASK 0xFFFFFFFFFFFFFFF8U 319 # define ALIGN_MASK 0xFFFFFFFFFFFFFFF8UL
320 /* I had a dream, I was being overrun with early Intel processors ... */ 320 /* I had a dream, I was being overrun with early Intel processors ... */
321 # define HIGH_BIT_MASK 0x8080808080808080U 321 # define HIGH_BIT_MASK 0x8080808080808080UL
322 # endif 322 # endif
323 323
324 /* When we have a large number of bytes to scan, we can be trickier 324 /* When we have a large number of bytes to scan, we can be trickier
325 and significantly faster by scanning them in chunks of the CPU word 325 and significantly faster by scanning them in chunks of the CPU word
326 size (assuming that they're all ASCII -- we cut out as soon as 326 size (assuming that they're all ASCII -- we cut out as soon as
2329 if (nonreloc) 2329 if (nonreloc)
2330 *len = strlen ((CONST char *) nonreloc) - offset; 2330 *len = strlen ((CONST char *) nonreloc) - offset;
2331 else 2331 else
2332 *len = XSTRING_LENGTH (reloc) - offset; 2332 *len = XSTRING_LENGTH (reloc) - offset;
2333 } 2333 }
2334 #ifdef ERROR_CHECK_BUFPOS
2334 assert (*len >= 0); 2335 assert (*len >= 0);
2335 if (STRINGP (reloc)) 2336 if (STRINGP (reloc))
2336 { 2337 {
2337 assert (offset >= 0 && offset <= XSTRING_LENGTH (reloc)); 2338 assert (offset >= 0 && offset <= XSTRING_LENGTH (reloc));
2338 assert (offset + *len <= XSTRING_LENGTH (reloc)); 2339 assert (offset + *len <= XSTRING_LENGTH (reloc));
2339 } 2340 }
2341 #endif
2340 } 2342 }
2341 2343
2342 /* Insert a string into BUF at Bufpos POS. The string data comes 2344 /* Insert a string into BUF at Bufpos POS. The string data comes
2343 from one of two sources: constant, non-relocatable data (specified 2345 from one of two sources: constant, non-relocatable data (specified
2344 in NONRELOC), or a Lisp string object (specified in RELOC), which 2346 in NONRELOC), or a Lisp string object (specified in RELOC), which