version 1.20, 2015/01/16 06:40:06 |
version 1.21, 2015/02/08 17:33:35 |
|
|
__dead void |
__dead void |
usage(void) |
usage(void) |
{ |
{ |
fprintf(stderr, "usage: %s [-l line] [-s speed | -speed] [host]\n", |
fprintf(stderr, "usage: %s [-l line] [-s speed | -speed]\n", |
__progname); |
__progname); |
|
fprintf(stderr, " %s [host]\n", __progname); |
exit(1); |
exit(1); |
} |
} |
|
|
|
|
if (argc != 0 && argc != 1) |
if (argc != 0 && argc != 1) |
usage(); |
usage(); |
|
|
if (argc == 1) |
if (line_path != NULL || line_speed != -1) { |
host = argv[0]; |
if (argc != 0) |
else |
usage(); |
host = getenv("HOST"); |
} else { |
if (host != NULL && *host != '\0') { |
if (argc == 1) |
if (*host == '/') { |
host = argv[0]; |
if (line_path == NULL) |
else |
|
host = getenv("HOST"); |
|
if (host != NULL && *host != '\0') { |
|
if (*host == '/') |
line_path = host; |
line_path = host; |
} else { |
else { |
s = getenv("REMOTE"); |
s = getenv("REMOTE"); |
if (s != NULL && *s == '/') |
if (s != NULL && *s == '/') |
try_remote(host, s, NULL); |
try_remote(host, s, NULL); |
else |
else |
try_remote(host, NULL, s); |
try_remote(host, NULL, s); |
|
} |
} |
} |
} |
} |
|
|