Changeset 1866f27c01df43f98627192eb69d015ba7ebe449
- 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:
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0d39f13 |
r1866f27 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| … | … | |
| 29 | 29 | #include <sys/time.h> |
|---|
| 30 | 30 | #include <sys/stat.h> |
|---|
| 31 | | #include <string.h> |
|---|
| 32 | 31 | #include <errno.h> |
|---|
| 33 | 32 | #include <fcntl.h> |
|---|
| … | … | |
| 336 | 335 | } |
|---|
| 337 | 336 | |
|---|
| 338 | | #ifdef HAVE_ATOLL |
|---|
| 339 | 337 | 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 |
|---|
| 356 | 338 | |
|---|
| 357 | 339 | msg_Dbg( p_input, "file size: "I64Fd, p_access->i_filesize ); |
|---|