]> Pileus Git - ~andy/fetchmail/commitdiff
Tweak in lexical analysis.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 22 Feb 2000 04:04:41 +0000 (04:04 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 22 Feb 2000 04:04:41 +0000 (04:04 -0000)
svn path=/trunk/; revision=2764

NEWS
rcfile_l.l
socket.c

diff --git a/NEWS b/NEWS
index ebd74527714964b8af60414d90ea8ed503156802..12caa84dc951b8e8c42c99c6bcaedb582f9a3b74 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
 * Only emit progress dots when stdout is connected to a tty.
 * Fix for GNATS bug 16468, "INET6 breaks fetchmail preconnect"
   by Munechika SUMIKAWA <sumikawa@ebina.hitachi.co.jp>.
+* Lexical analyzer now understands that -?[0-9]*[a-zA-Z] is not a number.
 
 fetchmail-5.2.8 (Mon Feb 14 19:16:46 EST 2000), 18571 lines:
 
index 91b82d88e97adbbdf99673d93aa1706b2628f950..32e274cc0a3e014bbeacba43b5e70e5fbd2fcb06 100644 (file)
@@ -177,7 +177,7 @@ options             {/* EMPTY */}
 
 (#.*)?\\?\n    { prc_lineno++; }   /* newline is ignored */
 
--?[0-9]+               { yylval.number = atoi(yytext); return NUMBER; }
+-?[0-9]+/[^a-zA-Z]     { yylval.number = atoi(yytext); return NUMBER; }
 
 [^=;:, \t\r\n]+        {
                        char buf[MSGBUFSIZE];
index 9501b1ebdca8aef1027a11ee2bb5c04b9cf0e94b..3040a5fe29666d9394cf6b913a4dc6b3b92a6cd2 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -669,7 +669,7 @@ int SockClose(int sock)
      * This stops sends but allows receives (effectively, it sends a
      * TCP <FIN>).
      */
-    if (shutdown(sock, 1) == SUCCESS)
+    if (shutdown(sock, 1) == 0)
        /* If there is any data still waiting in the queue, discard it.
         * Call recv() until either it returns 0 (meaning we received a FIN)
         * or any error occurs.  This makes sure all data sent by the other