#1126616 /usr/share/man/man3/fgets.3.gz: fgets(3) function signature is messed up

#1126616#5
Date:
2026-01-29 17:11:48 UTC
From:
To:
Dear Maintainer,

`man fgets.3` shows the function signature to be

       char *fgets(int size;
                   char s[restrict size], int size, FILE *restrict stream);

Which seems to be wrong. For reference, `man fgets.3p`
(manpages-posix-dev) shows:

       char *fgets(char *restrict s, int n, FILE *restrict stream);

I believe `int size;` before `char s[restrict size]` is syntactically
and semantically wrong.

The same error also exists in `fgetc.3`, `getchar.3`, and `ungetc.3`.

Maybe something like this would be more apt?:

       char *fgets(char s[restrict size], int size, FILE *restrict stream);

#1126616#10
Date:
2026-01-29 17:48:08 UTC
From:
To:
"The same error also exists in `fgetc.3`, `getchar.3`, and `ungetc.3`."

By that I mean those manpages also have the lines

        char *fgets(int size;
                    char s[restrict size], int size, FILE *restrict stream);

in them.