[axel-commits] r77 - in /branches/2.x: CHANGES Makefile axel.1 axel.h conf.c conf.h conn.c de.po http.c nl.po ru.po text.c zh_cn.po

phihag-guest at users.alioth.debian.org phihag-guest at users.alioth.debian.org
Mon Dec 29 13:10:12 UTC 2008


Author: phihag-guest
Date: Mon Dec 29 13:10:12 2008
New Revision: 77

URL: http://svn.debian.org/wsvn/axel/?sc=1&rev=77
Log:
Synchronize trunk and 2.x branch: Backport UA


Modified:
    branches/2.x/CHANGES
    branches/2.x/Makefile
    branches/2.x/axel.1
    branches/2.x/axel.h
    branches/2.x/conf.c
    branches/2.x/conf.h
    branches/2.x/conn.c
    branches/2.x/de.po
    branches/2.x/http.c
    branches/2.x/nl.po
    branches/2.x/ru.po
    branches/2.x/text.c
    branches/2.x/zh_cn.po

Modified: branches/2.x/CHANGES
URL: http://svn.debian.org/wsvn/axel/branches/2.x/CHANGES?rev=77&op=diff
==============================================================================
--- branches/2.x/CHANGES (original)
+++ branches/2.x/CHANGES Mon Dec 29 13:10:12 2008
@@ -1,4 +1,4 @@
-Version 2.3:
+UNRELEASED
 
 - Wait for thread termination in axel.c:axel_do (Closes: #311255), thanks John Ripa
 - New Chinese translation and manpage, thanks Shuge Lee

Modified: branches/2.x/Makefile
URL: http://svn.debian.org/wsvn/axel/branches/2.x/Makefile?rev=77&op=diff
==============================================================================
--- branches/2.x/Makefile (original)
+++ branches/2.x/Makefile Mon Dec 29 13:10:12 2008
@@ -29,7 +29,7 @@
 	rm -f *.o $(OUTFILE) search core *.mo
 
 distclean: clean
-	rm -f Makefile.settings config.h
+	rm -f Makefile.settings config.h axel-*.tar axel-*.tar.gz axel-*.tar.bz2
 
 install-man:
 	mkdir -p $(DESTDIR)$(MANDIR)/man1/
@@ -51,7 +51,7 @@
 ### MAIN PROGRAM
 
 $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
-	$(CC) axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o -o $(OUTFILE) $(LFLAGS)
+	$(CC) *.o -o $(OUTFILE) $(LFLAGS)
 ifndef DEBUG
 	-$(STRIP) $(OUTFILE)
 endif
@@ -66,10 +66,11 @@
 uninstall-bin:
 	rm -f $(BINDIR)/$(OUTFILE)
 
-tar: distclean
-	x=`pwd | sed -e 's/\/.*\///'`; \
-	cd ..; \
-	tar czf $$x.tar.gz $$x
+tar:
+	version=$$(sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h) && \
+	tar --create --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po configure Makefile axel.1 axelrc.example axel.spec gui API CHANGES COPYING CREDITS README && \
+	gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
+	bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
 
 
 ### I18N FILES

Modified: branches/2.x/axel.1
URL: http://svn.debian.org/wsvn/axel/branches/2.x/axel.1?rev=77&op=diff
==============================================================================
--- branches/2.x/axel.1 (original)
+++ branches/2.x/axel.1 Mon Dec 29 13:10:12 2008
@@ -79,6 +79,18 @@
 estimate for the remaining download time.
 
 .TP
+\fB\-\-header=x\fP, \fB\-H\ x\fP
+Add an additional HTTP header. This option should be in the form "Header:
+Value". See RFC 2616 section 4.2 and 14 for details on the format and
+standardized headers.
+
+.TP
+\fB\-\-user-agent=x\fP, \fB\-U\ x\fP
+Set the HTTP user agent to use. Some websites serve different content based upon
+this parameter. The default value will include "Axel", its version and the
+platform.
+
+.TP
 \fB\-\-help\fP, \fB\-h\fP
 A brief summary of all the options.
 
@@ -129,12 +141,7 @@
 Axel is Copyright 2001-2002 Wilmer van der Gaast.
 
 .SH BUGS
-.PP
-I'm sure there are some bugs left somewhere, please tell me about them and
-I will try to fix them.
-
-A known bug is that the program does weird things when downloading using
-hundreds of connections. Well, just don't do that.
+Please report bugs at https://alioth.debian.org/tracker/?group_id=100070&atid=413085.
 
 .SH AUTHORS
 Wilmer van der Gaast. <wilmer at gaast.net>

Modified: branches/2.x/axel.h
URL: http://svn.debian.org/wsvn/axel/branches/2.x/axel.h?rev=77&op=diff
==============================================================================
--- branches/2.x/axel.h (original)
+++ branches/2.x/axel.h Mon Dec 29 13:10:12 2008
@@ -68,7 +68,7 @@
 #define MAX_ADD_HEADERS	10
 #define MAX_REDIR		5
 #define AXEL_VERSION_STRING	"2.3"
-#define USER_AGENT		"Axel " AXEL_VERSION_STRING " (" ARCH ")"
+#define DEFAULT_USER_AGENT	"Axel " AXEL_VERSION_STRING " (" ARCH ")"
 
 typedef struct
 {

Modified: branches/2.x/conf.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/conf.c?rev=77&op=diff
==============================================================================
--- branches/2.x/conf.c (original)
+++ branches/2.x/conf.c Mon Dec 29 13:10:12 2008
@@ -110,6 +110,7 @@
 		get_config_number( add_header_count );
 		for(i=0;i<conf->add_header_count;i++)
 			get_config_string( add_header[i] );
+		get_config_string( user_agent );
 	}
 	
 	fclose( fp );
@@ -140,7 +141,8 @@
 	conf->search_threads		= 3;
 	conf->search_amount		= 15;
 	conf->search_top		= 3;
-	conf->add_header_count	= 0;
+	conf->add_header_count		= 0;
+	strncpy( conf->user_agent, DEFAULT_USER_AGENT, MAX_STRING );
 	
 	conf->interfaces = malloc( sizeof( if_t ) );
 	memset( conf->interfaces, 0, sizeof( if_t ) );

Modified: branches/2.x/conf.h
URL: http://svn.debian.org/wsvn/axel/branches/2.x/conf.h?rev=77&op=diff
==============================================================================
--- branches/2.x/conf.h (original)
+++ branches/2.x/conf.h Mon Dec 29 13:10:12 2008
@@ -47,6 +47,8 @@
 
 	int add_header_count;
 	char add_header[MAX_ADD_HEADERS][MAX_STRING];
+	
+	char user_agent[MAX_STRING];
 } conf_t;
 
 int conf_loadfile( conf_t *conf, char *file );

