On 1/1/23 01:08, Alejandro Colomar wrote:
On 12/31/22 20:08, Alejandro Colomar wrote:
This makes the code much more readable and self-documented. While doing
this, I noticed a few bugs, and other cases which may be bugs or not.
Switching to this specialized API makes it easier to spot such
On 12/31/22 20:08, Alejandro Colomar wrote:
This makes the code much more readable and self-documented. While doing
this, I noticed a few bugs, and other cases which may be bugs or not.
Switching to this specialized API makes it easier to spot such bugs, but
since I'm not familiar wit
random_uniform(num2 - num3 + 1) + num3;
+ num1 = arc4random_range(num1, num2);
Signed-off-by: Alejandro Colomar
---
games/boggle/boggle/bog.c | 2 +-
games/canfield/canfield/canfield.c | 2 +-
games/mille/init.c
Signed-off-by: Alejandro Colomar
---
[resent, but to tech@, per Dave's advice]
Hi,
The patch to the manual page is still a draft; I know it has formatting
issues; I don't know mdoc(7) enough to write in it. I CCd Ingo so that
he may help me improve it.
Theo, and any others, pleas
Hi Zack,
On 10/29/21 16:53, Zack Weinberg via Libc-alpha wrote:
On Fri, Oct 29, 2021, at 9:55 AM, Theo de Raadt wrote:
wrote:
On October 29, 2021 7:29 AM, Alejandro Colomar wrote:
On 10/29/21 13:15, Alejandro Colomar wrote:
Hi,
As the manual pages says, SUSv2 marked it as LEGACY, and
Hello Ali,
On 25/2/22 17:22, Ali Farzanrad wrote:
"Alejandro Colomar (man-pages)" wrote:
char dest[SIZE];
char *end;
end = &dest[SIZE - 1];
stpecpy(dest, "Hello world", end);
Perfect way to introduce new hidden bac
Hi Theo,
On 2/13/22 23:45, Theo de Raadt wrote:
> Your proposal isn't an improvement over the current situation with strl*
> functions, and I don't think this is helpful.
>
> Alejandro Colomar (man-pages) wrote:
>>Compared to other string copy and concatenation
len == size) {
len--;
printf("Trunc: ");
}
printf("%ti: %s\n", len, buf);
}
SEE ALSO
snprintf(3), strncat(3), strncpy(3), stpsecpy(3)
alx2022-02-13 stpecpy(3)
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Hi Joseph,
On 10/29/21 18:31, Joseph Myers wrote:
On Fri, 29 Oct 2021, Alejandro Colomar (man-pages) via Libc-alpha wrote:
The broader context is that I was trying to make the deprecation notices more
consistent in the Linux manpages, by using the [[deprecated]] attribute where
appropriate
n the past, and
incorrectly led to readpassphrase(3).
readpassphrase(3) has a few too many features/extensions
for my taste, but at least it is harder to abuse.
}
Alejandro Colomar :
{
I found readpassphrase(3) in FreeBSD and OpenBSD. It is
also present in libb
g for.
What system are you on?
<https://libbsd.freedesktop.org/wiki/>
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Hi Ævar,
On 10/29/21 13:40, Ævar Arnfjörð Bjarmason wrote:
On Fri, Oct 29 2021, Alejandro Colomar (man-pages) wrote:
[Add a few CCs, since I mentioned them.]
[I'm not sure what the full context of this thread is, but just replying
from the POV of git@ being CC'd on this]
[Add a few CCs, since I mentioned them.]
On 10/29/21 13:15, Alejandro Colomar wrote:
Hi,
As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't
have it at all. The manual page goes further and says "This function is
obsolete. Do not use it." in its first line
.
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
macro, to avoid repetition.
I can prepare a patch if you confirm the bug.
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
On 6/28/21 1:32 PM, Alejandro Colomar (man-pages) wrote:
The other use is where you want a sequence of:
len *= str_copy(dest + len, dest_len - len, src);
But don't really want to test for overflow after each call.
This is a legitimate use of strscpy(). Please, add it to glibc, as
Hello David,
On 6/28/21 10:15 AM, David Laight wrote:
From: Alejandro Colomar
Sent: 27 June 2021 20:47
On 6/27/21 9:26 PM, Alejandro Colomar (man-pages) wrote:
It is designed so that usage requires the minimum number of lines of
code for complete usage (including error handling checks
On 6/27/21 9:26 PM, Alejandro Colomar (man-pages) wrote:
It is designed so that usage requires the minimum number of lines of
code for complete usage (including error handling checks):
[[
// When we already checked that 'size' is >= 1
// and truncation is not an issue:
strcpys_
but I expect it to be free of any bugs known of the
existing str*cpy() interfaces.
What do you think about this function? Would you want to add it to glibc?
Thanks,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
On 1/24/21 5:11 PM, Teran McKinney wrote:
> On 2021-01-24 13-18-46 , Alejandro Colomar wrote:
>> This is useful for using tee to just write to a file,
>> at the end of a pipeline,
>> without having to redirect to /dev/null
>>
>> Example:
>>
>>
This is useful for using tee to just write to a file,
at the end of a pipeline,
without having to redirect to /dev/null
Example:
echo 'foo' | sudo tee -q /etc/foo;
is equivalent to the old (and ugly)
echo 'foo' | sudo tee /etc/foo >/dev/null;
Signed-off-by: Alejandro
On 1/23/21 5:19 PM, Anders Damsgaard wrote:
> (lots of Cc's removed)
>
> * Alejandro Colomar [2021-01-22 00:12:58 +0100]:
>
>> This is useful for using tee to just write to a file,
>> at the end of a pipeline,
>> without having to redirect to /dev/null.
>
This is useful for using tee to just write to a file,
at the end of a pipeline,
without having to redirect to /dev/null
Example:
echo 'foo' | sudo tee -q /etc/foo;
is equivalent to the old (and ugly)
echo 'foo' | sudo tee /etc/foo >/dev/null;
---
v2: Add --silent synonym to --quiet, per GNU gu
I added a few FreeBSD CCs that I found on their tee.c's git blame,
because the freebsd list rejects external mail.
Please have a look at the proposal below, and the discussion that
started on gnu coreutil's list.
On 1/22/21 12:12 AM, Alejandro Colomar wrote:
This is useful for us
similar interface: grep
Signed-off-by: Alejandro Colomar
---
v2: Add --silent synonym to --quiet, per GNU guidelines.
I tested tee --silent with success.
src/tee.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/tee.c b/src/tee.c
index c81faea91.
[CC += mtk, linux-api, freebsd, openbsd]
On 1/21/21 10:26 PM, Alejandro Colomar (man-pages) wrote:
> Hi Berny,
>
> On 1/21/21 10:01 PM, Bernhard Voelker wrote:
>> On 1/21/21 7:39 PM, Alex Henrie wrote:
>>> That said, I would love to see `tee -q` added to a future r
te the array length.
It does what nitems(_a) did before this patch.
I'd like to put the contents of this patch in the public domain.
Feel free to do anything with it.
Signed-off-by: Alejandro Colomar
---
Hi,
I sent a patch like this one to glibc a few days ago.
I hope it's good for yo
er to glibc. They are
concerned about adding a new non-standard specifier, but if more C libs
are going to add it at the same time, it may become a thing.
Alex.
From 1a41d44571ccaf9ffaf36b2c2b96dd34e48eb5b7 Mon Sep 17 00:00:00 2001
From: Alejandro Colomar
Date: Mon, 27 Apr 2
28 matches
Mail list logo