Small update to err.[ch]
This commit is contained in:
		
							parent
							
								
									84587a4c32
								
							
						
					
					
						commit
						55b0b396dc
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		
							
								
								
									
										2
									
								
								cli.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								cli.c
									
										
									
									
									
								
							|  | @ -24,6 +24,8 @@ | ||||||
| #include "err.h" | #include "err.h" | ||||||
| #include "otp.h" | #include "otp.h" | ||||||
| 
 | 
 | ||||||
|  | extern const char *__progname; | ||||||
|  | 
 | ||||||
| static void | static void | ||||||
| usage(void) | usage(void) | ||||||
| { | { | ||||||
|  |  | ||||||
							
								
								
									
										7
									
								
								err.c
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								err.c
									
										
									
									
									
								
							|  | @ -12,6 +12,11 @@ | ||||||
|  * along with this software. If not, see |  * along with this software. If not, see | ||||||
|  * <http://creativecommons.org/publicdomain/zero/1.0/>.
 |  * <http://creativecommons.org/publicdomain/zero/1.0/>.
 | ||||||
|  */ |  */ | ||||||
|  | /*
 | ||||||
|  |  * Inspired by OpenBSD's `err.h' header, found at | ||||||
|  |  * http://man.openbsd.org/err.3
 | ||||||
|  |  * http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/gen/verr.c
 | ||||||
|  |  */ | ||||||
| 
 | 
 | ||||||
| #include <errno.h> | #include <errno.h> | ||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
|  | @ -21,6 +26,8 @@ | ||||||
| 
 | 
 | ||||||
| #include "err.h" | #include "err.h" | ||||||
| 
 | 
 | ||||||
|  | extern const char *__progname; | ||||||
|  | 
 | ||||||
| void | void | ||||||
| err(int eval, const char *fmt, ...) | err(int eval, const char *fmt, ...) | ||||||
| { | { | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								err.h
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								err.h
									
										
									
									
									
								
							|  | @ -13,8 +13,6 @@ | ||||||
|  * <http://creativecommons.org/publicdomain/zero/1.0/>.
 |  * <http://creativecommons.org/publicdomain/zero/1.0/>.
 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| extern const char *__progname; |  | ||||||
| 
 |  | ||||||
| void err(int, const char *, ...); | void err(int, const char *, ...); | ||||||
| void errx(int, const char *, ...); | void errx(int, const char *, ...); | ||||||
| void warn(const char *, ...); | void warn(const char *, ...); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue