Thread (2 messages) 2 messages, 1 author, 2021-05-21

Ping: Consistent parameter names

From: Alejandro Colomar (man-pages) <hidden>
Date: 2021-05-21 22:19:52

Ping.

On 3/4/21 3:50 PM, Alejandro Colomar (man-pages) wrote:
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help