Print this page
11622 clean up rarer mandoc lint warnings


 147 STANDARD ERROR MESSAGE FORMAT
 148        The pfmt() function displays error messages in the following format:
 149 
 150          label: severity: text
 151 
 152 
 153 
 154        If no label was defined by a call to setlabel(3C), the message is
 155        displayed in the format:
 156 
 157          severity: text
 158 
 159 
 160 
 161        If pfmt() is called twice to display an error message and a helpful
 162        action or recovery message, the output can look like:
 163 
 164          label: severity: textlabel: TO FIX: text
 165 
 166 
 167 
 168 
 169 RETURN VALUES
 170        Upon success, pfmt() returns the number of bytes transmitted. Upon
 171        failure, it returns a negative value:
 172 
 173        -1
 174                 Write error to stream.
 175 
 176 
 177 EXAMPLES
 178        Example 1 Example of pfmt() function.
 179 
 180 
 181        Example 1:
 182 
 183 
 184          setlabel("UX:test");
 185          pfmt(stderr, MM_ERROR, "test:2:Cannot open file: %s\n",
 186               strerror(errno));
 187 
 188          displays the message:




 147 STANDARD ERROR MESSAGE FORMAT
 148        The pfmt() function displays error messages in the following format:
 149 
 150          label: severity: text
 151 
 152 
 153 
 154        If no label was defined by a call to setlabel(3C), the message is
 155        displayed in the format:
 156 
 157          severity: text
 158 
 159 
 160 
 161        If pfmt() is called twice to display an error message and a helpful
 162        action or recovery message, the output can look like:
 163 
 164          label: severity: textlabel: TO FIX: text
 165 
 166 


 167 RETURN VALUES
 168        Upon success, pfmt() returns the number of bytes transmitted. Upon
 169        failure, it returns a negative value:
 170 
 171        -1
 172                 Write error to stream.
 173 
 174 
 175 EXAMPLES
 176        Example 1 Example of pfmt() function.
 177 
 178 
 179        Example 1:
 180 
 181 
 182          setlabel("UX:test");
 183          pfmt(stderr, MM_ERROR, "test:2:Cannot open file: %s\n",
 184               strerror(errno));
 185 
 186          displays the message: