Re: [dev] sbase: ed

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Sat, 28 Nov 2020 13:44:16 +0100

> Hi,

Hi Spaceman,

> When compiled with musl-gcc (latest) on Slackware 14.2 this:
>
> static void
> dowrite(const char *fname, int trunc)
> {
> …
> printf("%zu\n", bytecount);
> }
>
> does not work for me (it outputs a blank line). Given my rudimentary
> knowledge of C and looking up on stackoverflow this does work.

Could you give the command you're passing to ed so we can reproduce the
issue?

> static void
> dowrite(const char *fname, int trunc)
> {
> …
> printf("%lu\n", (unsigned long) bytecount);
> }
>
> Apparently '%zu' is not very portable (limited to C99).

%zu is very portable (as is C99).
Received on Sat Nov 28 2020 - 13:44:16 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 28 2020 - 13:48:08 CET