{
    "content": [
        {
            "type": "text",
            "text": "# COM_ERR (man)\n\n## NAME\n\ncomerr - common error display routine\n\n## SYNOPSIS\n\n#include <et/comerr.h>\nvoid (*proc) (const char *, long, const char *, valist);\nvoid comerr (const char *whoami, long code, const char *format, ...);\nproc = setcomerrhook (proc);\nproc = resetcomerrhook ();\nvoid initializeXXXXerrortable ();\n\n## DESCRIPTION\n\nComerr  displays  an  error message on the standard error stream stderr (see stdio(3S)) com‐\nposed of the whoami string, which should specify the program name or  some  subportion  of  a\nprogram,  followed  by  an  error  message  generated  from the code value (derived from com‐\npileet(1)), and a string produced using the format string and any  following  arguments,  in\nthe same style as fprintf(3).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "COM_ERR",
        "section": "",
        "mode": "man",
        "summary": "comerr - common error display routine",
        "synopsis": "#include <et/comerr.h>\nvoid (*proc) (const char *, long, const char *, valist);\nvoid comerr (const char *whoami, long code, const char *format, ...);\nproc = setcomerrhook (proc);\nproc = resetcomerrhook ();\nvoid initializeXXXXerrortable ();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "comerr - common error display routine\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "#include <et/comerr.h>\nvoid (*proc) (const char *, long, const char *, valist);\n\nvoid comerr (const char *whoami, long code, const char *format, ...);\n\nproc = setcomerrhook (proc);\n\nproc = resetcomerrhook ();\n\nvoid initializeXXXXerrortable ();\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Comerr  displays  an  error message on the standard error stream stderr (see stdio(3S)) com‐\nposed of the whoami string, which should specify the program name or  some  subportion  of  a\nprogram,  followed  by  an  error  message  generated  from the code value (derived from com‐\npileet(1)), and a string produced using the format string and any  following  arguments,  in\nthe same style as fprintf(3).\n\nThe  behavior  of  comerr  can  be modified using setcomerrhook; this defines a procedure\nwhich is called with the arguments passed to comerr, instead of the default internal  proce‐\ndure  which sends the formatted text to error output.  Thus the error messages from a program\ncan all easily be diverted to another form of diagnostic logging,  such  as  syslog(3).   Re‐\nsetcomerrhook  may  be  used to restore the behavior of comerr to its default form.  Both\nprocedures return the previous ``hook'' value.  These ``hook'' procedures must have the  dec‐\nlaration given for proc above in the synopsis.\n\nThe  initializeXXXXerrortable  routine  is  generated mechanically by compileet(1) from a\nsource file containing names and associated strings.  Each table has a name  of  up  to  four\ncharacters,  which  is  used in place of the XXXX in the name of the routine.  These routines\nshould be called before any of the corresponding error codes are used, so  that  the  comerr\nlibrary will recognize error codes from these tables when they are used.\n\nThe  comerr.h  header file should be included in any source file that uses routines from the\ncomerr library; executable files must be linked using ``-lcomerr'' in order  to  cause  the\ncomerr library to be included.\n\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "compileet (1), syslog (3).\n\nKen Raeburn, \"A Common Error Description Library for UNIX\".\n\n\n\nSIPB                                         22 Nov 1988                                  COMERR(3)",
                "subsections": []
            }
        }
    }
}