Modified: branches/2.x/conn.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/conn.c?rev=77&op=diff
==============================================================================
--- branches/2.x/conn.c (original)
+++ branches/2.x/conn.c Mon Dec 29 13:10:12 2008
@@ -257,6 +257,7 @@
 		conn->http->firstbyte = conn->currentbyte;
 		conn->http->lastbyte = conn->lastbyte;
 		http_get( conn->http, s );
+		http_addheader( conn->http, "User-Agent: %s", conn->conf->user_agent );
 		for( i = 0; i < conn->conf->add_header_count; i++)
 			http_addheader( conn->http, "%s", conn->conf->add_header[i] );
 	}

Modified: branches/2.x/de.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/de.po?rev=77&op=diff
==============================================================================
--- branches/2.x/de.po (original)
+++ branches/2.x/de.po Mon Dec 29 13:10:12 2008
@@ -2,8 +2,8 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-12 17:21+0530\n"
-"PO-Revision-Date: 2007-12-15 15:18GMT\n"
+"POT-Creation-Date: 2008-09-15 19:07+0200\n"
+"PO-Revision-Date: 2008-09-15 22:08+0200\n"
 "Last-Translator: Hermann J. Beckers <hj.beckers at onlinehome.de>\n"
 "Language-Team: deutsch <de at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -88,15 +88,15 @@
 msgid "Error in %s line %i.\n"
 msgstr "Fehler in %s Zeile %i.\n"
 
-#: conn.c:348 ftp.c:124
+#: conn.c:349 ftp.c:124
 #, c-format
 msgid "Too many redirects.\n"
 msgstr "Zu viele Weiterleitungen (redirects).\n"
 
-#: conn.c:367
+#: conn.c:368
 #, c-format
 msgid "Unknown HTTP error.\n"
-msgstr "Unbekannter HTTP Fehler.\n"
+msgstr "Unbekannter HTTP-Fehler.\n"
 
 #: ftp.c:35 http.c:60
 #, c-format
@@ -128,7 +128,7 @@
 msgid "Error writing command %s\n"
 msgstr "Fehler beim Schreiben des Befehls %s\n"
 
-#: ftp.c:311 http.c:151
+#: ftp.c:311 http.c:150
 #, c-format
 msgid "Connection gone.\n"
 msgstr "Verbindung geschlossen.\n"
@@ -138,52 +138,52 @@
 msgid "Invalid proxy string: %s\n"
 msgstr "Ungültige Proxy-Angabe: %s\n"
 
-#: text.c:150
+#: text.c:154
 #, c-format
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Kann Standardausgabe nicht nach /dev/null umleiten.\n"
 
-#: text.c:178
+#: text.c:182
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "Kann URLs mit mehr als %d Zeichen nicht nutzen\n"
 
