error.c (b97fa2ef508bb1cc99621edb8b6d03845b55b8bd) | error.c (afb033d5c4f01a464f57fe8e68d741246d9df492) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * |
36 * $Id$ | 36 * $Id: error.c,v 1.8 1997/02/22 13:58:22 peter Exp $ |
37 */ 38 39#ifndef lint 40static char const sccsid[] = "@(#)error.c 8.2 (Berkeley) 5/4/95"; 41#endif /* not lint */ 42 43/* 44 * Errors and exceptions. --- 95 unchanged lines hidden (view full) --- 140 doformat(&errout, msg, ap); 141 out2c('\n'); 142 } 143 flushall(); 144 exraise(cond); 145} 146 147 | 37 */ 38 39#ifndef lint 40static char const sccsid[] = "@(#)error.c 8.2 (Berkeley) 5/4/95"; 41#endif /* not lint */ 42 43/* 44 * Errors and exceptions. --- 95 unchanged lines hidden (view full) --- 140 doformat(&errout, msg, ap); 141 out2c('\n'); 142 } 143 flushall(); 144 exraise(cond); 145} 146 147 |
148#if __STDC__ | 148#ifdef __STDC__ |
149void 150error(char *msg, ...) 151#else 152void 153error(va_alist) 154 va_dcl 155#endif 156{ | 149void 150error(char *msg, ...) 151#else 152void 153error(va_alist) 154 va_dcl 155#endif 156{ |
157#if !__STDC__ | 157#ifndef __STDC__ |
158 char *msg; 159#endif 160 va_list ap; | 158 char *msg; 159#endif 160 va_list ap; |
161#if __STDC__ | 161#ifdef __STDC__ |
162 va_start(ap, msg); 163#else 164 va_start(ap); 165 msg = va_arg(ap, char *); 166#endif 167 exverror(EXERROR, msg, ap); 168 va_end(ap); 169} 170 171 | 162 va_start(ap, msg); 163#else 164 va_start(ap); 165 msg = va_arg(ap, char *); 166#endif 167 exverror(EXERROR, msg, ap); 168 va_end(ap); 169} 170 171 |
172#if __STDC__ | 172#ifdef __STDC__ |
173void 174exerror(int cond, char *msg, ...) 175#else 176void 177exerror(va_alist) 178 va_dcl 179#endif 180{ | 173void 174exerror(int cond, char *msg, ...) 175#else 176void 177exerror(va_alist) 178 va_dcl 179#endif 180{ |
181#if !__STDC__ | 181#ifndef __STDC__ |
182 int cond; 183 char *msg; 184#endif 185 va_list ap; | 182 int cond; 183 char *msg; 184#endif 185 va_list ap; |
186#if __STDC__ | 186#ifdef __STDC__ |
187 va_start(ap, msg); 188#else 189 va_start(ap); 190 cond = va_arg(ap, int); 191 msg = va_arg(ap, char *); 192#endif 193 exverror(cond, msg, ap); 194 va_end(ap); --- 93 unchanged lines hidden --- | 187 va_start(ap, msg); 188#else 189 va_start(ap); 190 cond = va_arg(ap, int); 191 msg = va_arg(ap, char *); 192#endif 193 exverror(cond, msg, ap); 194 va_end(ap); --- 93 unchanged lines hidden --- |