| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
more efficient. The problem with the previous implementation was that it
calculated the length of the first argument ("big") with wcslen() when
it was not necessary.
|
| |
|
|
|
|
| |
out. This will probably have to wait until after 5.0-R.
|
|
|
|
| |
committed with the tags unexpanded.
|
|
|
|
|
| |
instead of scanning forwards to find the end of the string then scanning
backwards to find the character.
|
|
|
|
| |
some style(9) bugs.
|
|
|
|
|
| |
Also add a note to the Bugs section pointing out that strerror() and
perror() share the same static buffer.
|
| |
|
|
|
|
|
|
|
| |
two major bugs:
- off-by-one overflow when the length of the source string exceeds or
equals the destination buffer size.
- old version was not padding the destination buffer with null wide chars
|
|
|
|
|
|
| |
conform to it.
Obtained from: OpenBSD
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
_DIAGASSERT macro on NetBSD, but we don't need it.
|
| |
|
| |
|
| |
|
|
|
|
| |
restrict qualifiers on their prototypes in <wchar.h>.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
bcopy(3) functions are prototyped in <strings.h> and not in
<string.h> anymore.
- Add a sentence about that to the respective HISTORY sections.
In the C source files:
- Include <string.h> or <strings.h> depending on what function
is to be compiled.
- Use ANSI-C function definitions.
|
|
|
|
|
| |
of the swab(3) function in its manual page to match the
standardization by POSIX.1-2001.
|
|
|
|
|
|
|
|
|
|
| |
.In string.h
with
.In strings.h
and adding a sentence to the HISTORY section.
- Use an ANSI-C function definition.
- Include <strings.h> instead of <string.h>.
- Apply style(9): Put a space after return keywords.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the ANSI-C format.
- Change the code a bit to hopefully save some cycles.
I.e. (simplified) change
a = b + 1;
while (--b & 0x7)
/* ... */
to
a = b;
for (; b & 0x7; b--)
/* ... */
and
while (--a >= 0)
/* ... */
to
for (; a > 0; a--)
/* ... */
- Equip two function arguments of swab() with the 'restrict'
type qualifier in form of the '__restrict' macro. This is
specified by POSIX.1-2001.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<strings.h> as the associated header file.
The prototypes have been moved there from <string.h> because
POSIX.1-2001 said so.
- Conditionally include either <strings.h> or <string.h> based
on whether the [r]index() or str[r]chr() functions are
compiled, respectively.
- Style(9) tells us to
- put a space after the return keyword
- to check for a NUL character without using the ! operator.
- use NULL instead of (type *)NULL where the compiler knows
the type.
Apply these rules.
- Rather use ANSI-C function definitions than K&R ones.
- For index(3), correct second function argument's type; it was
declared to be a `const char' before and is now an `int'.
|
|
|
|
|
|
|
| |
is <strings.h> and not <string.h> anymore.
- Tell the reader about this change in the HISTORY section.
- Switch to use an ANSI-C function definition.
- Include <strings.h> instead of <string.h> in the source file.
|
|
|
|
|
|
|
|
| |
the prototypes for both functions are now in the <strings.h>
header, as required by IEEE Std 1003.1-2001.
- Add one sentence about that in the HISTORY section.
- Include <strings.h> in the source file to have the prototypes
in scope when the _ANSI_SOURCE macro is defined.
|
| |
|
|
|
|
| |
a bit optimized now.
|
|
|
|
|
|
|
| |
concatenation and copy functions using the '__restrict' macro.
This is to satisfy IEEE Std 1003-1.2001.
- Use ANSI-C function definitions.
- Add the 'restrict' keyword to the manual pages, too.
|
|
|
|
|
|
|
| |
to the function definition of strxfrm(3) in form of our
'__restrict' macro.
- Use an ANSI-C function definition for strxfrm(3).
- Change the manual page accordingly.
|
|
|
|
| |
MFC after: 2 days
|
|
|
|
|
|
| |
PR: misc/40104
Submitted by: Neal Fachan <neal@isilon.com>
MFC after: 3 days
|
|
|
|
| |
I believe have made all of libc .c's as consistent as possible.
|
| |
|
| |
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
o Restore vendor ID.
o Order variable types by size.
o Remove a gratuitous temporary variable.
Submitted by: bde
|
|
|
|
|
|
|
| |
style(9):
o Order variables in declarations.
o Move initialization out of declaration.
o Fix over-indents in previous delta.
|
|
|
|
|
| |
Submitted by: Joseph Mallett <jmallett@xmach.org>
Reviewed by: md5(1)
|
|
|
|
| |
Stop abusing the .%J macro for where the .Pa macro should have been used.
|
|
|
|
|
| |
PR: 33298
Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
|
|
|
|
|
|
|
|
|
| |
the first revision of strcpy(3)'s section is included, but should be
removed as the Security Architecture document is committed and
completed.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
|
|
|
|
|
|
|
| |
CONSIDERATIONS' as a source for relevant sample code.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
|