Customized sphinx c-domain

LinuxDoc brings a customized Sphinx’s C Domain extension. Here is a list of customizations of the CObject:

  • Handle signatures of function-like macros well. Don’t try to deduce arguments types of function-like macros.

  • Moved the duplicate C object description warnings for function declarations in the nitpicky mode. See Sphinx documentation for the config values for nitpicky and nitpick_ignore.

  • Add option name to the c:function: directive. With option name the ref-name of a function can be modified. E.g. you can rename the reference name of a function with a common name like open or ioctl:

    .. c:function:: int ioctl( int fd, int request )
       :name: VIDIOC_LOG_STATUS
    

    The func-name (e.g. ioctl) remains in the output but the ref-name changed from ioctl to VIDIOC_LOG_STATUS. The index entry for this function is also changed to VIDIOC_LOG_STATUS and the function can now referenced by:

    :c:func:`VIDIOC_LOG_STATUS`