-#: text.c:183
+#: text.c:187
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Starte Abruf: %s\n"
 
-#: text.c:190
+#: text.c:194
 #, c-format
 msgid "Doing search...\n"
 msgstr "Suche gestartet...\n"
 
-#: text.c:194
+#: text.c:198
 #, c-format
 msgid "File not found\n"
 msgstr "Datei nicht gefunden\n"
 
-#: text.c:198
+#: text.c:202
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Teste Geschwindigkeiten, das kann etwas dauern...\n"
 
-#: text.c:203
+#: text.c:207
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i benutzbare Server gefunden, werde diese URLs benutzen:\n"
 
-#: text.c:265
+#: text.c:269
 #, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Keine Status-Datei, Fortsetzung nicht möglich!\n"
 
-#: text.c:270
+#: text.c:274
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr "Status-Datei gefunden, aber noch nichts übertragen. Neustart.\n"
 
-#: text.c:401
+#: text.c:405
 #, c-format
 msgid ""
 "\n"
@@ -192,48 +192,48 @@
 "\n"
 "%s abgerufen in %s. (%.2f KB/s)\n"
 
-#: text.c:423
+#: text.c:427
 #, fuzzy, c-format
 msgid "%lld byte"
 msgstr "%i Byte"
 
-#: text.c:425
+#: text.c:429
 #, fuzzy, c-format
 msgid "%lld bytes"
 msgstr "%i Bytes"
 
-#: text.c:427
+#: text.c:431
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f Kilobytes"
 
-#: text.c:429
+#: text.c:433
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f Megabytes"
 
-#: text.c:438
+#: text.c:442
 #, c-format
 msgid "%i second"
 msgstr "%i Sekunde"
 
-#: text.c:440
+#: text.c:444
 #, c-format
 msgid "%i seconds"
 msgstr "%i Sekunden"
 
-#: text.c:442
+#: text.c:446
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i Sekunden"
 
-#: text.c:444
+#: text.c:448
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i Sekunden"
 
-#: text.c:524
-#, fuzzy, c-format
+#: text.c:528
+#, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
 "\n"
@@ -242,6 +242,7 @@
 "-o f\tSpecify local output file\n"
 "-S [x]\tSearch for mirrors and download from x servers\n"
 "-H x\tAdd header string\n"
+"-U x\tSet user agent\n"
 "-N\tJust don't use any proxy server\n"
 "-q\tLeave stdout alone\n"
 "-v\tMore status information\n"
@@ -257,6 +258,8 @@
 "-n x\tmaximale gleichzeitige Verbindungen\n"
 "-o f\tlokale Ausgabe-Datei\n"
 "-S [x]\tSuche nach Spiegelservern und Abruf von x Servern\n"
+"-H x\tSende HTTP-Header\n"
+"-U x\tSetze Browser-Kennung"
 "-N\tkeinen Proxy-Server benutzen\n"
 "-q\tkeine Meldungen auf Standard-Ausgabe\n"
 "-v\tzusätzliche Status-Information\n"
@@ -265,8 +268,8 @@
 "\n"
 "Fehler an lintux at lintux.cx melden.\n"
 
-#: text.c:540
-#, fuzzy, c-format
+#: text.c:545
+#, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
 "\n"
@@ -275,6 +278,7 @@
 "--output=f\t\t-o f\tSpecify local output file\n"
 "--search[=x]\t\t-S [x]\tSearch for mirrors and download from x servers\n"
 "--header=x\t\t-H x\tAdd header string\n"
+"--user-agent=x\t\t-U x\tSet user agent\n"
 "--no-proxy\t\t-N\tJust don't use any proxy server\n"
 "--quiet\t\t\t-q\tLeave stdout alone\n"
 "--verbose\t\t-v\tMore status information\n"
@@ -290,6 +294,8 @@
 "--num-connections=x\t-n x\tmaximale gleichzeitige Verbindungen\n"
 "--output=f\t\t-o f\tlokale Ausgabe-Datei\n"
 "--search=[x]\t\t-S [x]  Suche nach Spiegelservern und Abruf von x Servern\n"
+"--header=x\f\t-H x\tSende HTTP-Header\n"
+"--user-agent=x\f\t-U x\tSetze Browser-Kennung"
 "--no-proxy\t\t-N\tkeinen Proxy-Server benutzen\n"
 "--quiet\t\t\t-q\tkeine Meldungen auf Standard-Ausgabe\n"
 "--verbose\t\t-v\tzusätzliche Status-Information\n"
@@ -298,7 +304,8 @@
 "\n"
 "Fehler an lintux at lintux.cx melden.\n"
 
-#: text.c:560
+#: text.c:566
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel Version %s (%s)\n"
+

