fix: use `#pragma once' instead of guards
This commit is contained in:
		
							parent
							
								
									47e6204e08
								
							
						
					
					
						commit
						c2c5440b21
					
				
					 7 changed files with 7 additions and 22 deletions
				
			
		
							
								
								
									
										5
									
								
								arg.h
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								arg.h
									
										
									
									
									
								
							|  | @ -31,8 +31,7 @@ | ||||||
|  * by 20h |  * by 20h | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef _ARG_H_ | #pragma once | ||||||
| #define _ARG_H_ |  | ||||||
| 
 | 
 | ||||||
| #ifndef COSMOPOLITAN | #ifndef COSMOPOLITAN | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  | @ -79,5 +78,3 @@ extern char *argv0; | ||||||
|                 (brk_ = 1, (argv[0][i_+1] != '\0')?\ |                 (brk_ = 1, (argv[0][i_+1] != '\0')?\ | ||||||
|                     (&argv[0][i_+1]) :\ |                     (&argv[0][i_+1]) :\ | ||||||
|                     (argc--, argv++, argv[0]))) |                     (argc--, argv++, argv[0]))) | ||||||
| 
 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								bin.h
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								bin.h
									
										
									
									
									
								
							|  | @ -11,8 +11,7 @@ | ||||||
|  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 |  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef _BIN_H_ | #pragma once | ||||||
| #define _BIN_H_ |  | ||||||
| 
 | 
 | ||||||
| #include "feuille.h" | #include "feuille.h" | ||||||
| 
 | 
 | ||||||
|  | @ -21,5 +20,3 @@ int      write_paste(char *, unsigned long, char *); | ||||||
| 
 | 
 | ||||||
| char    *generate_id(int); | char    *generate_id(int); | ||||||
| char    *create_url(char *); | char    *create_url(char *); | ||||||
| 
 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| # feuille version
 | # feuille version
 | ||||||
| VERSION = 2.1.2 | VERSION = 2.1.4 | ||||||
| 
 | 
 | ||||||
| # paths (customize them to fit your system)
 | # paths (customize them to fit your system)
 | ||||||
| PREFIX = /usr/local | PREFIX = /usr/local | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
| . ftr VB CB | . ftr VB CB | ||||||
| . ftr VBI CBI | . ftr VBI CBI | ||||||
| .\} | .\} | ||||||
| .TH "feuille" "1" "November 2022" "feuille 2.1.2" "" | .TH "feuille" "1" "November 2022" "feuille 2.1.4" "" | ||||||
| .hy | .hy | ||||||
| .SH NAME | .SH NAME | ||||||
| .PP | .PP | ||||||
|  |  | ||||||
|  | @ -11,8 +11,7 @@ | ||||||
|  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 |  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef _FEUILLE_H_ | #pragma once | ||||||
| #define _FEUILLE_H_ |  | ||||||
| 
 | 
 | ||||||
| typedef struct Settings { | typedef struct Settings { | ||||||
|     char            *address; |     char            *address; | ||||||
|  | @ -32,5 +31,3 @@ typedef struct Settings { | ||||||
| } Settings; | } Settings; | ||||||
| 
 | 
 | ||||||
| extern Settings settings; | extern Settings settings; | ||||||
| 
 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								server.h
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								server.h
									
										
									
									
									
								
							|  | @ -11,8 +11,7 @@ | ||||||
|  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 |  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef _SERVER_H_ | #pragma once | ||||||
| #define _SERVER_H_ |  | ||||||
| 
 | 
 | ||||||
| #include "feuille.h" | #include "feuille.h" | ||||||
| 
 | 
 | ||||||
|  | @ -23,5 +22,3 @@ void     close_connection(int); | ||||||
| 
 | 
 | ||||||
| unsigned long   read_paste(int, char **); | unsigned long   read_paste(int, char **); | ||||||
| int             send_response(int, char *); | int             send_response(int, char *); | ||||||
| 
 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								util.h
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								util.h
									
										
									
									
									
								
							|  | @ -11,11 +11,8 @@ | ||||||
|  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 |  * <https://basedwa.re/tmtt/feuille/src/branch/main/LICENSE>.
 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #ifndef _UTIL_H_ | #pragma once | ||||||
| #define _UTIL_H_ |  | ||||||
| 
 | 
 | ||||||
| void     die(int, char *, ...); | void     die(int, char *, ...); | ||||||
| void     error(char *, ...); | void     error(char *, ...); | ||||||
| void     verbose(int, char *, ...); | void     verbose(int, char *, ...); | ||||||
| 
 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Tom MTT
						Tom MTT