diff -uN -r aget-0.2/AUTHORS aget-0.2p1/AUTHORS
--- aget-0.2/AUTHORS	Thu May  2 00:59:40 2002
+++ aget-0.2p1/AUTHORS	Fri May  3 20:29:42 2002
@@ -7,4 +7,4 @@
 don't hesitate to mail murat@enderunix.org
 
 http://www.enderunix.org/
-Wed May  1 18:15:15 EEST 2002
+Fri May  3 23:29:17 EEST 2002
diff -uN -r aget-0.2/COPYING aget-0.2p1/COPYING
--- aget-0.2/COPYING	Thu May  2 00:59:40 2002
+++ aget-0.2p1/COPYING	Fri May  3 20:29:57 2002
@@ -46,4 +46,4 @@
       EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
       DAMAGE.
 
-Wed May  1 18:15:37 EEST 2002
+Fri May  3 23:29:27 EEST 2002
diff -uN -r aget-0.2/ChangeLog aget-0.2p1/ChangeLog
--- aget-0.2/ChangeLog	Thu May  2 16:15:47 2002
+++ aget-0.2p1/ChangeLog	Fri May  3 20:35:34 2002
@@ -1,5 +1,15 @@
 EnderUNIX Aget ChangeLog
 
+* Fri May  3 23:25:08 EEST 2002
+  Version 0.2p1 adds/changes the following:
+  - getopt() problem is now solved,
+    The program should really run on Posix systems.
+    I've tested it on Linux, FreeBSD ans Solaris.
+
+  - If no thread number is supplied, it is defaulted to 1.
+
+  - A Solaris Makefile is added to the tarball.
+
 * Wed May  1 18:15:32 EEST 2002
   Version 0.2 adds/changes the following:
   - File is now created seperately in each thread
diff -uN -r aget-0.2/INSTALL aget-0.2p1/INSTALL
--- aget-0.2/INSTALL	Thu May  2 00:59:40 2002
+++ aget-0.2p1/INSTALL	Sat May  4 00:29:32 2002
@@ -1,7 +1,8 @@
 EnderUNIX Aget v0.2 INSTALL
 --------------------------
 
-The program is tested on RedHat Linux 7.2 (gcc-2.96)
+The program is tested on RedHat Linux 7.2 (gcc-2.96), FreeBSD 4.5
+and Solaris 8. For Solaris, you'll have to use Makefile.Solaris.
 
 To compile Aget, type:
 
@@ -16,9 +17,9 @@
 You're done. All you need is a file to download and supply
 that url and desired number of segments to aget, e.g:
 
-$ aget http://www.enderunix.org/murat/barismanco-hibrahimsofrasi.mp3 -n10
+$ aget -n10 http://www.enderunix.org/murat/barismanco-hibrahimsofrasi.mp3 
 
 Aget will split the file into 10 segments and will download it for you.
 
-Wed May  1 18:15:17 EEST 2002
+Fri May  3 23:29:20 EEST 2002
 http://www.enderunix.org/aget/
diff -uN -r aget-0.2/Makefile aget-0.2p1/Makefile
--- aget-0.2/Makefile	Thu May  2 00:59:40 2002
+++ aget-0.2p1/Makefile	Fri May  3 20:50:32 2002
@@ -2,8 +2,8 @@
 # http://www.enderunix.org/aget/
 
 OBJS = socket.o main.o misc.o
-CFLAGS = -Wall -W -pedantic -DDEBUG=y
-LDFLAGS = -lpthread
+CFLAGS = -Wall -W -pedantic -DDEBUG=y -g
+LDFLAGS = -pthread
 CC = gcc
 
 all: $(OBJS)
diff -uN -r aget-0.2/Makefile.Solaris aget-0.2p1/Makefile.Solaris
--- aget-0.2/Makefile.Solaris	Thu Jan  1 00:00:00 1970
+++ aget-0.2p1/Makefile.Solaris	Fri May  3 20:52:31 2002
@@ -0,0 +1,16 @@
+# EnderUNIX Aget Makefile
+# http://www.enderunix.org/aget/
+
+OBJS = socket.o main.o misc.o
+CFLAGS = -Wall -W -pedantic -DDEBUG=y -g
+LDFLAGS = -lpthread -lsocket -lnsl -lresolv
+CC = gcc
+
+all: $(OBJS)
+	$(CC) -o aget $(OBJS) $(LDFLAGS)
+	
+install:
+	cp -f aget /usr/local/bin/aget
+
+clean: 
+	rm -f aget *.o core.* *~
diff -uN -r aget-0.2/Makefile.orig aget-0.2p1/Makefile.orig
--- aget-0.2/Makefile.orig	Thu Jan  1 00:00:00 1970
+++ aget-0.2p1/Makefile.orig	Fri May  3 20:25:07 2002
@@ -0,0 +1,16 @@
+# EnderUNIX Aget Makefile
+# http://www.enderunix.org/aget/
+
+OBJS = socket.o main.o misc.o
+CFLAGS = -Wall -W -pedantic -DDEBUG=y -g
+LDFLAGS = -pthread
+CC = gcc
+
+all: $(OBJS)
+	$(CC) -o aget $(OBJS) $(LDFLAGS)
+	
+install:
+	cp -f aget /usr/local/bin/aget
+
+clean: 
+	rm -f aget *.o core.* *~
diff -uN -r aget-0.2/README aget-0.2p1/README
--- aget-0.2/README	Thu May  2 00:59:40 2002
+++ aget-0.2p1/README	Sat May  4 00:30:27 2002
@@ -8,17 +8,15 @@
 development for Aget.
 
 If you need assistance in installing Aget, you can see INSTALL file,
