Consistent parameter names

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

 



Hello Michael,

I found different terms for parameters that refer to a same thing
in different functions (usually a '[const] char *'):
	 - filename
	 - file
	 - path
	 - pathname
	 - Maybe others; I don't know

For 'FILE *' we have more or less the same,
although this one is much more consistent (>90% use 'stream'):
	 - stream
	 - streamp
	 - s
	 - fp
	 - file
	 - filehandle
	 - A few others in specific cases

Also for strings, there are
	- s
	- str
	- string
	- maybe others

There are probably other cases with the same problem.
I think these parameters should have a more consistent naming.
But which names should we use?

I tend to use short names such as fname, fd, s, ...
but I don't know if you may prefer longer names for documentation purposes.

What would you do about it?

Thanks,

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