File: err.c

package info (click to toggle)
icmpinfo 1.11-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ansic: 1,318; makefile: 50
file content (24 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdlib.h>

extern char *pname;

int err_quit(str)
	char *str;
{
  fprintf(stderr,"%s: %s\n",pname,str);
  exit(1);
}
int err_sys(str)
        char *str;
{
  perror(pname);
  fprintf(stderr,"\t%s\n",str);
  exit(2);
}
int err_ret(str)
	char *str;
{
  fprintf(stderr,"%s: %s\n",pname,str);
  return 0;
}