Re: Adding struct-xxx link pages for structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/23/21 10:53 PM, Alejandro Colomar (man-pages) wrote:
>> The use of a dash/minus as a separator "feels" unorthodox to me, but
>> perhaps that is just the pull of blind tradition.  I think it's actually
>> a better choice than an underscore because of course "-" is not valid in
>> a C identifier, and "_" is, so ambiguity is avoided.
>
> I used struct-foo because man has the ability to allow either
> 'man struct-foo' or 'man struct foo', and the latter looks very
> intuitive from a C-syntax perspective (I learnt this from the git manual
> pages, where you can do 'man git log' or 'man git-log').  'man man'
> doesn't specify this behavior, so I'll read the source code and try to
> confirm how it works.

I would need some time to understand the code, but perhaps it's around
lines 1303 or 1396

.../man-db$ grep -rn "'-'" src/man.c;
1013:	if (dbfilters && (dbfilters[0] != '-') && !preprocessors) {
1303:			case '-':
1396:			if (*pp_string == ' ' || *pp_string == '-')
2921:		if (*source->pointer != '-')
3222:	if (*in->pointer != '-')
.../man-db$ grep -rn "' '" src/man.c;
797:			case ' ':
810:				if (*(manopt + 1) == ' ')
1302:			case ' ':
1396:			if (*pp_string == ' ' || *pp_string == '-')
2415:					putchar (' ');
4051:		} else if (cmd[i] == '\t' || cmd[i] == ' ' || cmd[i] == '\n' ||
$

>
> Regards,
>
> Alex
>

--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux