| ︙ | | | ︙ | |
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
exit(1);
}
void connection_fatal(char *fmt, ...)
{
char str[0x100]; /* Make the size big enough */
va_list ap;
va_start(ap, fmt);
strcpy(str, "Fatal: ");
|
|
|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
cleanup_exit(1);
}
void connection_fatal(char *fmt, ...)
{
char str[0x100]; /* Make the size big enough */
va_list ap;
va_start(ap, fmt);
strcpy(str, "Fatal: ");
|
| ︙ | | | ︙ | |
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
exit(1);
}
/*
* Be told what socket we're supposed to be using.
*/
static SOCKET scp_ssh_socket;
char *do_select(SOCKET skt, int startup)
|
|
|
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
cleanup_exit(1);
}
/*
* Be told what socket we're supposed to be using.
*/
static SOCKET scp_ssh_socket;
char *do_select(SOCKET skt, int startup)
|
| ︙ | | | ︙ | |
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
exit(1);
}
/*
* Open an SSH connection to user@host and execute cmd.
*/
static void do_cmd(char *host, char *user, char *cmd)
{
|
|
|
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
if (list)
msg_id = WM_LS_RET_ERR_CNT;
while (!PostMessage
((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs,
0 /*lParam */ ))SleepEx(1000, TRUE);
}
cleanup_exit(1);
}
/*
* Open an SSH connection to user@host and execute cmd.
*/
static void do_cmd(char *host, char *user, char *cmd)
{
|
| ︙ | | | ︙ | |
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
|
* ordinary user-accessible option, so it shouldn't be part of
* the command-line help. The only people who need to know
* about it are programmers, and they can read the source.
*/
printf
(" -gui hWnd GUI mode with the windows handle for receiving messages\n");
#endif
exit(1);
}
/*
* Main program (no, really?)
*/
int main(int argc, char *argv[])
{
|
|
|
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
|
* ordinary user-accessible option, so it shouldn't be part of
* the command-line help. The only people who need to know
* about it are programmers, and they can read the source.
*/
printf
(" -gui hWnd GUI mode with the windows handle for receiving messages\n");
#endif
cleanup_exit(1);
}
/*
* Main program (no, really?)
*/
int main(int argc, char *argv[])
{
|
| ︙ | | | ︙ | |