mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Use getprogname() instead of __progname to make portability easier.
This commit is contained in:
		
							
								
								
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							@@ -53,7 +53,7 @@ usage(void)
 | 
				
			|||||||
	fprintf(stderr,
 | 
						fprintf(stderr,
 | 
				
			||||||
	    "usage: %s [-2Cluv] [-c shell-command] [-f file] [-L socket-name]\n"
 | 
						    "usage: %s [-2Cluv] [-c shell-command] [-f file] [-L socket-name]\n"
 | 
				
			||||||
	    "            [-S socket-path] [command [flags]]\n",
 | 
						    "            [-S socket-path] [command [flags]]\n",
 | 
				
			||||||
	    __progname);
 | 
						    getprogname());
 | 
				
			||||||
	exit(1);
 | 
						exit(1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -95,7 +95,7 @@ areshell(const char *shell)
 | 
				
			|||||||
		ptr++;
 | 
							ptr++;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		ptr = shell;
 | 
							ptr = shell;
 | 
				
			||||||
	progname = __progname;
 | 
						progname = getprogname();
 | 
				
			||||||
	if (*progname == '-')
 | 
						if (*progname == '-')
 | 
				
			||||||
		progname++;
 | 
							progname++;
 | 
				
			||||||
	if (strcmp(ptr, progname) == 0)
 | 
						if (strcmp(ptr, progname) == 0)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user