Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!udel!princeton!notecnirp!nfs From: nfs@notecnirp.Princeton.EDU (Norbert Schlenker) Newsgroups: comp.os.minix Subject: Re: A replacement string package for PC's Summary: Oops! Message-ID: <20184@princeton.Princeton.EDU> Date: 11 Oct 89 01:43:21 GMT References: <20136@princeton.Princeton.EDU> Sender: news@princeton.Princeton.EDU Reply-To: nfs@notecnirp.UUCP (Norbert Schlenker) Organization: Dept. of Computer Science, Princeton University Lines: 97 I just hate to look like an idiot in front of thousands, but this morning's posting of string routines is going to accomplish exactly that. I didn't try linking (out of the library) four routines that I changed just recently. Naturally, I got bitten by my oversight. A slight code rearrangement is needed to placate asld. Here are the context diffs for the routines that will cause problems. My profuse apologies. -------------------------------- Cut here -------------------------------- echo x - memcmp.S.cdif sed '/^X/s///' > memcmp.S.cdif << '/' X*** memcmp.S.orig Fri Oct 6 10:01:32 1989 X--- memcmp.S Tue Oct 10 19:20:19 1989 X*************** X*** 5,14 **** X | s1 and s2. Returns zero if all characters are identical, a X | positive number if s1 greater than s2, a negative number otherwise. X X! BYTE_LIMIT = 10 | if n is above this, we work with words X! X! .define _MEMCMP X! .globl _MEMCMP X .text X _MEMCMP: X push bp X--- 5,15 ---- X | s1 and s2. Returns zero if all characters are identical, a X | positive number if s1 greater than s2, a negative number otherwise. X X! .define _MEMCMP X! .globl _MEMCMP X! X! BYTE_LIMIT = 10 | if n is above this, we work with words X! X .text X _MEMCMP: X push bp / echo x - memmove.S.cdif sed '/^X/s///' > memmove.S.cdif << '/' X*** memmove.S.orig Fri Oct 6 10:04:03 1989 X--- memmove.S Tue Oct 10 19:20:29 1989 X*************** X*** 11,20 **** X | overlap; since the performance penalty is insignificant, we X | use the safe memmove code for it as well. X X! BYTE_LIMIT = 12 | if n is above this, we work with words X! X! .define _MEMMOVE, _MEMCPY X! .globl _MEMMOVE, _MEMCPY X .text X _MEMMOVE: X _MEMCPY: X--- 11,21 ---- X | overlap; since the performance penalty is insignificant, we X | use the safe memmove code for it as well. X X! .define _MEMMOVE, _MEMCPY X! .globl _MEMMOVE, _MEMCPY X! X! BYTE_LIMIT = 12 | if n is above this, we work with words X! X .text X _MEMMOVE: X _MEMCPY: / echo x - strncpy.S.cdif sed '/^X/s///' > strncpy.S.cdif << '/' X*** strncpy.S.orig Fri Oct 6 11:11:42 1989 X--- strncpy.S Tue Oct 10 19:20:41 1989 X*************** X*** 7,16 **** X | with null characters. If the source is longer than n characters, X | the destination will not be null terminated. Returns s1. X X! BYTE_LIMIT = 10 | if n is above this, zero fill with words X! X! .define _STRNCPY X! .globl _STRNCPY X .text X _STRNCPY: X push bp X--- 7,17 ---- X | with null characters. If the source is longer than n characters, X | the destination will not be null terminated. Returns s1. X X! .define _STRNCPY X! .globl _STRNCPY X! X! BYTE_LIMIT = 10 | if n is above this, zero fill with words X! X .text X _STRNCPY: X push bp /