err - #include #include #include #include #include #include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <unistd.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <stdlib.h> /* * 4.4BSD error printing functions. */ /* * This is initialized by crt0, though it actually lives in errno.c */ extern char **__argv; /* * Routine to print error message text to stderr. */ static void __senderr(void *junk, const char *data, size_t len) { (void)junk; /* not needed or used */ write(STDERR_FILENO, data, len); } /* * Shortcut to call __senderr on a null-terminated string. * (__senderr is set up to be called by __vprintf.) */ static void __senderrstr(const char *str) { __senderr(NULL, str, strlen(str)); } /* * Common routine for all the *err* and *warn* functions. */ static void __printerr(int use_errno, const char *fmt, va_list ap) { const char *errmsg; const char *prog; /* * Get the error message for the current errno. * Do this early, before doing anything that might change the * value in errno. */ errmsg = strerror(errno);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Page1 / 3

err - #include #include #include #include #include #include...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online