Deleted Added
full compact
err.c (7803) err.c (18286)
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 53 unchanged lines hidden (view full) ---

62}
63
64void
65err_set_exit(void (*ef)(int))
66{
67 err_exit = ef;
68}
69
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 53 unchanged lines hidden (view full) ---

62}
63
64void
65err_set_exit(void (*ef)(int))
66{
67 err_exit = ef;
68}
69
70__dead void
70void
71#ifdef __STDC__
72err(int eval, const char *fmt, ...)
73#else
74err(eval, fmt, va_alist)
75 int eval;
76 const char *fmt;
77 va_dcl
78#endif
79{
80 va_list ap;
81#if __STDC__
82 va_start(ap, fmt);
83#else
84 va_start(ap);
85#endif
86 verr(eval, fmt, ap);
87 va_end(ap);
88}
89
71#ifdef __STDC__
72err(int eval, const char *fmt, ...)
73#else
74err(eval, fmt, va_alist)
75 int eval;
76 const char *fmt;
77 va_dcl
78#endif
79{
80 va_list ap;
81#if __STDC__
82 va_start(ap, fmt);
83#else
84 va_start(ap);
85#endif
86 verr(eval, fmt, ap);
87 va_end(ap);
88}
89
90__dead void
90void
91verr(eval, fmt, ap)
92 int eval;
93 const char *fmt;
94 va_list ap;
95{
96 int sverrno;
97
98 sverrno = errno;

--- 5 unchanged lines hidden (view full) ---

104 (void)fprintf(err_file, ": ");
105 }
106 (void)fprintf(err_file, "%s\n", strerror(sverrno));
107 if(err_exit)
108 err_exit(eval);
109 exit(eval);
110}
111
91verr(eval, fmt, ap)
92 int eval;
93 const char *fmt;
94 va_list ap;
95{
96 int sverrno;
97
98 sverrno = errno;

--- 5 unchanged lines hidden (view full) ---

104 (void)fprintf(err_file, ": ");
105 }
106 (void)fprintf(err_file, "%s\n", strerror(sverrno));
107 if(err_exit)
108 err_exit(eval);
109 exit(eval);
110}
111
112__dead void
112void
113#if __STDC__
114errx(int eval, const char *fmt, ...)
115#else
116errx(eval, fmt, va_alist)
117 int eval;
118 const char *fmt;
119 va_dcl
120#endif
121{
122 va_list ap;
123#if __STDC__
124 va_start(ap, fmt);
125#else
126 va_start(ap);
127#endif
128 verrx(eval, fmt, ap);
129 va_end(ap);
130}
131
113#if __STDC__
114errx(int eval, const char *fmt, ...)
115#else
116errx(eval, fmt, va_alist)
117 int eval;
118 const char *fmt;
119 va_dcl
120#endif
121{
122 va_list ap;
123#if __STDC__
124 va_start(ap, fmt);
125#else
126 va_start(ap);
127#endif
128 verrx(eval, fmt, ap);
129 va_end(ap);
130}
131
132__dead void
132void
133verrx(eval, fmt, ap)
134 int eval;
135 const char *fmt;
136 va_list ap;
137{
138 if (! err_file)
139 err_set_file((FILE *)0);
140 (void)fprintf(err_file, "%s: ", __progname);

--- 76 unchanged lines hidden ---
133verrx(eval, fmt, ap)
134 int eval;
135 const char *fmt;
136 va_list ap;
137{
138 if (! err_file)
139 err_set_file((FILE *)0);
140 (void)fprintf(err_file, "%s: ", __progname);

--- 76 unchanged lines hidden ---