]> git.sesse.net Git - vlc/commitdiff
Merge branch 1.0-bugfix
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 10 May 2009 15:40:42 +0000 (18:40 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 10 May 2009 15:40:51 +0000 (18:40 +0300)
extras/package/macosx/.gitignore
extras/package/macosx/Resources/English.lproj/.gitignore [new file with mode: 0644]
extras/package/macosx/plugin/.gitignore [new file with mode: 0644]
modules/control/http/http.c
modules/control/http/util.c
modules/gui/pda/pda.c
modules/gui/pda/pda_support.h
test/.gitignore [new file with mode: 0644]

index 12dbd38c7d8c43ffb1d5d64653f5503d0a26c078..b043baced84127060c2e21c0671953812840015f 100644 (file)
@@ -1,4 +1,5 @@
 !Delete_Preferences.app
 *.mode*
 *.pbxuser
-build
\ No newline at end of file
+build
+Info.plist
diff --git a/extras/package/macosx/Resources/English.lproj/.gitignore b/extras/package/macosx/Resources/English.lproj/.gitignore
new file mode 100644 (file)
index 0000000..1fe6983
--- /dev/null
@@ -0,0 +1 @@
+InfoPlist.strings
diff --git a/extras/package/macosx/plugin/.gitignore b/extras/package/macosx/plugin/.gitignore
new file mode 100644 (file)
index 0000000..6fb72e6
--- /dev/null
@@ -0,0 +1 @@
+InstallerInfo.plist
index 5bce03bfcb9cdef1f7bd6ef0112e254e92d4197a..75f24c2af4c1a22239a57f6ff1d067f1005e0bd5 100644 (file)
@@ -555,18 +555,11 @@ int  HandlerCallback( httpd_handler_sys_t *p_args,
     int i_env = 0;
     char **ppsz_env = NULL;
     char *psz_tmp;
-    char sep;
     size_t i_buffer;
     char *p_buffer;
     char *psz_cwd, *psz_file = NULL;
     int i_ret;
 
-#ifdef WIN32
-    sep = '\\';
-#else
-    sep = '/';
-#endif
-
     /* Create environment for the CGI */
     TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") );
     TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") );
@@ -677,7 +670,7 @@ int  HandlerCallback( httpd_handler_sys_t *p_args,
         }
     }
 
-    psz_file = strrchr( p_args->file.file, sep );
+    psz_file = strrchr( p_args->file.file, DIR_SEP_CHAR );
     if( psz_file != NULL )
     {
         psz_file++;
@@ -694,7 +687,7 @@ int  HandlerCallback( httpd_handler_sys_t *p_args,
                 NULL );
 
     psz_tmp = strdup( p_args->file.file );
-    p = strrchr( psz_tmp, sep );
+    p = strrchr( psz_tmp, DIR_SEP_CHAR );
     if( p != NULL )
     {
         *p = '\0';
index a8b7861b152ea667656f4339d4ef24160f7887ff..69de4a65aaca76bdd93c52eccb70bc9f376e534a 100644 (file)
@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
 
     int           i_dirlen;
 
-    char sep;
-
-#if defined( WIN32 )
-    sep = '\\';
-#else
-    sep = '/';
-#endif
-
     if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL )
     {
         if( errno != ENOENT && errno != ENOTDIR )
@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
 
     msg_Dbg( p_intf, "dir=%s", psz_dir );
 
-    snprintf( dir, sizeof( dir ), "%s%c.access", psz_dir, sep );
+    snprintf( dir, sizeof( dir ), "%s"DIR_SEP".access", psz_dir );
     if( ( file = utf8_fopen( dir, "r" ) ) != NULL )
     {
         char line[1024];
@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
         fclose( file );
     }
 
-    snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep );
+    snprintf( dir, sizeof( dir ), "%s"DIR_SEP".hosts", psz_dir );
     p_acl = ACL_Create( p_intf, false );
     if( ACL_LoadFile( p_acl, dir ) )
     {
@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
             continue;
         }
 
-        snprintf( dir, sizeof( dir ), "%s%c%s", psz_dir, sep, psz_filename );
+        snprintf( dir, sizeof( dir ), "%s"DIR_SEP"%s", psz_dir, psz_filename );
         free( psz_filename );
 
         if( ParseDirectory( p_intf, psz_root, dir ) )
@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src )
     char *psz_dir;
     char *p;
     int i_len = strlen(psz_src);
-    const char sep = DIR_SEP_CHAR;
 
     psz_dir = malloc( i_len + 2 );
     strcpy( psz_dir, psz_src );
 
     /* Add a trailing sep to ease the .. step */
-    psz_dir[i_len] = sep;
+    psz_dir[i_len] = DIR_SEP_CHAR;
     psz_dir[i_len + 1] = '\0';
 
 #if (DIR_SEP_CHAR != '/')
@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src )
     p = psz_dir;
     while( (p = strchr( p, '/' )) != NULL )
     {
-        *p = sep;
+        *p = DIR_SEP_CHAR;
     }
 #endif
 
     /* FIXME: this could be O(N) rather than O(N²)... */
     /* Remove multiple separators and /./ */
     p = psz_dir;
