applied a couple of patches from Brian D Ripley. removed the last exit()

* nanoftp.c: applied a couple of patches from Brian D Ripley.
* parserInternals.c: removed the last exit() call. Print an
  unmaskable error on stderr instead (library mismatch detection)
Daniel
diff --git a/ChangeLog b/ChangeLog
index debea74..80c15c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Nov 20 09:30:02 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+	* nanoftp.c: applied a couple of patches from Brian D Ripley.
+	* parserInternals.c: removed the last exit() call. Print an
+	  unmaskable error on stderr instead (library mismatch detection)
+
 Sat Nov 17 17:16:51 MST 2001 John Fleck <jfleck@inkstain.net>
 
 	* doc/xmllint.xml, doc/xmllint.1 - update xmllint man page with
diff --git a/nanoftp.c b/nanoftp.c
index c7d76c7..7224a5a 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -261,6 +261,31 @@
     if (*cur == 0) return;
 
     buf[indx] = 0;
+    /* allow user@ and user:pass@ forms */
+    {
+	const char *p = strchr(cur, '@');
+	if(p) {
+	    while(1) {
+		if(cur[0] == ':' || cur[0] == '@') break;
+		buf[indx++] = *cur++;
+	    }
+	    buf[indx] = 0;
+	    ctxt->user = xmlMemStrdup(buf);
+	    indx = 0;
+	    if(cur[0] == ':') {
+		cur++;
+		while(1) {
+		    if(cur[0] == '@') break;
+		    buf[indx++] = *cur++;
+		}
+		buf[indx] = 0;
+		ctxt->passwd = xmlMemStrdup(buf);
+		indx = 0;
+	    }
+	    cur = p+1;
+	}
+    }
+
     while (1) {
         if (cur[0] == ':') {
 	    buf[indx] = 0;
@@ -480,6 +505,7 @@
     ret->returnValue = 0;
     ret->controlBufIndex = 0;
     ret->controlBufUsed = 0;
+    ret->controlFd = -1;
 
     if (URL != NULL)
 	xmlNanoFTPScanURL(ret, URL);
diff --git a/parserInternals.c b/parserInternals.c
index 9832a52..4c097d9 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -81,7 +81,9 @@
 	xmlGenericError(xmlGenericErrorContext, 
 		"Fatal: program compiled against libxml %d using libxml %d\n",
 		(version / 10000), (myversion / 10000));
-	exit(1);
+	fprintf(stderr, 
+		"Fatal: program compiled against libxml %d using libxml %d\n",
+		(version / 10000), (myversion / 10000));
     }
     if ((myversion / 100) < (version / 100)) {
 	xmlGenericError(xmlGenericErrorContext,