Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
877f3231
Commit
877f3231
authored
Jul 15, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jul 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fix spec file for FTPFindFirstFileA/W functions
- implement parsing of NT directory format
parent
02c67f31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
74 deletions
+128
-74
ftp.c
dlls/wininet/ftp.c
+126
-72
wininet.spec
dlls/wininet/wininet.spec
+2
-2
No files found.
dlls/wininet/ftp.c
View file @
877f3231
...
...
@@ -2521,83 +2521,137 @@ BOOL FTP_ParseDirectory(LPWININETFTPSESSIONA lpwfs, INT nSocket, LPFILEPROPERTIE
pszToken
=
strtok
(
pszLine
,
"
\t
"
);
/* HACK! If this is not a file listing skip the line */
if
(
!
pszToken
||
10
!=
strlen
(
pszToken
)
||
nBufLen
<=
MIN_LEN_DIR_ENTRY
)
if
(
!
pszToken
||
nBufLen
<=
MIN_LEN_DIR_ENTRY
)
{
nBufLen
=
MAX_REPLY_LEN
;
continue
;
}
if
(
10
==
strlen
(
pszToken
))
{
/* Unix way of parsing ... */
FTP_ParsePermission
(
pszToken
,
curFileProp
);
nTokenToSkip
=
3
;
nCount
=
0
;
do
{
pszToken
=
strtok
(
NULL
,
"
\t
"
);
nCount
++
;
}
while
(
nCount
<=
nTokenToSkip
);
/* Store the size of the file in the param list. */
TRACE
(
"nSize-> %s
\n
"
,
pszToken
);
if
(
pszToken
!=
NULL
)
curFileProp
->
nSize
=
atol
(
pszToken
);
/* Parse last modified time. */
nSeconds
=
0
;
nMinutes
=
0
;
nHour
=
0
;
nDay
=
0
;
nMonth
=
0
;
nYear
=
0
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
strncpy
(
pszMonth
,
pszToken
,
MAX_MONTH_LEN
);
CharUpperA
(
pszMonth
);
pszMatch
=
strstr
(
szMonths
,
pszMonth
);
if
(
pszMatch
!=
NULL
)
nMonth
=
(
pszMatch
-
szMonths
)
/
3
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
TRACE
(
"nDay -> %s
\n
"
,
pszToken
);
if
(
pszToken
!=
NULL
)
nDay
=
atoi
(
pszToken
);
pszToken
=
strtok
(
NULL
,
"
\t
"
);
pszMinutes
=
strchr
(
pszToken
,
':'
);
if
(
pszMinutes
!=
NULL
)
{
pszMinutes
++
;
nMinutes
=
atoi
(
pszMinutes
);
pszHour
=
pszMinutes
-
3
;
if
(
pszHour
!=
NULL
)
nHour
=
atoi
(
pszHour
);
time
(
&
aTime
);
apTM
=
localtime
(
&
aTime
);
nYear
=
apTM
->
tm_year
;
}
else
{
nYear
=
atoi
(
pszToken
);
nYear
-=
1900
;
nHour
=
12
;
}
FTP_ParsePermission
(
pszToken
,
curFileProp
);
nTokenToSkip
=
3
;
nCount
=
0
;
do
{
pszToken
=
strtok
(
NULL
,
"
\t
"
);
nCount
++
;
}
while
(
nCount
<=
nTokenToSkip
);
/* Store the size of the file in the param list. */
TRACE
(
"nSize-> %s
\n
"
,
pszToken
);
if
(
pszToken
!=
NULL
)
curFileProp
->
nSize
=
atol
(
pszToken
);
/* Parse last modified time. */
nSeconds
=
0
;
nMinutes
=
0
;
nHour
=
0
;
nDay
=
0
;
nMonth
=
0
;
nYear
=
0
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
strncpy
(
pszMonth
,
pszToken
,
MAX_MONTH_LEN
);
CharUpperA
(
pszMonth
);
pszMatch
=
strstr
(
szMonths
,
pszMonth
);
if
(
pszMatch
!=
NULL
)
nMonth
=
(
pszMatch
-
szMonths
)
/
3
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
TRACE
(
"nDay -> %s
\n
"
,
pszToken
);
if
(
pszToken
!=
NULL
)
nDay
=
atoi
(
pszToken
);
pszToken
=
strtok
(
NULL
,
"
\t
"
);
pszMinutes
=
strchr
(
pszToken
,
':'
);
if
(
pszMinutes
!=
NULL
)
{
pszMinutes
++
;
nMinutes
=
atoi
(
pszMinutes
);
pszHour
=
pszMinutes
-
3
;
if
(
pszHour
!=
NULL
)
nHour
=
atoi
(
pszHour
);
time
(
&
aTime
);
apTM
=
localtime
(
&
aTime
);
nYear
=
apTM
->
tm_year
;
}
else
{
nYear
=
atoi
(
pszToken
);
nYear
-=
1900
;
nHour
=
12
;
}
curFileProp
->
tmLastModified
.
tm_sec
=
nSeconds
;
curFileProp
->
tmLastModified
.
tm_min
=
nMinutes
;
curFileProp
->
tmLastModified
.
tm_hour
=
nHour
;
curFileProp
->
tmLastModified
.
tm_mday
=
nDay
;
curFileProp
->
tmLastModified
.
tm_mon
=
nMonth
;
curFileProp
->
tmLastModified
.
tm_year
=
nYear
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
if
(
pszToken
!=
NULL
)
{
curFileProp
->
lpszName
=
FTP_strdup
(
pszToken
);
TRACE
(
": %s
\n
"
,
curFileProp
->
lpszName
);
}
nBufLen
=
MAX_REPLY_LEN
;
indexFilePropArray
++
;
curFileProp
->
tmLastModified
.
tm_sec
=
nSeconds
;
curFileProp
->
tmLastModified
.
tm_min
=
nMinutes
;
curFileProp
->
tmLastModified
.
tm_hour
=
nHour
;
curFileProp
->
tmLastModified
.
tm_mday
=
nDay
;
curFileProp
->
tmLastModified
.
tm_mon
=
nMonth
;
curFileProp
->
tmLastModified
.
tm_year
=
nYear
;
pszToken
=
strtok
(
NULL
,
"
\t
"
);
if
(
pszToken
!=
NULL
)
{
curFileProp
->
lpszName
=
FTP_strdup
(
pszToken
);
TRACE
(
": %s
\n
"
,
curFileProp
->
lpszName
);
}
nBufLen
=
MAX_REPLY_LEN
;
indexFilePropArray
++
;
}
else
if
(
8
==
strlen
(
pszToken
))
{
/* NT way of parsing ... :
07-13-03 08:55PM <DIR> sakpatch
05-09-03 06:02PM 12656686 2003-04-21bgm_cmd_e.rgz
*/
curFileProp
->
permissions
=
0xFFFF
;
/* No idea, put full permission :-) */
sscanf
(
pszToken
,
"%d-%d-%d"
,
&
curFileProp
->
tmLastModified
.
tm_mon
,
&
curFileProp
->
tmLastModified
.
tm_mday
,
&
curFileProp
->
tmLastModified
.
tm_year
);
/* Do we check for Y2K problems ? */
pszToken
=
strtok
(
NULL
,
"
\t
"
);
if
(
pszToken
==
NULL
)
{
nBufLen
=
MAX_REPLY_LEN
;
continue
;
}
sscanf
(
pszToken
,
"%d:%d"
,
&
curFileProp
->
tmLastModified
.
tm_hour
,
&
curFileProp
->
tmLastModified
.
tm_min
);
if
((
pszToken
[
5
]
==
'P'
)
&&
(
pszToken
[
6
]
==
'M'
))
{
curFileProp
->
tmLastModified
.
tm_hour
+=
12
;
}
curFileProp
->
tmLastModified
.
tm_sec
=
0
;
TRACE
(
"Mod time: %2d:%2d:%2d %2d/%2d/%2d
\n
"
,
curFileProp
->
tmLastModified
.
tm_hour
,
curFileProp
->
tmLastModified
.
tm_min
,
curFileProp
->
tmLastModified
.
tm_sec
,
curFileProp
->
tmLastModified
.
tm_year
,
curFileProp
->
tmLastModified
.
tm_mon
,
curFileProp
->
tmLastModified
.
tm_mday
);
pszToken
=
strtok
(
NULL
,
"
\t
"
);
if
(
pszToken
==
NULL
)
{
nBufLen
=
MAX_REPLY_LEN
;
continue
;
}
if
(
!
strcasecmp
(
pszToken
,
"<DIR>"
))
{
curFileProp
->
bIsDirectory
=
TRUE
;
TRACE
(
"Is directory
\n
"
);
}
else
{
curFileProp
->
bIsDirectory
=
FALSE
;
curFileProp
->
nSize
=
atol
(
pszToken
);
TRACE
(
"nSize: %ld
\n
"
,
curFileProp
->
nSize
);
}
pszToken
=
strtok
(
NULL
,
"
\t
"
);
if
(
pszToken
==
NULL
)
{
nBufLen
=
MAX_REPLY_LEN
;
continue
;
}
curFileProp
->
lpszName
=
FTP_strdup
(
pszToken
);
TRACE
(
"Name: %s
\n
"
,
curFileProp
->
lpszName
);
nBufLen
=
MAX_REPLY_LEN
;
indexFilePropArray
++
;
}
else
{
nBufLen
=
MAX_REPLY_LEN
;
}
}
if
(
bSuccess
&&
indexFilePropArray
)
...
...
dlls/wininet/wininet.spec
View file @
877f3231
...
...
@@ -35,8 +35,8 @@
@ stdcall FtpCreateDirectoryW(ptr wstr)
@ stdcall FtpDeleteFileA(ptr str)
@ stub FtpDeleteFileW
@ stdcall FtpFindFirstFileA(ptr str
s
tr long long)
@ stdcall FtpFindFirstFileW(ptr wstr
ws
tr long long)
@ stdcall FtpFindFirstFileA(ptr str
p
tr long long)
@ stdcall FtpFindFirstFileW(ptr wstr
p
tr long long)
@ stdcall FtpGetCurrentDirectoryA(ptr str ptr)
@ stdcall FtpGetCurrentDirectoryW(ptr wstr ptr)
@ stdcall FtpGetFileA(ptr str str long long long long)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment