argued(1): import from trinity/src
This commit is contained in:
		
							parent
							
								
									e0b192bd4b
								
							
						
					
					
						commit
						3288dc5aa9
					
				
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							@ -32,7 +32,7 @@ RUSTLIBS = --extern getopt=build/o/libgetopt.rlib \
 | 
				
			|||||||
CFLAGS += -I$(SYSEXITS)
 | 
					CFLAGS += -I$(SYSEXITS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: all
 | 
					.PHONY: all
 | 
				
			||||||
all: dj false fop hru intcmp mm npc rpn scrut str strcmp swab true
 | 
					all: argued dj false fop hru intcmp mm npc rpn scrut str strcmp swab true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# keep build/include until bindgen(1) has stdin support
 | 
					# keep build/include until bindgen(1) has stdin support
 | 
				
			||||||
# https://github.com/rust-lang/rust-bindgen/issues/2703
 | 
					# https://github.com/rust-lang/rust-bindgen/issues/2703
 | 
				
			||||||
@ -87,6 +87,11 @@ build/o/libsysexits.rlib: build/include/sysexits.h
 | 
				
			|||||||
build/include/sysexits.h: build $(SYSEXITS)sysexits.h
 | 
					build/include/sysexits.h: build $(SYSEXITS)sysexits.h
 | 
				
			||||||
	printf '\043define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h > $@
 | 
						printf '\043define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h > $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.PHONY: argued
 | 
				
			||||||
 | 
					argued: build/bin/argued
 | 
				
			||||||
 | 
					build/bin/argued: src/argued.c build
 | 
				
			||||||
 | 
						$(CC) $(CFLAGS) -o $@ src/argued.c
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: dj
 | 
					.PHONY: dj
 | 
				
			||||||
dj: build/bin/dj
 | 
					dj: build/bin/dj
 | 
				
			||||||
build/bin/dj: src/dj.c build
 | 
					build/bin/dj: src/dj.c build
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										28
									
								
								docs/argued.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								docs/argued.1
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					.\" Copyright (c) 2022–2024 DTB <trinity@trinity.moe>
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
 | 
				
			||||||
 | 
					.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.TH ARGUED 1 2024-07-23 "Harakit-overgrown X.X.X"
 | 
				
			||||||
 | 
					.SH NAME
 | 
				
			||||||
 | 
					argued \(en check for arguments
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.SH DESCRIPTION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.BR argued (1)
 | 
				
			||||||
 | 
					exits successfully if any arguments are provided, and unsuccessfully
 | 
				
			||||||
 | 
					otherwise.
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.SH AUTHOR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Written by DTB
 | 
				
			||||||
 | 
					.MT trinity@trinity.moe
 | 
				
			||||||
 | 
					.ME .
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.SH COPYRIGHT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This work is marked with CC0 1.0. To see a copy of this license, visit
 | 
				
			||||||
 | 
					<http://creativecommons.org/publicdomain/zero/1.0>.
 | 
				
			||||||
 | 
					.\"
 | 
				
			||||||
 | 
					.SH SEE ALSO
 | 
				
			||||||
 | 
					.BR test (1)
 | 
				
			||||||
							
								
								
									
										9
									
								
								src/argued.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/argued.c
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2022–2024 DTB <trinity@trinity.moe>
 | 
				
			||||||
 | 
					 * SPDX-License-Identifier: CC0
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This work is marked with CC0 1.0. To view a copy of this license, visit
 | 
				
			||||||
 | 
					 * <http://creativecommons.org/publicdomain/zero/1.0>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(int argc, char *argv[]){ return !(argc > 1); }
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user