Re: Add support for hex floats to *scanf

2021-04-03 Thread Michael Forney
On 2020-01-28, Michael Forney wrote: > On 2019-05-28, Michael Forney wrote: >> I noticed that OpenBSD's fscanf doesn't yet support hex float strings, >> which are standardized in C99. I am using them in my application (which >> I would like to support OpenBSD), since the

Re: ksh tab completion bug

2020-11-10 Thread Michael Forney
Hi Anton, Thanks for providing those links to the past discussion. Anton Lindqvist wrote: > As I would address this, the numbers of arguments passed to the > completion related routines is already painfully^W long. I would rather > take a step back and introduce a `struct globstate' (just an

ksh tab completion bug

2020-11-09 Thread Michael Forney
I noticed some strange behavior of ksh in emacs mode when completing file names that contain spaces (or other characters that need escaping). To illustrate the problem, consider two files 'a b c test1' and 'a b c test2'. ksh will correctly complete `a` and `a\ b\ c\ ` to the common prefix `a\ b\

Re: ksh: Use typedef for function pointer

2020-05-08 Thread Michael Forney
On 2020-05-08, Jeremie Courreges-Anglas wrote: > Out of curiosity, do you run (o)ksh on machines where this matters? Yes, my C compiler (https://sr.ht/~mcf/cproc/) follows the standard fairly strictly. > Aside from the increased portability, the code doesn't look worse, and > fewer uses of void

ksh: Use typedef for function pointer

2020-05-07 Thread Michael Forney
I originally submitted this patch as a portability fix to Brian Callahan's oksh, but he suggested I submit it here instead. Conversion of function pointer to void pointer is not allowed in ISO C, though POSIX requires it for dlsym(). However, here we are also comparing function pointer to void

ntpd: prevent duplicate definitions of `conf` and `ibus_dns`

2020-04-04 Thread Michael Forney
This prevents a linking error with gcc 10, which enables -fno-common by default. ISO C requires exactly one definition of objects with external linkage throughout the entire program. `conf` is already defined in ntpd.c and declared extern in ntpd.h, so the definition in parse.y is redundant.

acme-client: prevent duplicate definitions of global variables

2020-01-31 Thread Michael Forney
Every source file that includes extern.h will have its own definition of these variables. Since many compilers allocate the variables with .comm, they end up getting merged by the linker without error. However, ISO C requires exactly one definition of objects with external linkage. gcc 10 will

Re: Add support for hex floats to *scanf

2020-01-28 Thread Michael Forney
On 2019-05-28, Michael Forney wrote: > I noticed that OpenBSD's fscanf doesn't yet support hex float strings, > which are standardized in C99. I am using them in my application (which > I would like to support OpenBSD), since the "%a" format specifier is a > convenient way

[PATCH libssl] Fix typo in man page

2019-12-02 Thread Michael Forney
--- src/lib/libssl/man/SSL_CTX_set_cipher_list.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 b/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 index 64da0092d..6f15dbaaa 100644 ---

Add support for hex floats to *scanf

2019-05-28 Thread Michael Forney
I noticed that OpenBSD's fscanf doesn't yet support hex float strings, which are standardized in C99. I am using them in my application (which I would like to support OpenBSD), since the "%a" format specifier is a convenient way to preserve the exact floating point value. strtod already supports

Re: doas: add fd variable, use fd instead of i, to main()

2017-03-09 Thread Michael Forney
On Sun, Nov 27, 2016 at 12:31 AM, Hajime Edakawa wrote: > Dear tech, > > I guessed it more better to use fd instead of i. > > Would this be OK? > > Sincerely, tech > Edakawa > > Index: doas.c > === > RCS