diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-10 15:39:21 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-10 15:39:21 +0000 |
commit | e7c6a1c7f9170ec0d3c1c4581d1afc9984bcf733 (patch) | |
tree | 295a233ae838adbbee9e942504e9573cb179a8a4 /url.c | |
parent | [w3m-dev 02811] new regexp implementation (diff) | |
download | w3m-e7c6a1c7f9170ec0d3c1c4581d1afc9984bcf733.tar.gz w3m-e7c6a1c7f9170ec0d3c1c4581d1afc9984bcf733.zip |
[w3m-dev 02815]
From: aito@fw.ipsj.or.jp
Diffstat (limited to '')
-rw-r--r-- | url.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.29 2002/01/07 16:28:17 ukai Exp $ */ +/* $Id: url.c,v 1.30 2002/01/10 15:39:21 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include <sys/socket.h> @@ -626,8 +626,8 @@ openSocket(char *const hostname, #endif goto error; } - regexCompile("^[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*$", 0); - if (regexMatch(hostname, 0, 1)) { + regexCompile("^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$", 0); + if (regexMatch(hostname, -1, 1)) { sscanf(hostname, "%d.%d.%d.%d", &a1, &a2, &a3, &a4); adr = htonl((a1 << 24) | (a2 << 16) | (a3 << 8) | a4); bcopy((void *)&adr, (void *)&hostaddr.sin_addr, sizeof(long)); |