Modified: branches/2.x/http.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/http.c?rev=77&op=diff
==============================================================================
--- branches/2.x/http.c (original)
+++ branches/2.x/http.c Mon Dec 29 13:10:12 2008
@@ -103,7 +103,6 @@
 		http_addheader( conn, "GET %s HTTP/1.0", lurl );
 		http_addheader( conn, "Host: %s", conn->host );
 	}
-	http_addheader( conn, "User-Agent: %s", USER_AGENT );
 	if( *conn->auth )
 		http_addheader( conn, "Authorization: Basic %s", conn->auth );
 	if( conn->firstbyte )

Modified: branches/2.x/nl.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/nl.po?rev=77&op=diff
==============================================================================
--- branches/2.x/nl.po (original)
+++ branches/2.x/nl.po Mon Dec 29 13:10:12 2008
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-12 17:22+0530\n"
+"POT-Creation-Date: 2008-09-15 19:07+0200\n"
 "PO-Revision-Date: 2001-11-14 15:22+0200\n"
 "Last-Translator: Wilmer van der Gaast <wilmer at gaast.net>\n"
 "Language-Team: Dutch <nl at li.org>\n"
@@ -87,12 +87,12 @@
 msgid "Error in %s line %i.\n"
 msgstr "Fout in %s regel %i.\n"
 
-#: conn.c:348 ftp.c:124
+#: conn.c:349 ftp.c:124
 #, c-format
 msgid "Too many redirects.\n"
 msgstr "Te veel redirects.\n"
 
-#: conn.c:367
+#: conn.c:368
 #, c-format
 msgid "Unknown HTTP error.\n"
 msgstr "Onbekende HTTP fout.\n"
@@ -127,7 +127,7 @@
 msgid "Error writing command %s\n"
 msgstr "Fout bij het schrijven van commando %s\n"
 
-#: ftp.c:311 http.c:151
+#: ftp.c:311 http.c:150
 #, c-format
 msgid "Connection gone.\n"
 msgstr "Verbinding gesloten.\n"
@@ -137,52 +137,52 @@
 msgid "Invalid proxy string: %s\n"
 msgstr "Ongeldige proxy string: %s\n"
 
-#: text.c:150
+#: text.c:154
 #, c-format
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Fout bij het afsluiten van stdout.\n"
 
-#: text.c:178
+#: text.c:182
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr ""
 
-#: text.c:183
+#: text.c:187
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Begin download: %s\n"
 
-#: text.c:190
+#: text.c:194
 #, c-format
 msgid "Doing search...\n"
 msgstr "Zoeken...\n"
 
-#: text.c:194
+#: text.c:198
 #, c-format
 msgid "File not found\n"
 msgstr "Bestand niet gevonden\n"
 
-#: text.c:198
+#: text.c:202
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Snelheden testen, dit kan even duren...\n"
 
-#: text.c:203
+#: text.c:207
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i bruikbare servers gevonden, de volgende worden gebruikt:\n"
 
-#: text.c:265
+#: text.c:269
 #, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Geen .st bestand, kan niet resumen!\n"
 
-#: text.c:270
+#: text.c:274
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr ".st bestand gevonden maar geen uitvoerbestand. Opnieuw beginnen.\n"
 
-#: text.c:401
+#: text.c:405
 #, c-format
 msgid ""
 "\n"
@@ -191,47 +191,47 @@
 "\n"
 "%s gedownload in %s. (%.2f KB/s)\n"
 
-#: text.c:423
+#: text.c:427
 #, fuzzy, c-format
 msgid "%lld byte"
 msgstr "%i byte"
 
-#: text.c:425
+#: text.c:429
 #, fuzzy, c-format
 msgid "%lld bytes"
 msgstr "%i bytes"
 
-#: text.c:427
+#: text.c:431
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f kilobytes"
 
-#: text.c:429
+#: text.c:433
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f megabytes"
 
-#: text.c:438
+#: text.c:442
 #, c-format
 msgid "%i second"
 msgstr "%i seconde"
 
-#: text.c:440
+#: text.c:444
 #, c-format
 msgid "%i seconds"
 msgstr "%i seconden"
 
-#: text.c:442
+#: text.c:446
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i seconden"
 
-#: text.c:444
+#: text.c:448
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i seconden"
 
-#: text.c:524
+#: text.c:528
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -241,6 +241,7 @@
 "-o f\tSpecify local output file\n"
 "-S [x]\tSearch for mirrors and download from x servers\n"
 "-H x\tAdd header string\n"
+"-U x\tSet user agent\n"
 "-N\tJust don't use any proxy server\n"
 "-q\tLeave stdout alone\n"
 "-v\tMore status information\n"
@@ -265,7 +266,7 @@
 "\n"
 "Bugs melden aan lintux at lintux.cx\n"
 
