~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to include/vlc_charset.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * charset.h: Unicode UTF-8 wrappers function
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2003-2005 the VideoLAN team
 
5
 * Copyright © 2005-2006 Rémi Denis-Courmont
 
6
 * $Id: 5bd3faa429b145fe0128c04f1b639668b03997da $
 
7
 *
 
8
 * Author: Rémi Denis-Courmont <rem # videolan,org>
 
9
 *
 
10
 * This program is free software; you can redistribute it and/or modify
 
11
 * it under the terms of the GNU General Public License as published by
 
12
 * the Free Software Foundation; either version 2 of the License, or
 
13
 * (at your option) any later version.
 
14
 *
 
15
 * This program is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU General Public License
 
21
 * along with this program; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
23
 *****************************************************************************/
 
24
 
 
25
#ifndef VLC_CHARSET_H
 
26
#define VLC_CHARSET_H 1
 
27
 
 
28
/**
 
29
 * \file
 
30
 * This files handles locale conversions in vlc
 
31
 */
 
32
 
 
33
#include <stdarg.h>
 
34
#include <sys/types.h>
 
35
#include <dirent.h>
 
36
 
 
37
VLC_EXPORT( void, LocaleFree, ( const char * ) );
 
38
VLC_EXPORT( char *, FromLocale, ( const char * ) );
 
39
VLC_EXPORT( char *, FromLocaleDup, ( const char * ) );
 
40
VLC_EXPORT( char *, ToLocale, ( const char * ) );
 
41
VLC_EXPORT( char *, ToLocaleDup, ( const char * ) );
 
42
 
 
43
/* TODO: move all of this to "vlc_fs.h" or something like that */
 
44
VLC_EXPORT( int, utf8_open, ( const char *filename, int flags, mode_t mode ) );
 
45
VLC_EXPORT( FILE *, utf8_fopen, ( const char *filename, const char *mode ) );
 
46
VLC_EXPORT( DIR *, utf8_opendir, ( const char *dirname ) );
 
47
VLC_EXPORT( char *, utf8_readdir, ( DIR *dir ) );
 
48
VLC_EXPORT( int, utf8_loaddir, ( DIR *dir, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
 
49
VLC_EXPORT( int, utf8_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
 
50
VLC_EXPORT( int, utf8_mkdir, ( const char *filename, mode_t mode ) );
 
51
VLC_EXPORT( int, utf8_unlink, ( const char *filename ) );
 
52
 
 
53
#ifdef WIN32
 
54
# define stat _stati64
 
55
#endif
 
56
 
 
57
VLC_EXPORT( int, utf8_stat, ( const char *filename, struct stat *buf ) );
 
58
VLC_EXPORT( int, utf8_lstat, ( const char *filename, struct stat *buf ) );
 
59
 
 
60
VLC_EXPORT( int, utf8_vfprintf, ( FILE *stream, const char *fmt, va_list ap ) );
 
61
VLC_EXPORT( int, utf8_fprintf, ( FILE *, const char *, ... ) LIBVLC_FORMAT( 2, 3 ) );
 
62
 
 
63
VLC_EXPORT( char *, EnsureUTF8, ( char * ) );
 
64
VLC_EXPORT( const char *, IsUTF8, ( const char * ) );
 
65
 
 
66
#ifdef WIN32
 
67
static inline char *FromWide (const wchar_t *wide)
 
68
{
 
69
    size_t len = WideCharToMultiByte (CP_UTF8, 0, wide, -1, NULL, 0, NULL, NULL);
 
70
    if (len == 0)
 
71
        return NULL;
 
72
 
 
73
    char *out = (char *)malloc (len);
 
74
 
 
75
    if (out)
 
76
        WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL);
 
77
    return out;
 
78
}
 
79
#endif
 
80
 
 
81
VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
 
82
 
 
83
VLC_EXPORT( double, us_strtod, ( const char *, char ** ) );
 
84
VLC_EXPORT( double, us_atof, ( const char * ) );
 
85
 
 
86
#endif