> 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).