Changeset 2e7e22467bd0ba3d9ef6cb2211fab3133ae40486

Show
Ignore:
Timestamp:
17/03/08 19:04:45 (9 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1205777085 +0200
git-parent:

[709f415cdf024f565f16df51d1c0378356f23070]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1205777085 +0200
Message:

Use native C/C++ boolean type

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc/vlc.h

    r7f42e05 r2e7e224  
    3939# ifdef __cplusplus 
    4040extern "C" { 
     41# else 
     42#  include <stdbool.h> 
    4143# endif 
    4244 
     
    4446 * Our custom types 
    4547 *****************************************************************************/ 
    46 typedef int vlc_bool_t; 
     48typedef bool vlc_bool_t; 
    4749typedef struct vlc_list_t vlc_list_t; 
    4850typedef struct vlc_object_t vlc_object_t; 
     
    132134 * Booleans 
    133135 *****************************************************************************/ 
    134 #define VLC_FALSE 0 
    135 #define VLC_TRUE  1 
     136#define VLC_FALSE false 
     137#define VLC_TRUE  true 
    136138 
    137139/***************************************************************************** 
  • modules/access/bda/bda.c

    r54faac8 r2e7e224  
    526526    case ACCESS_SET_PRIVATE_ID_STATE: /* 11 */ 
    527527        i_int  = (int)va_arg( args, int ); 
    528         b_bool = (vlc_bool_t)va_arg( args, vlc_bool_t ); 
     528        b_bool = (bool)va_arg( args, int ); 
    529529        break; 
    530530    case ACCESS_SET_PRIVATE_ID_CA:  /* 12 -From Demux */ 
  • modules/access/dvb/access.c

    r99fab90 r2e7e224  
    552552        case ACCESS_SET_PRIVATE_ID_STATE: 
    553553            i_int  = (int)va_arg( args, int );               /* Private data (pid for now)*/ 
    554             b_bool = (vlc_bool_t)va_arg( args, vlc_bool_t ); /* b_selected */ 
     554            b_bool = (bool)va_arg( args, int ); /* b_selected */ 
    555555            if( !p_sys->b_budget_mode ) 
    556556            { 
  • modules/access/fake.c

    r99fab90 r2e7e224  
    154154 
    155155        case DEMUX_SET_PAUSE_STATE: 
    156             b = (vlc_bool_t)va_arg( args, vlc_bool_t ); 
     156            b = (bool)va_arg( args, int ); 
    157157            if ( b ) 
    158158            { 
  • modules/demux/live555.cpp

    r54c23b6 r2e7e224  
    13751375            int i; 
    13761376 
    1377             b_bool = (vlc_bool_t)va_arg( args, vlc_bool_t ); 
     1377            b_bool = (bool)va_arg( args, int ); 
    13781378            if( p_sys->rtsp == NULL ) 
    13791379                return VLC_EGENERIC; 
  • modules/gui/macosx/voutgl.m

    r1894d87 r2e7e224  
    272272    { 
    273273        case VOUT_SET_STAY_ON_TOP: 
    274             b_arg = va_arg( args, vlc_bool_t ); 
     274            b_arg = (bool) va_arg( args, int ); 
    275275            [p_vout->p_sys->o_vout_view setOnTop: b_arg]; 
    276276            return VLC_SUCCESS; 
  • modules/gui/macosx/voutqt.m

    r2c75bfc r2e7e224  
    460460    { 
    461461        case VOUT_SET_STAY_ON_TOP: 
    462             b_arg = va_arg( args, vlc_bool_t ); 
     462            b_arg = (bool) va_arg( args, int ); 
    463463            [p_vout->p_sys->o_vout_view setOnTop: b_arg]; 
    464464            return VLC_SUCCESS; 
  • modules/gui/minimal_macosx/VLCOpenGLVoutView.m

    r6ee1e19 r2e7e224  
    148148    { 
    149149        case VOUT_SET_STAY_ON_TOP: 
    150             b_arg = va_arg( args, vlc_bool_t ); 
     150            b_arg = (bool) va_arg( args, int ); 
    151151            [[p_vout->p_sys->o_glview container] setOnTop: b_arg]; 
    152152            return VLC_SUCCESS; 
  • modules/video_output/msw/events.c

    r0f00164 r2e7e224  
    11301130#ifdef MODULE_NAME_IS_wingapi 
    11311131    case VOUT_SET_FOCUS: 
    1132         b_bool = va_arg( args, vlc_bool_t ); 
     1132        b_bool = (bool) va_arg( args, int ); 
    11331133        p_vout->p_sys->b_parent_focus = b_bool; 
    11341134        if( b_bool ) GXResume(); 
  • modules/video_output/x11/xcommon.c

    r0f00164 r2e7e224  
    31403140                    (void *)p_vout->p_sys->p_win->owner_window, i_query, args); 
    31413141 
    3142             b_arg = va_arg( args, vlc_bool_t ); 
     3142            b_arg = (bool) va_arg( args, int ); 
    31433143            vlc_mutex_lock( &p_vout->p_sys->lock ); 
    31443144#ifdef MODULE_NAME_IS_xvmc 
  • src/input/es_out.c

    rdfc2996 r2e7e224  
    15631563        case ES_OUT_SET_ES_STATE: 
    15641564            es = (es_out_id_t*) va_arg( args, es_out_id_t * ); 
    1565             b = (vlc_bool_t) va_arg( args, vlc_bool_t ); 
     1565            b = (bool) va_arg( args, int ); 
    15661566            if( b && !EsIsSelected( es ) ) 
    15671567            { 
     
    15851585        case ES_OUT_SET_ACTIVE: 
    15861586        { 
    1587             b = (vlc_bool_t) va_arg( args, vlc_bool_t ); 
     1587            b = (bool) va_arg( args, int ); 
    15881588            p_sys->b_active = b; 
    15891589            /* Needed ? */