-    while( (p = strchr( p, sep )) != NULL )
+    while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
     {
-        if( p[1] == sep )
+        if( p[1] == DIR_SEP_CHAR )
             memmove( &p[1], &p[2], strlen(&p[2]) + 1 );
-        else if( p[1] == '.' && p[2] == sep )
+        else if( p[1] == '.' && p[2] == DIR_SEP_CHAR )
             memmove( &p[1], &p[3], strlen(&p[3]) + 1 );
         else
             p++;
@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src )
     {
         /* Fix all .. dir */
         p = psz_dir + 3;
-        while( (p = strchr( p, sep )) != NULL )
+        while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
         {
-            if( p[-1] == '.' && p[-2] == '.' && p[-3] == sep )
+            if( p[-1] == '.' && p[-2] == '.' && p[-3] == DIR_SEP_CHAR )
             {
                 char *q;
                 p[-3] = '\0';
-                if( (q = strrchr( psz_dir, sep )) != NULL )
+                if( (q = strrchr( psz_dir, DIR_SEP_CHAR )) != NULL )
                 {
                     memmove( q + 1, p + 1, strlen(p + 1) + 1 );
                     p = q + 1;
@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src )
 
     /* Remove trailing sep if there are at least 2 sep in the string
      * (handles the C:\ stuff) */
-    p = strrchr( psz_dir, sep );
-    if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, sep ) )
+    p = strrchr( psz_dir, DIR_SEP_CHAR );
+    if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, DIR_SEP_CHAR ) )
         *p = '\0';
 
     return psz_dir;
index 6b7bb03fed6dd51af02175135bcfb609b8dad744..2b74125970b4cfd0019d2b28bc1e1fe33a3f4d61 100644 (file)
@@ -51,7 +51,6 @@ static int  Open         ( vlc_object_t * );
 static void Close        ( vlc_object_t * );
 static void Run          ( intf_thread_t * );
 
-void GtkAutoPlayFile     ( vlc_object_t * );
 static int Manage        ( intf_thread_t *p_intf );
 void GtkDisplayDate  ( GtkAdjustment *p_adj, gpointer userdata );
 gint GtkModeManage   ( intf_thread_t * p_intf );
@@ -70,7 +69,6 @@ vlc_module_begin ()
     set_description( N_("PDA Linux Gtk2+ interface") )
     set_category( CAT_INTERFACE )
     set_subcategory( SUBCAT_INTERFACE_MAIN )
-//    add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, true )
     set_capability( "interface", 0 )
     set_callbacks( Open, Close )
     add_shortcut( "pda" )