-#: text.c:540
+#: text.c:545
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -275,6 +276,7 @@
 "--output=f\t\t-o f\tSpecify local output file\n"
 "--search[=x]\t\t-S [x]\tSearch for mirrors and download from x servers\n"
 "--header=x\t\t-H x\tAdd header string\n"
+"--user-agent=x\t\t-U x\tSet user agent\n"
 "--no-proxy\t\t-N\tJust don't use any proxy server\n"
 "--quiet\t\t\t-q\tLeave stdout alone\n"
 "--verbose\t\t-v\tMore status information\n"
@@ -299,7 +301,7 @@
 "\n"
 "Bugs melden aan lintux at lintux.cx\n"
 
-#: text.c:560
+#: text.c:566
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel versie %s (%s)\n"

Modified: branches/2.x/ru.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/ru.po?rev=77&op=diff
==============================================================================
--- branches/2.x/ru.po (original)
+++ branches/2.x/ru.po Mon Dec 29 13:10:12 2008
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-12 17:22+0530\n"
+"POT-Creation-Date: 2008-09-15 19:07+0200\n"
 "Last-Translator: newhren <colimit at gmail.com>\n"
 "Language-Team: Russian <ru at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -87,12 +87,12 @@
 msgid "Error in %s line %i.\n"
 msgstr "Ошибка в файле %s линия %i.\n"
 
-#: conn.c:348 ftp.c:124
+#: conn.c:349 ftp.c:124
 #, c-format
 msgid "Too many redirects.\n"
 msgstr "Слишком много перенаправлений.\n"
 
-#: conn.c:367
+#: conn.c:368
 #, c-format
 msgid "Unknown HTTP error.\n"
 msgstr "Неизвестная ошибка HTTP.\n"
@@ -127,7 +127,7 @@
 msgid "Error writing command %s\n"
 msgstr "Ошибка записи команды %s\n"
 
-#: ftp.c:311 http.c:151
+#: ftp.c:311 http.c:150
 #, c-format
 msgid "Connection gone.\n"
 msgstr "Соединение пропало.\n"
@@ -137,54 +137,54 @@
 msgid "Invalid proxy string: %s\n"
 msgstr "Некорректная стока прокси: %s\n"
 
-#: text.c:150
+#: text.c:154
 #, c-format
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "Невозможно перенаправить stdout в /dev/null.\n"
 
-#: text.c:178
+#: text.c:182
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "URLs длинной больше %d не поддерживаются\n"
 
-#: text.c:183
+#: text.c:187
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "Начинаю скачивание: %s\n"
 
-#: text.c:190
+#: text.c:194
 #, c-format
 msgid "Doing search...\n"
 msgstr "Ищем...\n"
 
-#: text.c:194
+#: text.c:198
 #, c-format
 msgid "File not found\n"
 msgstr "Файл не найден\n"
 
-#: text.c:198
+#: text.c:202
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "Пробуем скорости, это может занять некоторое время...\n"
 
-#: text.c:203
+#: text.c:207
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "Найдено %i полезныÑ
 серверов, будут использованы следующие URLs:\n"
 
-#: text.c:265
+#: text.c:269
 #, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "Файл состояния не найден, возобновление невозможно!\n"
 
-#: text.c:270
+#: text.c:274
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr ""
 "Файл состояния найден, но предварительно скачанные данные отсутствуют. "
 "Начинаем заново.\n"
 
-#: text.c:401
+#: text.c:405
 #, c-format
 msgid ""
 "\n"
@@ -193,47 +193,47 @@
 "\n"
 "%s скачано за %s. (%.2f КБ/с)\n"
 
-#: text.c:423
+#: text.c:427
 #, c-format
 msgid "%lld byte"
 msgstr "%lld байт"
 
-#: text.c:425
+#: text.c:429
 #, c-format
 msgid "%lld bytes"
 msgstr "%lld байта(ов)"
 
-#: text.c:427
+#: text.c:431
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f килобайта(ов)"
 
-#: text.c:429
+#: text.c:433
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f мегабайта(ов)"
 
-#: text.c:438
+#: text.c:442
 #, c-format
 msgid "%i second"
 msgstr "%i секунда"
 
-#: text.c:440
+#: text.c:444
 #, c-format
 msgid "%i seconds"
 msgstr "%i секунд(ы)"
 
-#: text.c:442
+#: text.c:446
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i секунд(ы)"
 
-#: text.c:444
+#: text.c:448
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i секунд(ы)"
 
-#: text.c:524
+#: text.c:528
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -243,6 +243,7 @@
 "-o f\tSpecify local output file\n"
 "-S [x]\tSearch for mirrors and download from x servers\n"
 "-H x\tAdd header string\n"
