3 ms·
current macOS man pages are kind of off-putting, even for someone who has been using c and unix for decades. I mean, really, what is this? InFILE In*
by jerrysievert 3y ago
current macOS man pages are kind of off-putting, even for someone who has been using c and unix for decades. I mean, really, what is this?
InFILE In*
fopen(Inconst Inchar In* Inrestrict Inpath, Inconst Inchar In* Inrestrict Inmode);
Inconst InFILE In* Inrestrict Inpath?!
FILE *fopen(const char *, const char *mode);
it's like looking at a ton of gibberish and trying to figure out what it says. it doesn't match the languages, it doesn't appear to match any standards.
I learned a lot from man pages in the 80's and 90's, and if I had to try to learn now from something like this, I'd likely just throw up my hands and choose another career.
- JdeBP 3y agoMy educated guess is that something is trying to italicize various keywords, and whatever text processing is going on isn't working, but producing bogus "In" literal text instead. .I is the "an" macro for italics, after all.
- JdeBP 3y agoCompare what one sees when the text processing works, and what parts are italicized. * https://tty0.social/@JdeBP/110427220635184435 https://tty0.social/@JdeBP/110427220635184435 It even prettifies those ``'' quotes, notice. This is vanilla older FreeBSD man, using groff, but actually allowing groff to do the things that it is capable of.
- vulcan01 3y agoThis matches what I see using less as manpager and every terminal I have installed on MacOS (Apple Terminal, kitty, alacritty+Tmux, iTerm).
- astrange 3y agoLooks fine here. https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/fopen.3.html https://developer.apple.com/library/archive/documentation/Sy...
- jerrysievert 3y agoamazing how web pages look different than terminal output :)
- astrange 3y agoLooked fine in two terminal apps too, but you can't copy paste that!
- quesera 3y agoI don't think that's a macOS bug. Your terminal emulation might be borked. What terminal are you using? I just tested on Terminal.app and iTerm2.app -- `man fopen` looks correct on both. The following should be equivalent, but might perform differently for you depending on what part of your config is bad: cat /usr/share/man/man3/fopen.3 | nroff -man | more
- jerrysievert 3y agoiterm2.app - but I also use fish as my shell TERM=xterm-256color and LESS_TERMCAP_us=In
- iamthad 3y agoYour LESS_TERMCAP_us is the issue here; it's literally putting "In" wherever an underline is supposed to start.
- e63f67dd-065b 3y agoAs others have noted, the 'In' looks like a rendering bug with whatever terminal emulator you're using. Otherwise it looks pretty normal: `fopen (const char *restrict filename, const char *restrict mode)` looks like a perfectly good C function, and (if you already know C) it's easy to see the parts that don't look like they belong.