@@ -349,43 +347,6 @@ static void Run( intf_thread_t *p_intf )
     vlc_restorecancel(canc);
 }
 
-/*****************************************************************************
- * GtkAutoplayFile: Autoplay file depending on configuration settings
- *****************************************************************************/
-void GtkAutoPlayFile( vlc_object_t *p_this )
-{
-    GtkWidget *cbautoplay;
-    intf_thread_t *p_intf;
-    int i_index;
-    vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
-                                        FIND_ANYWHERE );
-
-    for( i_index = 0; i_index < p_list->i_count; i_index++ )
-    {
-        p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
-
-        if( strcmp( MODULE_STRING, module_get_object(p_intf->p_module) ) )
-        {
-            continue;
-        }
-        cbautoplay = GTK_WIDGET( gtk_object_get_data(
-                            GTK_OBJECT( p_intf->p_sys->p_window ),
-                            "cbautoplay" ) );
-
-        if( !config_GetInt( p_this, "pda-autoplayfile" ) )
-        {
-            p_intf->p_sys->b_autoplayfile = false;
-        }
-        else
-        {
-            p_intf->p_sys->b_autoplayfile = true;
-        }
-        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( cbautoplay ),
-                                      p_intf->p_sys->b_autoplayfile );
-    }
-    vlc_list_release( p_list );
-}
-
 /* following functions are local */
 
 /*****************************************************************************
@@ -415,7 +376,6 @@ static int Manage( intf_thread_t *p_intf )
         input_thread_t *p_input = p_intf->p_sys->p_input;
         int64_t i_time = 0, i_length = 0;
 
-        vlc_object_lock( p_input );
         if( vlc_object_alive (p_input) )
         {
             playlist_t *p_playlist;
@@ -466,9 +426,7 @@ static int Manage( intf_thread_t *p_intf )
                         double f_pos = (double)newvalue / 100.0;
 
                         /* release the lock to be able to seek */
-                        vlc_object_unlock( p_input );
                         var_SetFloat( p_input, "position", f_pos );
-                        vlc_object_lock( p_input );
 
                         /* Update the old value */
                         p_intf->p_sys->f_adj_oldvalue = newvalue;
@@ -500,9 +458,7 @@ static int Manage( intf_thread_t *p_intf )
                         double f_pos = (double)newvalue / 100.0;
 
                         /* release the lock to be able to seek */
-                        vlc_object_unlock( p_input );
                         var_SetFloat( p_input, "position", f_pos );
-                        vlc_object_lock( p_input );
 
                         /* Update the old value */
                         p_intf->p_sys->i_adj_oldvalue = newvalue;
@@ -510,7 +466,6 @@ static int Manage( intf_thread_t *p_intf )
                 }
             }
         }
-        vlc_object_unlock( p_input );
     }
     else if( p_intf->p_sys->b_playing && vlc_object_alive( p_intf ) )
     {
index d2f2a238d7fd186dcb4069ce441ed6cf087fea54..7d6c76ffaf86b6a68d3be40485e20c18c815441e 100644 (file)
 #  include <libintl.h>
 #  undef _
 #  define _(String) dgettext (PACKAGE, String)
-#  ifdef gettext_noop
-#    define N_(String) gettext_noop (String)
-#  else
-#    define N_(String) (String)
-#  endif
-#else
-#  define textdomain(String) (String)
-#  define gettext(String) (String)
-#  define dgettext(Domain,Message) (Message)
-#  define dcgettext(Domain,Message,Type) (Message)
-#  define bindtextdomain(Domain,Directory) (Domain)
-#  define _(String) (String)
-#  define N_(String) (String)
 #endif
 
 
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644 (file)
index 0000000..89bcd63
--- /dev/null
@@ -0,0 +1,5 @@
+test_libvlc_core
+test_libvlc_events
+test_libvlc_media_list
+test_libvlc_media_list_player
+