+"-U x\tSet user agent\n"
 "-N\tJust don't use any proxy server\n"
 "-q\tLeave stdout alone\n"
 "-v\tMore status information\n"
@@ -267,7 +268,7 @@
 "\n"
 "Об ошибкаÑ
 сообщайте на http://axel.alioth.debian.org/\n"
 
-#: text.c:540
+#: text.c:545
 #, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
@@ -277,6 +278,7 @@
 "--output=f\t\t-o f\tSpecify local output file\n"
 "--search[=x]\t\t-S [x]\tSearch for mirrors and download from x servers\n"
 "--header=x\t\t-H x\tAdd header string\n"
+"--user-agent=x\t\t-U x\tSet user agent\n"
 "--no-proxy\t\t-N\tJust don't use any proxy server\n"
 "--quiet\t\t\t-q\tLeave stdout alone\n"
 "--verbose\t\t-v\tMore status information\n"
@@ -301,7 +303,7 @@
 "\n"
 "Об ошибкаÑ
 сообщайте на http://axel.alioth.debian.org/\n"
 
-#: text.c:560
+#: text.c:566
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel, версия %s (%s)\n"

Modified: branches/2.x/text.c
URL: http://svn.debian.org/wsvn/axel/branches/2.x/text.c?rev=77&op=diff
==============================================================================
--- branches/2.x/text.c (original)
+++ branches/2.x/text.c Mon Dec 29 13:10:12 2008
@@ -53,6 +53,7 @@
 	{ "version",		0,	NULL,	'V' },
 	{ "alternate",		0,	NULL,	'a' },
 	{ "header",		1,	NULL,	'H' },
+	{ "user-agent",		1,	NULL,	'U' },
 	{ NULL,			0,	NULL,	0 }
 };
 #endif
