Changeset 1866f27c01df43f98627192eb69d015ba7ebe449

Show
Ignore:
Timestamp:
10/09/03 23:09:05 (5 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1063228145 +0000
git-parent:

[89fc743569216ba911382ccb65b191cc45c957ec]

git-author:
Laurent Aimar <fenrir@videolan.org> 1063228145 +0000
Message:
  • ftp : use atoll.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/ftp.c

    r0d39f13 r1866f27  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001-2003 VideoLAN 
    5  * $Id: ftp.c,v 1.20 2003/07/31 23:44:49 fenrir Exp $ 
     5 * $Id: ftp.c,v 1.21 2003/09/10 21:09:05 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    2929#include <sys/time.h> 
    3030#include <sys/stat.h> 
    31 #include <string.h> 
    3231#include <errno.h> 
    3332#include <fcntl.h> 
     
    336335    } 
    337336 
    338 #ifdef HAVE_ATOLL 
    339337    p_access->i_filesize = atoll( psz_arg + 4 ); 
    340 #else 
    341     { 
    342         int64_t i_size = 0; 
    343         char    *psz_parser = psz_arg + 4; 
    344         int     sign = 1; 
    345  
    346         while( *psz_parser == ' ' || *psz_parser == '\t' ) psz_parser++; 
    347  
    348         if( *psz_parser == '-' ) sign = -1; 
    349         while( *psz_parser >= '0' && *psz_parser <= '9' ) 
    350         { 
    351             i_size = i_size * 10 + *psz_parser++ - '0'; 
    352         } 
    353         p_access->i_filesize = i_size * sign; 
    354     } 
    355 #endif 
    356338 
    357339    msg_Dbg( p_input, "file size: "I64Fd, p_access->i_filesize );