Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
b6ec3349
Commit
b6ec3349
authored
May 01, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tabs and add some debug.
parent
52250745
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
src/misc/unicode.c
src/misc/unicode.c
+30
-26
No files found.
src/misc/unicode.c
View file @
b6ec3349
...
@@ -334,24 +334,26 @@ FILE *utf8_fopen( const char *filename, const char *mode )
...
@@ -334,24 +334,26 @@ FILE *utf8_fopen( const char *filename, const char *mode )
/* retrieve OS version */
/* retrieve OS version */
if
(
GetVersion
()
<
0x80000000
)
if
(
GetVersion
()
<
0x80000000
)
{
{
/* for Windows NT and above */
/* for Windows NT and above */
/*
/*
* fopen() cannot open files with non-“ANSI” characters on Windows.
* fopen() cannot open files with non-“ANSI” characters on Windows.
* We use _wfopen() instead. Same thing for mkdir() and stat().
* We use _wfopen() instead. Same thing for mkdir() and stat().
*/
*/
return
_wfopen
(
wpath
,
wmode
);
return
_wfopen
(
wpath
,
wmode
);
}
}
else
else
{
{
/* for Windows Me/98/95 */
/* for Windows Me/98/95 */
/* we use GetShortFileNameW to get the DOS 8.3 version of the file we need to open */
/* we use GetShortFileNameW to get the DOS 8.3 version of the file we need to open */
char
spath
[
MAX_PATH
+
1
];
char
spath
[
MAX_PATH
+
1
];
if
(
GetShortPathNameW
(
wpath
,
spath
,
MAX_PATH
)
)
if
(
GetShortPathNameW
(
wpath
,
spath
,
MAX_PATH
)
)
{
{
return
fopen
(
spath
,
wmode
);
fprintf
(
stderr
,
"fopen path: %s -> %s
\n
"
,
wpath
,
spath
);
}
return
fopen
(
spath
,
wmode
);
errno
=
ENOENT
;
}
return
NULL
;
fprintf
(
stderr
,
"GetShortPathName for %s failed
\n
"
,
wpath
);
errno
=
ENOENT
;
return
NULL
;
}
}
#endif
#endif
}
}
...
@@ -537,20 +539,22 @@ static int utf8_statEx( const char *filename, void *buf,
...
@@ -537,20 +539,22 @@ static int utf8_statEx( const char *filename, void *buf,
/* retrieve Windows OS version */
/* retrieve Windows OS version */
if
(
GetVersion
()
<
0x80000000
)
if
(
GetVersion
()
<
0x80000000
)
{
{
/* for Windows NT and above */
/* for Windows NT and above */
return
_wstati64
(
wpath
,
(
struct
_stati64
*
)
buf
);
return
_wstati64
(
wpath
,
(
struct
_stati64
*
)
buf
);
}
}
else
else
{
{
/* for Windows Me/98/95 */
/* for Windows Me/98/95 */
/* we use GetShortFileNameW to get the DOS 8.3 version */
/* we use GetShortFileNameW to get the DOS 8.3 version */
char
spath
[
MAX_PATH
+
1
];
char
spath
[
MAX_PATH
+
1
];
if
(
GetShortPathNameW
(
wpath
,
spath
,
MAX_PATH
)
)
if
(
GetShortPathNameW
(
wpath
,
spath
,
MAX_PATH
)
)
{
{
return
_stati64
(
spath
,
(
struct
_stati64
*
)
buf
);
fprintf
(
stderr
,
"stati path: %s -> %s
\n
"
,
wpath
,
spath
);
}
return
_stati64
(
spath
,
(
struct
_stati64
*
)
buf
);
errno
=
ENOENT
;
}
return
-
1
;
fprintf
(
stderr
,
"GetShortPathName for %s failed
\n
"
,
wpath
);
errno
=
ENOENT
;
return
-
1
;
}
}
#endif
#endif
}
}
...
...
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