WRITE_GLOBAL(MDOC) MDOC WRITE_GLOBAL(MDOC)

NAME

function/write_globalglobal variables and constants

DESCRIPTION

  1. Write a SYNOPSIS describing:
    • The err() function defined in <err.h> taking a variable number of arguments where he first is an integer exit(3) value and the second a format string as accepted by printf(3). This function does not return.
    • The global integer variable errno defined in <errno.h>.
    • The first few of the values the error variable can take, EPERM=1, ENOENT=2, ESRCH=3, EINTR=4.
  2. How would you mark up the following sentence in the DESCRIPTION?
    If the variable errno hat the value ENOENT, the function err() prints the message "No such file or directory".
Note: In a real system, those features would probably not be documented in the same manual page, and there are too many error numbers to list them all in the SYNOPSIS, so they would more likely be documented in the DESCRIPTION.

HINTS

  1. Introduction: SYNOPSIS section for library functions
  2. The MACRO OVERVIEW section of the mdoc(7) manual.

SOLUTIONS

htmlmdoc
September 27, 2015 bsd.lv