]> git.sesse.net Git - vlc/blobdiff - modules/access/http.c
* modules/gui/wxwindows/open.cpp: small fixes.
[vlc] / modules / access / http.c
index 5871e28b178d2f1264c5d7b46e19e0e98dfdccc1..7f0f8b86bb94d7d5592468011002e9815523c983 100644 (file)
@@ -2,7 +2,7 @@
  * http.c: HTTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.33 2003/04/30 04:13:12 hartman Exp $
+ * $Id: http.c,v 1.35 2003/05/15 22:27:36 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -71,13 +71,13 @@ static ssize_t Read    ( input_thread_t *, byte_t *, size_t );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-#define PROXY_TEXT N_("specify an HTTP proxy")
+#define PROXY_TEXT N_("Specify an HTTP proxy")
 #define PROXY_LONGTEXT N_( \
     "Specify an HTTP proxy to use. It must be in the form " \
     "http://myproxy.mydomain:myport. If none is specified, the HTTP_PROXY " \
     "environment variable will be tried." )
 
-#define CACHING_TEXT N_("caching value in ms")
+#define CACHING_TEXT N_("Caching value in ms")
 #define CACHING_LONGTEXT N_( \
     "Allows you to modify the default caching value for http streams. This " \
     "value should be set in miliseconds units." )
@@ -307,19 +307,11 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
             i_size = i_tell + atoll( psz_value );
 #else
             int sign = 1;
-            psz_parser = psz_value;
-            
-            while( *psz_value == ' ' || *psz_value == '\t' )
-                psz_value++;
-
-            if( *psz_value == '-' )
-                sign = -1;
-            while( *psz_value != '\0')
+
+            if( *psz_value == '-' ) sign = -1;
+            while( *psz_value >= '0' && *psz_value <= '9' )
             {
-                if( *psz_value >= '0' && *psz_value <= '9' )
-                    i_size = i_size * 10 + *psz_value++ - '0';
-                else
-                    psz_value++;
+                i_size = i_size * 10 + *psz_value++ - '0';
             }
             i_size = i_tell + ( i_size * sign );
 #endif