mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	52622 (tweaked, c.f. 52626): adjust number of columns and drop right-parenthesis in "kill -L" output
This commit is contained in:
		
							parent
							
								
									3078e07729
								
							
						
					
					
						commit
						69c5887461
					
				
					 2 changed files with 12 additions and 6 deletions
				
			
		|  | @ -1,5 +1,8 @@ | |||
| 2024-02-28  Oliver Kiddle  <opk@zsh.org> | ||||
| 
 | ||||
| 	* 52622 (tweaked, c.f. 52626): Src/jobs.c: adjust number of columns | ||||
| 	and drop right-parenthesis in "kill -L" output | ||||
| 
 | ||||
| 	* 52623: Src/signames2.awk: add some Solaris signal descriptions | ||||
| 
 | ||||
| 2024-02-28  Oliver Kiddle  <opk@zsh.org> | ||||
|  |  | |||
							
								
								
									
										15
									
								
								Src/jobs.c
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								Src/jobs.c
									
										
									
									
									
								
							|  | @ -2822,23 +2822,26 @@ bin_kill(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func)) | |||
| #else | ||||
| 		const int width = SIGCOUNT >= 100 ? 3 : 2; | ||||
| #endif | ||||
| 		const int cols = zterm_columns >= 30 ? | ||||
| 		    (zterm_columns < 90 ? zterm_columns / 15 : 6) : 1; | ||||
| 
 | ||||
| 		for (sig = 1; sig < SIGCOUNT | ||||
| #if defined(SIGRTMIN) && defined(SIGRTMAX) | ||||
| 			+ 1 | ||||
| #endif | ||||
| 			; sig++) | ||||
| 		{ | ||||
| 		    printf("%*d) %-10s%c", width, sig, sigs[sig], | ||||
| 			    sig % 5 ? ' ' : '\n'); | ||||
| 		    printf("%*d %-10s%c", width, sig, sigs[sig], | ||||
| 			    sig % cols ? ' ' : '\n'); | ||||
| 		} | ||||
| #if defined(SIGRTMIN) && defined(SIGRTMAX) | ||||
| 		for (sig = SIGRTMIN; sig < SIGRTMAX; sig++) { | ||||
| 		    printf("%*d) %-10s%c", width, sig, rtsigname(sig, 0), | ||||
| 			    (sig - SIGRTMIN + SIGCOUNT + 1) % 5 ? ' ' : '\n'); | ||||
| 		    printf("%*d %-10s%c", width, sig, rtsigname(sig, 0), | ||||
| 			    (sig - SIGRTMIN + SIGCOUNT + 1) % cols ? ' ' : '\n'); | ||||
| 		} | ||||
| 		printf("%*d) RTMAX\n", width, sig); | ||||
| 		printf("%*d RTMAX\n", width, sig); | ||||
| #else | ||||
| 		printf("%*d) %s\n", width, sig, sigs[sig]); | ||||
| 		printf("%*d %s\n", width, sig, sigs[sig]); | ||||
| #endif | ||||
| 		return 0; | ||||
| 	    } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue