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

« back to all changes in this revision

Viewing changes to modules/codec/cmml/xurl.c

  • 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:
5
5
 *                         Organisation (CSIRO) Australia
6
6
 * Copyright (C) 2004 the VideoLAN team
7
7
 *
8
 
 * $Id: 254fab9a219997b57fe89e4a637f60d4494f58aa $
 
8
 * $Id$
9
9
 *
10
10
 * Authors: Andre Pang <Andre.Pang@csiro.au>
11
11
 *
13
13
 * it under the terms of the GNU General Public License as published by
14
14
 * the Free Software Foundation; either version 2 of the License, or
15
15
 * (at your option) any later version.
16
 
 * 
 
16
 *
17
17
 * This program is distributed in the hope that it will be useful,
18
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
23
 * along with this program; if not, write to the Free Software
24
24
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25
25
 *****************************************************************************/
 
26
#ifdef HAVE_CONFIG_H
 
27
# include "config.h"
 
28
#endif
26
29
 
27
30
#include <stdio.h>
28
 
#include <stdlib.h>
29
 
#include <string.h>
30
31
 
31
32
#include "xurl.h"
32
33
 
38
39
#define xurl_strdup strdup
39
40
#endif
40
41
 
 
42
char        *XURL_FindQuery             ( char *psz_url );
41
43
static char *XURL_FindHostname          ( char *psz_url );
42
44
static char *XURL_FindPath              ( char *psz_url );
43
45
static char *XURL_FindFragment          ( char *psz_url );
83
85
        {
84
86
            /* psz_append is a relative URL */
85
87
            char *psz_new_url;
86
 
            
 
88
 
87
89
            /* strip off last path component */
88
90
            psz_new_url = XURL_GetHead( psz_url );
89
91
            psz_new_url = streallocat( psz_new_url, psz_append );
242
244
    return psz_scheme_and_hostname;
243
245
}
244
246
 
245
 
static 
 
247
static
246
248
char *XURL_FindFragment( char *psz_url )
247
249
{
248
250
    char *pc_hash = NULL;
249
251
    char *pc_return_value = NULL;
250
 
    
 
252
 
251
253
    pc_hash = strchr( psz_url, '#' );
252
254
    if( pc_hash != NULL )
253
255
    {
257
259
    return pc_return_value;
258
260
}
259
261
 
260
 
 
261
262
char *XURL_FindQuery( char *psz_url )
262
263
{
263
264
    char *pc_question_mark = NULL;
264
265
    char *pc_return_value = NULL;
265
 
    
 
266
 
266
267
    pc_question_mark = strchr( psz_url, '?' );
267
268
    if( pc_question_mark != NULL )
268
269
    {
312
313
}
313
314
 
314
315
#ifndef HAVE_STRDUP
315
 
static 
 
316
static
316
317
char *xurl_strdup( const char *psz_string )
317
318
{
318
319
    size_t i_length;
319
320
    char *psz_new_string;
320
321
 
321
322
    if( !psz_string ) return NULL;
322
 
    
 
323
 
323
324
    i_length = strlen( psz_string ) + 1;
324
325
    psz_new_string = (char *) xurl_malloc( i_length );
325
326
    if( psz_new_string == NULL ) return NULL;
330
331
}
331
332
#endif
332
333
 
333
 
static 
 
334
static
334
335
char *XURL_FindPath( char *psz_url )
335
336
{
336
337
    char *psz_return_value = NULL;
469
470
            psz_return_value = psz_without_fragment;
470
471
        }
471
472
    }
472
 
    
 
473
 
473
474
    return psz_return_value;
474
475
}
475
476
 
476
 
static 
 
477
static
477
478
char *streallocat( char *psz_string, char *psz_to_append )
478
479
{
479
480
    size_t i_new_string_length = strlen( psz_string ) +
480
481
        strlen( psz_to_append ) + 1;
481
482
 
482
483
    psz_string = (char *) realloc( psz_string, i_new_string_length );
483
 
    
 
484
 
484
485
    return strcat( psz_string, psz_to_append );
485
486
}
486
487