File: ioperror.c

package info (click to toggle)
egcs 1.1.2-0slink2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 80,844 kB
  • ctags: 90,426
  • sloc: ansic: 675,911; cpp: 103,606; sh: 26,374; pascal: 22,878; yacc: 13,856; asm: 10,896; makefile: 8,137; lisp: 7,252; exp: 3,490; fortran: 1,519; sed: 587; objc: 482; awk: 223; csh: 106; ml: 94; perl: 18
file content (22 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "libioP.h"
#include <errno.h>
#include <string.h>
#ifndef errno
extern int errno;
#endif

#ifndef _IO_strerror
extern char* _IO_strerror __P((int));
#endif

void
_IO_perror (s)
     const char *s;
{
  char *error = _IO_strerror (errno);

  if (s != NULL && *s != '\0')
    _IO_fprintf (_IO_stderr, "%s:", s);

  _IO_fprintf (_IO_stderr, "%s\n", error ? error : "");
}