File: err.c

package info (click to toggle)
icmpinfo 1.11-12
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 216 kB
  • ctags: 217
  • sloc: ansic: 1,024; makefile: 50
file content (24 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
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;
}