links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 8f11dae2bee348381072fd62b5447703c9780633
Parent: a41cd09ea92bb74b00795982e777406808cb06e0
Author: Randy Palamar
Date:   Thu, 26 Aug 2021 17:09:50 -0600

delete '-lookup' commandline option

Diffstat:
Mdefault.c | 27---------------------------
Mdns.c | 2+-
Mlinks.1 | 4----
Mlinks.h | 1-
4 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/default.c b/default.c @@ -864,32 +864,6 @@ static unsigned char *noproxy_cmd(struct option *o, unsigned char ***argv, int * return x_proxy_cmd(o, argv, argc, save_noproxy_list, cast_uchar "Invalid list of domains"); } -static unsigned char *lookup_cmd(struct option *o, unsigned char ***argv, int *argc) -{ - int i; - struct lookup_result addr; - unsigned char *h, *h2, *h3; - if (!*argc) return cast_uchar "Parameter expected"; - if (*argc >= 2) return cast_uchar "Too many parameters"; - h = *(*argv)++; - (*argc)--; - h2 = stracpy(h); - h3 = idn_encode_host(h2, (int)strlen(cast_const_char h2), cast_uchar ".", 0); - if (!h3) h3 = stracpy(h2); - free(h2); - do_real_lookup(h3, ipv6_options.addr_preference, &addr); - free(h3); - if (!addr.n) - die("error: host not found\n"); - for (i = 0; i < addr.n; i++) { - unsigned char *a; - if ((a = print_address(&addr.a[i]))) - printf("%s\n", a); - } - fflush(stdout); - exit(RET_OK); -} - static unsigned char *version_cmd(struct option *o, unsigned char ***argv, int *argc) { printf("Links " VERSION "\n"); @@ -1025,7 +999,6 @@ static struct option links_options[] = { {1, printhelp_cmd, NULL, NULL, 0, 0, NULL, NULL, "help"}, {1, printhelp_cmd, NULL, NULL, 0, 0, NULL, NULL, "-help"}, {1, version_cmd, NULL, NULL, 0, 0, NULL, NULL, "version"}, - {1, lookup_cmd, NULL, NULL, 0, 0, NULL, NULL, "lookup"}, {1, set_cmd, NULL, NULL, 0, 0, &no_connect, NULL, "no-connect"}, {1, set_cmd, NULL, NULL, 0, 0, &anonymous, NULL, "anonymous"}, {1, setstr_cmd, NULL, NULL, 0, MAX_STR_LEN, default_target, NULL, "target"}, diff --git a/dns.c b/dns.c @@ -203,7 +203,7 @@ do_swap: #endif } -void do_real_lookup(unsigned char *name, int preference, struct lookup_result *host) +static void do_real_lookup(unsigned char *name, int preference, struct lookup_result *host) { unsigned char address[16]; size_t nl; diff --git a/links.1 b/links.1 @@ -32,10 +32,6 @@ Prints the version number and exit. .TP -\f3-lookup \f2<hostname>\f1 -Does name lookup, like command "host". - -.TP \f3-force-html\f1 Treat files with unknown type as html rather than text. (can be toggled with '\\' key) diff --git a/links.h b/links.h @@ -420,7 +420,6 @@ struct lookup_state { int numeric_ip_address(const char *name, char address[4]); int numeric_ipv6_address(const char *name, char address[16], unsigned *scope_id); void rotate_addresses(struct lookup_result *); -void do_real_lookup(unsigned char *, int, struct lookup_result *); int find_host(unsigned char *, struct lookup_result *, void **, void (*)(void *, int), void *); int find_host_no_cache(unsigned char *, struct lookup_result *, void **, void (*)(void *, int), void *); void kill_dns_request(void **);