]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_text.c
* configure.ac.in, modules/codec/ffmpeg/*: a few direct rendering fixes and got rid...
[vlc] / src / video_output / video_text.c
index 712b759115d4bea4d87455b26f806f47b66a78f9..62315fed472b2720f26284b5b24cf9ef79ab1607 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_text.c,v 1.38 2002/11/10 18:04:24 sam Exp $
+ * $Id: video_text.c,v 1.42 2003/01/19 03:16:24 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -22,6 +22,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+/* XXX: unused */
+#if 0
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
@@ -220,7 +222,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
     char **             ppsz_path = path;
     char *              psz_file;
 #if defined( SYS_BEOS ) || defined( SYS_DARWIN )
-    char *              psz_vlcpath = system_GetProgramPath();
+    char *              psz_vlcpath = p_this->p_libvlc->psz_vlcpath;
     int                 i_vlclen = strlen( psz_vlcpath );
 #endif
     int                 i_char, i_line;        /* character and line indexes */
@@ -277,19 +279,23 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
     }
 
     /* Read magic number */
+#ifndef UNDER_CE /* FIXME */
     if( read( i_file, pi_buffer, 2 ) != 2 )
     {
         msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
         close( i_file );
         return( NULL );
     }
+#endif
 
     /* Allocate font descriptor */
     p_font = malloc( sizeof( vout_font_t ) );
     if( p_font == NULL )
     {
         msg_Err( p_vout, "out of memory" );
+#ifndef UNDER_CE /* FIXME */
         close( i_file );
+#endif
         return( NULL );
     }
 
@@ -303,6 +309,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
          */
 
         /* Read font header - two bytes indicate the font properties */
+#ifndef UNDER_CE /* FIXME */
         if( read( i_file, pi_buffer, 2 ) != 2)
         {
             msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
@@ -310,6 +317,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
             close( i_file );
             return( NULL );
         }
+#endif
 
         /* Copy font properties */
         p_font->i_type =                VOUT_FIXED_FONT;
@@ -327,11 +335,14 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
         {
             msg_Err( p_vout, "out of memory" );
             free( p_font );
+#ifndef UNDER_CE /* FIXME */
             close( i_file );
+#endif
             return( NULL );
         }
 
         /* Copy raw data */
+#ifndef UNDER_CE /* FIXME */
         if( read( i_file, p_font->p_data, 256 * pi_buffer[1] ) != 256 * pi_buffer[1] )
         {
             msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
@@ -340,6 +351,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
             close( i_file );
             return( NULL );
         }
+#endif
 
         /* Compute border masks - remember that masks have the same matrix as
          * characters, so an empty character border is required to have a
@@ -362,7 +374,9 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
     default:
         msg_Err( p_vout, "file '%s' has an unknown format", psz_name );
         free( p_font );
+#ifndef UNDER_CE /* FIXME */
         close( i_file );
+#endif
         return( NULL );
         break;
     }
@@ -428,13 +442,13 @@ void vout_TextSize( vout_font_t *p_font, int i_style, const char *psz_text, int
 void vout_Print( vout_font_t *p_font, byte_t *p_pic, int i_bytes_per_pixel, int i_bytes_per_line,
                  u32 i_char_color, u32 i_border_color, u32 i_bg_color, int i_style, const char *psz_text, int i_percent)
 {
-    byte_t      *p_char, *p_border;        /* character and border mask data */
-    int         i_char_mask, i_border_mask, i_bg_mask;              /* masks */
-    int         i_line;                         /* current line in character */
-    int         i_byte;                         /* current byte in character */
-    int         i_interspacing;                  /* offset between two chars */
-    int         i_font_bytes_per_line, i_font_height;     /* font properties */
-    int         i_position, i_end;                      /* current position  */
+    byte_t       *p_char, *p_border;       /* character and border mask data */
+    int          i_char_mask, i_border_mask, i_bg_mask;             /* masks */
+    int          i_line;                        /* current line in character */
+    int          i_byte;                        /* current byte in character */
+    int          i_interspacing;                 /* offset between two chars */
+    int          i_font_bytes_per_line, i_font_height;    /* font properties */
+    unsigned int i_position, i_end;                     /* current position  */
     vout_put_byte_t *p_PutByte;                          /* PutByte function */
 
     /* If no font was loaded, do nothing */
@@ -591,4 +605,4 @@ static void PutByte32( u32 *p_pic, int i_byte, byte_t i_char, byte_t i_border, b
     PUT_BYTE_MASK(i_border, i_border_color);
     PUT_BYTE_MASK(i_bg, i_bg_color);
 }
-
+#endif