Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
d601e4ed
Commit
d601e4ed
authored
Feb 07, 2010
by
Rémi Denis-Courmont
Browse files
Split file path functions out of vlc_charset.h into vlc_fs.h
parent
0ce5cde7
Changes
91
Hide whitespace changes
Inline
Side-by-side
include/vlc_charset.h
View file @
d601e4ed
...
...
@@ -2,7 +2,7 @@
* charset.h: Unicode UTF-8 wrappers function
*****************************************************************************
* Copyright (C) 2003-2005 the VideoLAN team
* Copyright © 2005-200
6
Rémi Denis-Courmont
* Copyright © 2005-20
1
0 Rémi Denis-Courmont
* $Id$
*
* Author: Rémi Denis-Courmont <rem # videolan,org>
...
...
@@ -31,8 +31,6 @@
*/
#include <stdarg.h>
#include <sys/types.h>
#include <dirent.h>
VLC_EXPORT
(
void
,
LocaleFree
,
(
const
char
*
)
);
VLC_EXPORT
(
char
*
,
FromLocale
,
(
const
char
*
)
LIBVLC_USED
);
...
...
@@ -40,29 +38,9 @@ VLC_EXPORT( char *, FromLocaleDup, ( const char * ) LIBVLC_USED );
VLC_EXPORT
(
char
*
,
ToLocale
,
(
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
ToLocaleDup
,
(
const
char
*
)
LIBVLC_USED
);
/* TODO: move all of this to "vlc_fs.h" or something like that */
VLC_EXPORT
(
int
,
utf8_open
,
(
const
char
*
filename
,
int
flags
,
...
)
LIBVLC_USED
);
VLC_EXPORT
(
FILE
*
,
utf8_fopen
,
(
const
char
*
filename
,
const
char
*
mode
)
LIBVLC_USED
);
VLC_EXPORT
(
DIR
*
,
utf8_opendir
,
(
const
char
*
dirname
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
utf8_readdir
,
(
DIR
*
dir
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
utf8_loaddir
,
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8_scandir
,
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8_mkdir
,
(
const
char
*
filename
,
mode_t
mode
)
);
VLC_EXPORT
(
int
,
utf8_unlink
,
(
const
char
*
filename
)
);
int
utf8_rename
(
const
char
*
,
const
char
*
);
#if defined( WIN32 ) && !defined( UNDER_CE )
# define stat _stati64
#endif
VLC_EXPORT
(
int
,
utf8_stat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8_lstat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8_vfprintf
,
(
FILE
*
stream
,
const
char
*
fmt
,
va_list
ap
)
);
VLC_EXPORT
(
int
,
utf8_fprintf
,
(
FILE
*
,
const
char
*
,
...
)
LIBVLC_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
int
,
utf8_mkstemp
,
(
char
*
)
);
VLC_EXPORT
(
char
*
,
EnsureUTF8
,
(
char
*
)
);
VLC_EXPORT
(
const
char
*
,
IsUTF8
,
(
const
char
*
)
LIBVLC_USED
);
...
...
include/vlc_fs.h
0 → 100644
View file @
d601e4ed
/*****************************************************************************
* vlc_fs.h: File system helpers
*****************************************************************************
* Copyright © 2006-2010 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_FS_H
#define VLC_FS_H 1
/**
* \file
* Those functions convert file paths from UTF-8 to the system-specific
* encoding (especially UTF-16 on Windows). Also, they always mark file
* descriptor with the close-on-exec flag.
*/
#include <sys/types.h>
#include <dirent.h>
VLC_EXPORT
(
int
,
utf8_open
,
(
const
char
*
filename
,
int
flags
,
...
)
LIBVLC_USED
);
VLC_EXPORT
(
FILE
*
,
utf8_fopen
,
(
const
char
*
filename
,
const
char
*
mode
)
LIBVLC_USED
);
VLC_EXPORT
(
DIR
*
,
utf8_opendir
,
(
const
char
*
dirname
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
utf8_readdir
,
(
DIR
*
dir
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
utf8_loaddir
,
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8_scandir
,
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8_mkdir
,
(
const
char
*
filename
,
mode_t
mode
)
);
VLC_EXPORT
(
int
,
utf8_unlink
,
(
const
char
*
filename
)
);
/* Not exported */
int
utf8_rename
(
const
char
*
,
const
char
*
);
#if defined( WIN32 ) && !defined( UNDER_CE )
# define stat _stati64
#endif
VLC_EXPORT
(
int
,
utf8_stat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8_lstat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8_mkstemp
,
(
char
*
)
);
#endif
modules/access/bd/bd.c
View file @
d601e4ed
...
...
@@ -39,7 +39,7 @@
#include <vlc_input.h>
#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_bits.h>
#include <assert.h>
...
...
modules/access/dc1394.c
View file @
d601e4ed
...
...
@@ -36,7 +36,7 @@
#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_demux.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_picture.h>
#ifdef HAVE_FCNTL_H
...
...
modules/access/directory.c
View file @
d601e4ed
...
...
@@ -55,7 +55,7 @@ static inline int dirfd (DIR *dir)
}
#endif
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_url.h>
#include <vlc_strings.h>
...
...
modules/access/dvb/linux_dvb.c
View file @
d601e4ed
...
...
@@ -38,7 +38,7 @@
#include <time.h>
#include <unistd.h>
#include <poll.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
/* DVB Card Drivers */
#include <linux/dvb/version.h>
...
...
modules/access/dvdnav.c
View file @
d601e4ed
...
...
@@ -36,6 +36,7 @@
#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_charset.h>
#include <vlc_fs.h>
#include <vlc_dialog.h>
...
...
modules/access/file.c
View file @
d601e4ed
...
...
@@ -72,7 +72,7 @@
# define PathIsNetworkPathW(wpath) (! wcsncmp(wpath, L"\\\\", 2))
#endif
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_url.h>
struct
access_sys_t
...
...
modules/access/fs.h
View file @
d601e4ed
...
...
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <
vlc_charse
t.h>
#include <
diren
t.h>
int
Open
(
vlc_object_t
*
);
void
Close
(
vlc_object_t
*
);
...
...
modules/access/mmap.c
View file @
d601e4ed
...
...
@@ -27,7 +27,7 @@
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_input.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_dialog.h>
#include <assert.h>
...
...
modules/access/mtp.c
View file @
d601e4ed
...
...
@@ -49,7 +49,7 @@
#include <unistd.h>
#include <poll.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include "libmtp.h"
...
...
modules/access/oss.c
View file @
d601e4ed
...
...
@@ -36,7 +36,7 @@
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <fcntl.h>
#include <unistd.h>
...
...
modules/access/pvr.c
View file @
d601e4ed
...
...
@@ -32,7 +32,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <sys/types.h>
#include <fcntl.h>
...
...
modules/access/smb.c
View file @
d601e4ed
...
...
@@ -29,7 +29,7 @@
#endif
#include <vlc_common.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
...
...
modules/access/v4l.c
View file @
d601e4ed
...
...
@@ -38,7 +38,7 @@
#include <vlc_demux.h>
#include <vlc_access.h>
#include <vlc_picture.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
...
...
modules/access/v4l2.c
View file @
d601e4ed
...
...
@@ -41,6 +41,7 @@
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_charset.h>
#include <vlc_fs.h>
#include <vlc_demux.h>
#include <vlc_input.h>
...
...
modules/access/vcd/cdrom.c
View file @
d601e4ed
...
...
@@ -33,6 +33,7 @@
#include <vlc_common.h>
#include <vlc_access.h>
#include <vlc_charset.h>
#include <vlc_fs.h>
#include <limits.h>
#ifdef HAVE_UNISTD_H
...
...
@@ -77,7 +78,6 @@
#include "cdrom_internals.h"
#include "cdrom.h"
#include <vlc_charset.h>
#include <vlc_meta.h>
/*****************************************************************************
...
...
modules/access/vcdx/vcd.c
View file @
d601e4ed
...
...
@@ -35,7 +35,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_charset.h>
#include "vcd.h"
#include "access.h"
...
...
modules/access_output/file.c
View file @
d601e4ed
...
...
@@ -39,7 +39,7 @@
#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_block.h>
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#include <vlc_strings.h>
#if defined( WIN32 ) && !defined( UNDER_CE )
...
...
modules/audio_output/file.c
View file @
d601e4ed
...
...
@@ -34,7 +34,7 @@
#include <vlc_plugin.h>
#include <vlc_aout.h>
#include <vlc_codecs.h>
/* WAVEHEADER */
#include <vlc_
charset
.h>
#include <vlc_
fs
.h>
#define FRAME_SIZE 2048
#define A52_FRAME_NB 1536
...
...
Prev
1
2
3
4
5
Next
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