err.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <html>
  2. <head>
  3. <title>err</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>err</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. err - print error messages
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;err.h&gt;<br>
  13. <br>
  14. void<br>
  15. err(int <em>exitcode</em>, const char *<em>format</em>, ...);<br>
  16. <br>
  17. void<br>
  18. errx(int <em>exitcode</em>, const char *<em>format</em>, ...);<br>
  19. <br>
  20. void<br>
  21. verr(int <em>exitcode</em>, const char *<em>format</em>, va_list);<br>
  22. <br>
  23. void<br>
  24. verrx(int <em>exitcode</em>, const char *<em>format</em>, va_list);<br>
  25. <h3>Description</h3>
  26. The err, errx, verr, and verrx functions print error messages to
  27. the standard error stream.
  28. <p>
  29. errx prints the name of the program, a colon, the text generated by
  30. passing <em>format</em> and subsequent args through
  31. <A HREF=printf.html>printf</A>, and a newline. Then,
  32. <A HREF=exit.html>exit</A> is called and passed the supplied
  33. <em>exitcode</em>.
  34. <p>
  35. err does the same thing, except that a colon and the error string
  36. for the current error (obtained by calling
  37. <A HREF=strerror.html>strerror</A> on
  38. <A HREF=../syscall/errno.html>errno</A>) are printed prior to the
  39. newline.
  40. <p>
  41. verrx and verr are the same as errx and err respectively, except
  42. that the additional arguments for printf are taken to have been
  43. already packaged up in a va_list by use of the
  44. <A HREF=stdarg.html>stdarg</A> facility.
  45. <p>
  46. <h3>See Also</h3>
  47. <A HREF=warn.html>warn</A>
  48. </body>
  49. </html>