@@ -89,12 +90,15 @@
 	{
 		int option;
 		
-		option = getopt_long( argc, argv, "s:n:o:S::NqvhVaH:", axel_options, NULL );
+		option = getopt_long( argc, argv, "s:n:o:S::NqvhVaH:U:", axel_options, NULL );
 		if( option == -1 )
 			break;
 		
 		switch( option )
 		{
+		case 'U':
+			strncpy( conf->user_agent, optarg, MAX_STRING);
+			break;
 		case 'H':
 			strncpy( conf->add_header[cur_head++], optarg, MAX_STRING );
 			break;
@@ -528,6 +532,7 @@
 		"-o f\tSpecify local output file\n"
 		"-S [x]\tSearch for mirrors and download from x servers\n"
 		"-H x\tAdd header string\n"
+		"-U x\tSet user agent\n"
 		"-N\tJust don't use any proxy server\n"
 		"-q\tLeave stdout alone\n"
 		"-v\tMore status information\n"
@@ -544,6 +549,7 @@
 		"--output=f\t\t-o f\tSpecify local output file\n"
 		"--search[=x]\t\t-S [x]\tSearch for mirrors and download from x servers\n"
 		"--header=x\t\t-H x\tAdd header string\n"
+		"--user-agent=x\t\t-U x\tSet user agent\n"
 		"--no-proxy\t\t-N\tJust don't use any proxy server\n"
 		"--quiet\t\t\t-q\tLeave stdout alone\n"
 		"--verbose\t\t-v\tMore status information\n"

Modified: branches/2.x/zh_cn.po
URL: http://svn.debian.org/wsvn/axel/branches/2.x/zh_cn.po?rev=77&op=diff
==============================================================================
--- branches/2.x/zh_cn.po (original)
+++ branches/2.x/zh_cn.po Mon Dec 29 13:10:12 2008
@@ -2,14 +2,14 @@
 msgstr ""
 "Project-Id-Version: Axel\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-14 01:00+0530\n"
+"POT-Creation-Date: 2008-12-29 13:55+0100\n"
 "PO-Revision-Date: 2008-11-08 22:40+0700\n"
 "Last-Translator: Shuge Lee <shuge.lee at gmail.com>\n"
-"Last-Revision: Li Jin <punkid.online at gmail.com>\n"
 "Language-Team: Simplified Chinese <i18n-zh at i18n.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Last-Revision: Li Jin <punkid.online at gmail.com>\n"
 
 #: axel.c:55
 msgid "Buffer resized for this speed."
@@ -20,69 +20,67 @@
 msgstr "无法解析URL\n"
 
 #: axel.c:126
-#, c-format
-msgid "File size: %i bytes"
+#, fuzzy, c-format
+msgid "File size: %lld bytes"
 msgstr "文件大小: %i 字节"
 
-#: axel.c:142
+#: axel.c:143
 #, c-format
 msgid "Opening output file %s"
 msgstr "打开输出文件 %s"
 
-#: axel.c:151
+#: axel.c:152
 msgid "Server unsupported, starting from scratch with one connection."
 msgstr "服务器不支持,开始一个连接。"
 
-#: axel.c:170
-#, c-format
-msgid "State file found: %i bytes downloaded, %i to go."
+#: axel.c:171
+#, fuzzy, c-format
+msgid "State file found: %lld bytes downloaded, %lld to go."
 msgstr "找到状态文件: %i 字节已下载,继续下载 %i 字节。"
 
-#: axel.c:177
-#: axel.c:189
+#: axel.c:178 axel.c:190
 msgid "Error opening local file"
 msgstr "打开本地文件错误"
 
-#: axel.c:201
+#: axel.c:202
 msgid "Crappy filesystem/OS.. Working around. :-("
-msgstr "糟糕的文件系统或操作系统……Working around……(译注德国写的句子,实在不知道如何翻译……):-("
-
-#: axel.c:234
+msgstr ""
+"糟糕的文件系统或操作系统……Working around……(译注德国写的句子,实在不知道如何"
+"翻译……):-("
+
+#: axel.c:235
 msgid "Starting download"
 msgstr "开始下载"
 
-#: axel.c:240
-#: axel.c:393
+#: axel.c:241 axel.c:398
 #, c-format
 msgid "Connection %i downloading from %s:%i using interface %s"
 msgstr "连接 %i 从 %s:%i 通过接口 %s 下载"
 
-#: axel.c:244
-#: axel.c:402
+#: axel.c:245 axel.c:407
 msgid "pthread error!!!"
 msgstr "线程错误!!!"
 
-#: axel.c:312
+#: axel.c:314
 #, c-format
 msgid "Error on connection %i! Connection closed"
 msgstr "连接 %i 有错误! 连接中断"
 
-#: axel.c:326
+#: axel.c:328
 #, c-format
 msgid "Connection %i unexpectedly closed"
 msgstr "连接 %i 被异常中断"
 
-#: axel.c:330
-#: axel.c:347
+#: axel.c:332 axel.c:349
 #, c-format
 msgid "Connection %i finished"
 msgstr "连接 %i 结束"
 
-#: axel.c:359
+#: axel.c:361
 msgid "Write error!"
 msgstr "写错误!"
 
-#: axel.c:371
+#: axel.c:373
 #, c-format
 msgid "Connection %i timed out"
 msgstr "连接è¶
æ—¶ %i"
@@ -92,19 +90,17 @@
 msgid "Error in %s line %i.\n"
 msgstr "%s %i 行有错误。\n"
 
-#: conn.c:345
-#: ftp.c:124
+#: conn.c:349 ftp.c:124
 #, c-format
 msgid "Too many redirects.\n"
 msgstr "太多重定向。\n"
 
-#: conn.c:364
+#: conn.c:368
 #, c-format
 msgid "Unknown HTTP error.\n"
 msgstr "未知 HTTP 错误。\n"
 
-#: ftp.c:35
-#: http.c:60
+#: ftp.c:35 http.c:60
 #, c-format
 msgid "Unable to connect to server %s:%i\n"
 msgstr "不能连接到服务器 %s:%i\n"
@@ -114,8 +110,7 @@
 msgid "Can't change directory to %s\n"
 msgstr "不能变更目录到 %s\n"
 
-#: ftp.c:117
-#: ftp.c:177
+#: ftp.c:117 ftp.c:177
 #, c-format
 msgid "File not found.\n"
 msgstr "找不到文件。\n"
@@ -125,8 +120,7 @@
 msgid "Multiple matches for this URL.\n"
 msgstr "这个 URL 有多个匹é
ã€‚\n"
 
-#: ftp.c:250
-#: ftp.c:256
+#: ftp.c:250 ftp.c:256
 #, c-format
 msgid "Error opening passive data connection.\n"
 msgstr "打开主动数据连接错误。\n"
@@ -136,8 +130,7 @@
 msgid "Error writing command %s\n"
 msgstr "写命令出错 %s\n"
 
-#: ftp.c:311
-#: http.c:151
+#: ftp.c:311 http.c:150
 #, c-format
 msgid "Connection gone.\n"
 msgstr "连接继续。\n"
@@ -147,52 +140,52 @@
 msgid "Invalid proxy string: %s\n"
 msgstr "代理字符串无效: %s\n"
 
-#: text.c:146
+#: text.c:154
 #, c-format
 msgid "Can't redirect stdout to /dev/null.\n"
 msgstr "stdout 不能重定向到 /dev/null 。\n"
 
-#: text.c:174
+#: text.c:182
 #, c-format
 msgid "Can't handle URLs of length over %d\n"
 msgstr "不能处理长度è¶
过 %d 的URLs\n"
 
-#: text.c:179
+#: text.c:187
 #, c-format
 msgid "Initializing download: %s\n"
 msgstr "初始化下载: %s\n"
 
-#: text.c:186
+#: text.c:194
 #, c-format
 msgid "Doing search...\n"
 msgstr "进行搜索中...\n"
 
-#: text.c:190
+#: text.c:198
 #, c-format
 msgid "File not found\n"
 msgstr "文件找不到\n"
 
-#: text.c:194
+#: text.c:202
 #, c-format
 msgid "Testing speeds, this can take a while...\n"
 msgstr "c测试速度,这可能有点费时……\n"
 
-#: text.c:199
+#: text.c:207
 #, c-format
 msgid "%i usable servers found, will use these URLs:\n"
 msgstr "%i 可用的服务器没有找到,将使用这些 URLs :\n"
 
-#: text.c:261
+#: text.c:269
 #, c-format
 msgid "No state file, cannot resume!\n"
 msgstr "没有状态文件,无法恢复!\n"
 
-#: text.c:266
+#: text.c:274
 #, c-format
 msgid "State file found, but no downloaded data. Starting from scratch.\n"
 msgstr "找到状态文件,但没有已下载数据。重新开始。\n"
 
-#: text.c:397
+#: text.c:405
 #, c-format
 msgid ""
 "\n"
@@ -201,48 +194,48 @@
 "\n"
 "%s 已下载,用时 %s。(%.2f 千字节/秒)\n"
 
-#: text.c:419
-#, c-format
-msgid "%i byte"
+#: text.c:427
+#, fuzzy, c-format
+msgid "%lld byte"
 msgstr "%i 字节"
 
-#: text.c:421
-#, c-format
-msgid "%i bytes"
+#: text.c:429
+#, fuzzy, c-format
+msgid "%lld bytes"
 msgstr "%i 字节"
 
-#: text.c:423
+#: text.c:431
 #, c-format
 msgid "%.1f kilobytes"
 msgstr "%.1f 千字节"
 
-#: text.c:425
+#: text.c:433
 #, c-format
 msgid "%.1f megabytes"
 msgstr "%.1f å
†å­—节"
 
-#: text.c:434
+#: text.c:442
 #, c-format
 msgid "%i second"
 msgstr "%i 秒"
 
-#: text.c:436
+#: text.c:444
 #, c-format
 msgid "%i seconds"
 msgstr "%i 秒"
 
-#: text.c:438
+#: text.c:446
 #, c-format
 msgid "%i:%02i seconds"
 msgstr "%i:%02i 秒"
 
-#: text.c:440
+#: text.c:448
 #, c-format
 msgid "%i:%02i:%02i seconds"
 msgstr "%i:%02i:%02i 秒"
 
-#: text.c:515
-#, c-format
+#: text.c:528
+#, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
 "\n"
@@ -250,6 +243,8 @@
 "-n x\tSpecify maximum number of connections\n"
 "-o f\tSpecify local output file\n"
 "-S [x]\tSearch for mirrors and download from x servers\n"
+"-H x\tAdd header string\n"
+"-U x\tSet user agent\n"
 "-N\tJust don't use any proxy server\n"
 "-q\tLeave stdout alone\n"
 "-v\tMore status information\n"
@@ -272,10 +267,11 @@
 "-h\t帮助信息\n"
 "-V\t版本信息\n"
 "\n"
-"请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提交程序漏洞\n"
-
-#: text.c:530
-#, c-format
+"请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提"
+"交程序漏洞\n"
+
+#: text.c:545
+#, fuzzy, c-format
 msgid ""
 "Usage: axel [options] url1 [url2] [url...]\n"
 "\n"
@@ -283,6 +279,8 @@
 "--num-connections=x\t-n x\tSpecify maximum number of connections\n"
 "--output=f\t\t-o f\tSpecify local output file\n"
 "--search[=x]\t\t-S [x]\tSearch for mirrors and download from x servers\n"
+"--header=x\t\t-H x\tAdd header string\n"
+"--user-agent=x\t\t-U x\tSet user agent\n"
 "--no-proxy\t\t-N\tJust don't use any proxy server\n"
 "--quiet\t\t\t-q\tLeave stdout alone\n"
 "--verbose\t\t-v\tMore status information\n"
@@ -305,10 +303,10 @@
 "--help\t\t\t-h\t帮助信息\n"
 "--version\t\t-V\t版本信息\n"
 "\n"
-"请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提交程序漏洞\n"
-
-#: text.c:549
+"请向 shuge.lee at gmail.com 提交翻译错误,请向 http://axel.alioth.debian.org/ 提"
+"交程序漏洞\n"
+
+#: text.c:566
 #, c-format
 msgid "Axel version %s (%s)\n"
 msgstr "Axel 版本 %s (%s)\n"
-




More information about the axel-commits mailing list