-Program is tested on RedHat Linux 7.2 (gcc-2.96) and proved to be successful.
+Program is tested on RedHat Linux 7.2 (gcc-2.96), FreeBSD 4.5 and
+Solaris 8 (Sparc). It proved to be successful.
 
 A file of size 4,482,334 bytes was transferred in 1m2.159s with Aget, whereas
 wget downloaded the same file from the same location in 3m18.746s.
 
-The program is not tested on other platforms, however I expect to port it
-to BSD platforms in a few days...
-
 
 You can get much more info from the Aget Web site:
 http://www.enderunix.org/aget
 
-Wed May  1 18:15:19 EEST 2002
+Fri May  3 23:30:13 EEST 2002
 http://www.enderunix.org/aget/
diff -uN -r aget-0.2/THANKS aget-0.2p1/THANKS
--- aget-0.2/THANKS	Thu May  2 00:59:40 2002
+++ aget-0.2p1/THANKS	Fri May  3 20:30:42 2002
@@ -1,4 +1,7 @@
 
 Sensei, and my EnderUNIX team members...
 	<roots@enderunix.org>
+Atilim Boy 
+	<aboy@trunix.org>
 
+Fri May  3 23:29:30 EEST 2002
diff -uN -r aget-0.2/TODO aget-0.2p1/TODO
--- aget-0.2/TODO	Thu May  2 00:59:40 2002
+++ aget-0.2p1/TODO	Sat May  4 00:30:43 2002
@@ -9,12 +9,12 @@
 -> Thread exit status evaluation:
    If one of the threads fail, the program should retry the failed 
    later on.
--> FreeBSD/NetBSD/OpenBSD Port
+-> FreeBSD/NetBSD/OpenBSD Port/Package
 -> Solaris Port
 -> GUI
 -> Multiple downloads
 -> Active FTP support
 -> Passive FTP support
 
-Wed May  1 18:15:22 EEST 2002
+Fri May  3 23:29:35 EEST 2002
 http://www.enderunix.org/aget/
diff -uN -r aget-0.2/main.c aget-0.2p1/main.c
--- aget-0.2/main.c	Thu May  2 00:59:40 2002
+++ aget-0.2p1/main.c	Fri May  3 20:46:51 2002
@@ -11,11 +11,14 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <netdb.h>
 #include <pthread.h>
 
-#include <arpa/inet.h>
 #include <netinet/in.h>
+
+#include <arpa/inet.h>
+
 #include <sys/socket.h>
 #include <sys/types.h>
 
@@ -43,17 +46,11 @@
 	extern char *optarg;
 	extern int optind;
 	char *rbuf, *tmpfile;
+	char *fullurl;
 
 	rbuf = (char *)calloc(BUFSIZ, sizeof(char));
 	tmpfile = (char *)calloc(MAXFILESIZ, sizeof(char));
 
-	if (argc < 3) {
-		usage();
-		exit(1);
-	}
-
-	parse_url(argv[1], &req);
-	
 	while (!error && (c = getopt(argc,argv,"n:hv")) != -1) {
 		switch(c) {
 			case 'n':
@@ -64,7 +61,10 @@
 				usage();
 				exit(0);
 				break;
-
+			case 'v':
+				puts(PROGVERSION);
+				exit(0);
+				break;
 			default:
 				error = 1;
 				usage();
@@ -79,8 +79,28 @@
 	}
 
 
+	if (argc == 2) {		/* If only url is supplied...	*/
+		fullurl = strdup(argv[1]);
+		printf("Warning: number of threads is not specified, defaulting to 1\n");
+		nthreads = 1;
+	} else
+	if (optind < argc)
+		if (argc > 2)
+			fullurl = strdup(argv[optind]);
+		else {
+			usage();
+			exit(1);
+		}
+	else
+	if (optind == argc) {
+		usage();
+		exit(1);
+	}
 
 
+
+	parse_url(fullurl, &req);
+	
 	head_req(&req);
 	printf("<LOG> Downloading %s from site %s(%s:%d). Number of threads: %d\n",
 			req.url, req.host, req.ip, req.port, nthreads);
diff -uN -r aget-0.2/misc.c aget-0.2p1/misc.c
--- aget-0.2/misc.c	Thu May  2 00:59:40 2002
+++ aget-0.2p1/misc.c	Fri May  3 20:47:10 2002
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 
 #include "misc.h"
 
@@ -58,7 +59,7 @@
 void usage()
 {
 	fprintf(stderr, "\n%s [http://www.enderunix.org/aget/]\n\n", PROGVERSION);
-	fprintf(stderr, "usage: aget url -n [num of threads]\n");
+	fprintf(stderr, "usage: aget -n [num of threads] url\n");
 }
 
 /* reverse a given string	*/
diff -uN -r aget-0.2/socket.c aget-0.2p1/socket.c
--- aget-0.2/socket.c	Thu May  2 00:59:40 2002
+++ aget-0.2p1/socket.c	Fri May  3 20:47:01 2002
@@ -16,15 +16,16 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
-
-
+#include <strings.h>
 #include <netdb.h>
 
-#include <sys/socket.h>
+#include <netinet/in.h>
+
 #include <sys/types.h>
 
 #include <arpa/inet.h>
-#include <netinet/in.h>
+
+#include <sys/socket.h>
 
 #include "socket.h"
 
