forked from bonsai/harakit
		
	docs, src: updates usage text for utilities
This commit is contained in:
		
							parent
							
								
									0fc9a6b533
								
							
						
					
					
						commit
						e341c38cd6
					
				
							
								
								
									
										26
									
								
								docs/dj.1
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								docs/dj.1
									
									
									
									
									
								
							@ -11,25 +11,17 @@ dj \(en disk jockey
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
dj
 | 
			
		||||
.RB ( -AdHnq )
 | 
			
		||||
.RB ( -a
 | 
			
		||||
.RB [ byte ])
 | 
			
		||||
.RB ( -c
 | 
			
		||||
.RB [ count ])
 | 
			
		||||
.RB [ -AdHnq ]
 | 
			
		||||
.RB [ -a\ byte ]
 | 
			
		||||
.RB [ -c\ count ]
 | 
			
		||||
 | 
			
		||||
.RB ( -i
 | 
			
		||||
[\fBinput file\fP])
 | 
			
		||||
.RB ( -b
 | 
			
		||||
[\fBinput block size\fP])
 | 
			
		||||
.RB ( -s
 | 
			
		||||
[\fBinput offset\fP])
 | 
			
		||||
.RB [ -i\ input_file ]
 | 
			
		||||
.RB [ -b\ input_block_size ]
 | 
			
		||||
.RB [ -s\ input_offset ]
 | 
			
		||||
 | 
			
		||||
.RB ( -o
 | 
			
		||||
[\fBoutput file\fP])
 | 
			
		||||
.RB ( -B
 | 
			
		||||
[\fBoutput block size\fP])
 | 
			
		||||
.RB ( -S
 | 
			
		||||
[\fBoutput offset\fP])
 | 
			
		||||
.RB [ -o\ output_file ]
 | 
			
		||||
.RB [ -B\ output_block_size ]
 | 
			
		||||
.RB [ -S\ output_offset ]
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,9 +11,7 @@ intcmp \(en compare integers
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
intcmp
 | 
			
		||||
.RB ( -egl )
 | 
			
		||||
.RB [ integer ]
 | 
			
		||||
.RB [ integer... ]
 | 
			
		||||
.RB [ -egl ]\ integer\ integer...
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
Compare integers to each other.
 | 
			
		||||
.\"
 | 
			
		||||
 | 
			
		||||
@ -10,11 +10,9 @@ mm \(en middleman
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
mm
 | 
			
		||||
.RB ( -aenu )
 | 
			
		||||
.RB ( -i
 | 
			
		||||
.RB [ input ])
 | 
			
		||||
.RB ( -o
 | 
			
		||||
.RB [ output ])
 | 
			
		||||
.RB [ -aenu ]
 | 
			
		||||
.RB [ -i\ input ]
 | 
			
		||||
.RB [ -o\ output ]
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@ npc \(en show non-printing characters
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
npc
 | 
			
		||||
.RB ( -et )
 | 
			
		||||
.RB [ -et ]
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -10,8 +10,8 @@ scrut \(en scrutinize file properties
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
scrut
 | 
			
		||||
.RB ( -LSbcdefgkprsuwx )
 | 
			
		||||
.RB [ file... ]
 | 
			
		||||
.RB [ -LSbcdefgkprsuwx ]
 | 
			
		||||
.B file...
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,8 +11,7 @@ str \(en test string arguments
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
str
 | 
			
		||||
.RB [ type ]
 | 
			
		||||
.RB [ string... ]
 | 
			
		||||
.B type string...
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,8 +11,7 @@ strcmp \(en compare strings
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
strcmp
 | 
			
		||||
.RM [ string ]
 | 
			
		||||
.RB [ strings... ]
 | 
			
		||||
.B string string...
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								docs/swab.1
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								docs/swab.1
									
									
									
									
									
								
							@ -11,11 +11,8 @@ swab \(en swap bytes
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
 | 
			
		||||
swab
 | 
			
		||||
.RB ( -f )
 | 
			
		||||
.RB ( -w
 | 
			
		||||
.R [
 | 
			
		||||
.B word size
 | 
			
		||||
.R ])
 | 
			
		||||
.RB [ -f ]
 | 
			
		||||
.RB [ -w\ word_size ]
 | 
			
		||||
.\"
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
 | 
			
		||||
@ -26,10 +23,9 @@ Swap the latter and former halves of a block of bytes.
 | 
			
		||||
.IP \fB-f\fP
 | 
			
		||||
Ignore SIGINT signal.
 | 
			
		||||
.IP \fB-w\fP
 | 
			
		||||
Configures the word size; that is, the size in bytes of the block size
 | 
			
		||||
on which to operate. The default word size is 2. The word size must be
 | 
			
		||||
cleanly divisible by 2, otherwise the block of bytes being processed can\(cqt be
 | 
			
		||||
halved.
 | 
			
		||||
Configures the word size; that is, the size in bytes of the block size on which
 | 
			
		||||
to operate. The default word size is 2. The word size must be cleanly divisible
 | 
			
		||||
by 2, otherwise the block of bytes being processed can\(cqt be halved.
 | 
			
		||||
.\"
 | 
			
		||||
.SH EXAMPLES
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								src/dj.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								src/dj.c
									
									
									
									
									
								
							@ -313,9 +313,9 @@ parse(char *s){
 | 
			
		||||
static int
 | 
			
		||||
usage(void){
 | 
			
		||||
 | 
			
		||||
	fprintf(stderr, "Usage: %s (-AdfHqQ) (-a [byte]) (-c [count])\n"
 | 
			
		||||
		"\t(-i [input file]) (-b [input block size]) (-s [input offset])\n"
 | 
			
		||||
		"\t(-o [output file]) (-B [output block size]) (-S [output offset])\n",
 | 
			
		||||
	fprintf(stderr, "Usage: %s [-AdfHqQ] [-a byte] [-c count]\n"
 | 
			
		||||
		"\t[-i input_file] [-b input_block_size] [-s input_offset]\n"
 | 
			
		||||
		"\t[-o output_file] [-B output_block_size] [-S output_offset]\n",
 | 
			
		||||
		program_name);
 | 
			
		||||
 | 
			
		||||
	return EX_USAGE;
 | 
			
		||||
 | 
			
		||||
@ -52,7 +52,7 @@ int main(int argc, char *argv[]){
 | 
			
		||||
 | 
			
		||||
	if(optind + 2 /* ref cmp */ > argc){
 | 
			
		||||
usage:		fprintf(stderr,
 | 
			
		||||
			"Usage: %s (-eghl) [integer] [integer...]\n",
 | 
			
		||||
			"Usage: %s [-eghl] integer integer...\n",
 | 
			
		||||
			argv[0] == NULL ? program_name : argv[0]);
 | 
			
		||||
		return EX_USAGE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								src/mm.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								src/mm.c
									
									
									
									
									
								
							@ -110,7 +110,7 @@ oserr(char *s, char *r){
 | 
			
		||||
 * returns an exit status appropriate for a usage error. */
 | 
			
		||||
int usage(char *s){
 | 
			
		||||
 | 
			
		||||
	fprintf(stderr, "Usage: %s (-aenu) (-i [input])... (-o [output])...\n", s);
 | 
			
		||||
	fprintf(stderr, "Usage: %s [-aenu] [-i input]... [-o output]...\n", s);
 | 
			
		||||
 | 
			
		||||
	return EX_USAGE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -39,7 +39,7 @@ int main(int argc, char *argv[]){
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
	if(argc > optind){
 | 
			
		||||
usage:		fprintf(stderr, "Usage: %s (-eht)\n", argv[0]);
 | 
			
		||||
usage:		fprintf(stderr, "Usage: %s [-eht]\n", argv[0]);
 | 
			
		||||
		return EX_USAGE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -66,7 +66,7 @@ int main(int argc, char *argv[]){
 | 
			
		||||
			if(ops[i] == 'e')
 | 
			
		||||
				continue;
 | 
			
		||||
			else if(ops[i] == 'h'){
 | 
			
		||||
usage:				fprintf(stderr, "Usage: %s (-%s) [file...]\n",
 | 
			
		||||
usage:				fprintf(stderr, "Usage: %s [-%s] file...\n",
 | 
			
		||||
					argv[0] == NULL
 | 
			
		||||
						? program_name
 | 
			
		||||
						: argv[0],
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[]){
 | 
			
		||||
				goto pass;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fprintf(stderr, "Usage: %s [type] [string...]\n",
 | 
			
		||||
	fprintf(stderr, "Usage: %s type string...\n",
 | 
			
		||||
		argv[0] == NULL ? program_name : argv[0]);
 | 
			
		||||
 | 
			
		||||
	return EX_USAGE;
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ int main(int argc, char *argv[]){
 | 
			
		||||
	int i;
 | 
			
		||||
 | 
			
		||||
	if(argc < 3){
 | 
			
		||||
		fprintf(stderr, "Usage: %s [string] [string...]\n",
 | 
			
		||||
		fprintf(stderr, "Usage: %s string string...\n",
 | 
			
		||||
			argv[0] == NULL ? program_name : argv[0]);
 | 
			
		||||
		return EX_USAGE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ fn oserr(s: &str, e: Error) -> ExitCode {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
fn usage(s: &str) -> ExitCode {
 | 
			
		||||
	eprintln!("Usage: {} (-f) (-w [wordsize])", s);
 | 
			
		||||
	eprintln!("Usage: {} [-f] [-w word_size]", s);
 | 
			
		||||
	ExitCode::from(EX_USAGE as u8)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user