mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 07:38:06 -05:00
Move gtkwin.c's cmdline_error() into gtkmain.c.
Not all gtkwin-based tools use it. Only the ones with one session per process, which parse a command line describing that session and might reasonably want to report errors in that command line by writing to standard error and exiting the program. In other words, precisely the ones that link in gtkmain.c and not gtkapp.c. So gtkmain.c is a more sensible place to put that error-reporting function.
This commit is contained in:
parent
c99338b750
commit
ba55b228a3
@ -298,6 +298,17 @@ static void version(FILE *fp) {
|
||||
|
||||
static const char *geometry_string;
|
||||
|
||||
void cmdline_error(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
fprintf(stderr, "%s: ", appname);
|
||||
va_start(ap, p);
|
||||
vfprintf(stderr, p, ap);
|
||||
va_end(ap);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int do_cmdline(int argc, char **argv, int do_everything, int *allow_launch,
|
||||
Conf *conf)
|
||||
{
|
||||
|
@ -3789,17 +3789,6 @@ void modalfatalbox(const char *p, ...)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void cmdline_error(const char *p, ...)
|
||||
{
|
||||
va_list ap;
|
||||
fprintf(stderr, "%s: ", appname);
|
||||
va_start(ap, p);
|
||||
vfprintf(stderr, p, ap);
|
||||
va_end(ap);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
const char *get_x_display(void *frontend)
|
||||
{
|
||||
return gdk_get_display();
|
||||
|
Loading…
x
Reference in New Issue
Block a user