Changeset c974b7b07fa8b6857c5f3beeddab149b27dde830

Show
Ignore:
Timestamp:
07/12/02 23:57:25 (6 years ago)
Author:
Christophe Massiot <massiot@videolan.org>
git-committer:
Christophe Massiot <massiot@videolan.org> 1026511045 +0000
git-parent:

[1f95f0338d27a13ad3a01642e4829f5c6c113c48]

git-author:
Christophe Massiot <massiot@videolan.org> 1026511045 +0000
Message:

* ./AUTHORS : added lool :-p ;
* ./doc/vlc-howto.sgml : Fixed typos ;
* ./include/vlc_common.h : Greatly simplified ntoh*, and U??_AT macros are

now alignment-safe ;

* ./STATUS : New file indicating who's working on what. Please keep it

up-to-date ;

* ./MAINTAINERS : New file indicating who has knowledge on which parts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AUTHORS

    r1f95f03 rc974b7b  
    2424D: norwegian translation 
    2525D: aalib plugin 
     26D: KDE plug-in 
    2627S: Norway 
    2728 
     
    314315S: France 
    315316 
     317N: Lo�Minier 
     318E: lool@via.ecp.fr 
     319C: lool 
     320D: Gtk/gnome enhancements 
     321D: xosd interface plug-in 
     322S: France 
     323 
    316324N: Benjamin Mironer 
    317325E: bmironer@noos.fr 
  • doc/vlc-howto.sgml

    rd2ff612 rc974b7b  
    117117    <item> Linux (all distributions, including iPAQ Familiar Linux) 
    118118    <item> Windows (all 32bit versions) 
    119     <item> Mas OS X 
     119    <item> Mac OS X 
    120120    <item> FreeBSD, NetBSD, OpenBSD, BSD/OS 
    121121    <item> BeOS 
     
    125125   </p> 
    126126   <p> 
    127     Please note that the Linux, Windows and MacOS X are generally the most 
    128     up-to-date versions. 
     127    Please note that the Linux, Windows and MacOS X versions are generally the most 
     128    up-to-date ones. 
    129129  </p> 
    130130   </sect2> 
  • include/video_output.h

    rcecb7e8 rc974b7b  
    66 ***************************************************************************** 
    77 * Copyright (C) 1999, 2000 VideoLAN 
    8  * $Id: video_output.h,v 1.79 2002/06/11 09:44:21 gbazin Exp $ 
     8 * $Id: video_output.h,v 1.80 2002/07/12 21:57:25 massiot Exp $ 
    99 * 
    1010 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     11 *          Samuel Hocevar <sam@via.ecp.fr> 
    1112 * 
    1213 * This program is free software; you can redistribute it and/or modify 
  • include/vlc_common.h

    rdd4f253 rc974b7b  
    44 ***************************************************************************** 
    55 * Copyright (C) 1998, 1999, 2000 VideoLAN 
    6  * $Id: vlc_common.h,v 1.8 2002/07/05 11:18:56 sam Exp $ 
     6 * $Id: vlc_common.h,v 1.9 2002/07/12 21:57:25 massiot Exp $ 
    77 * 
    88 * Authors: Samuel Hocevar <sam@via.ecp.fr> 
     
    259259#   include <sys/param.h> 
    260260 
    261 #elif defined(WIN32) 
    262 /* Swap bytes in 16 bit value.  */ 
    263 #   define __bswap_constant_16(x) \ 
    264      ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) 
    265  
    266 #   if defined __GNUC__ && __GNUC__ >= 2 
    267 #       define __bswap_16(x) \ 
    268             (__extension__                                                    \ 
    269              ({ register unsigned short int __v;                              \ 
    270                 if (__builtin_constant_p (x))                                 \ 
    271                   __v = __bswap_constant_16 (x);                              \ 
    272                 else                                                          \ 
    273                   __asm__ __volatile__ ("rorw $8, %w0"                        \ 
    274                                         : "=r" (__v)                          \ 
    275                                         : "0" ((unsigned short int) (x))      \ 
    276                                         : "cc");                              \ 
    277                 __v; })) 
    278 #   else 
    279 /* This is better than nothing.  */ 
    280 #       define __bswap_16(x) __bswap_constant_16 (x) 
    281 #   endif 
    282  
    283 /* Swap bytes in 32 bit value.  */ 
    284 #   define __bswap_constant_32(x) \ 
    285         ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |            \ 
    286          (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24)) 
    287  
    288 #   if defined __GNUC__ && __GNUC__ >= 2 
    289 /* To swap the bytes in a word the i486 processors and up provide the 
    290    `bswap' opcode.  On i386 we have to use three instructions.  */ 
    291 #       if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ 
    292 #           define __bswap_32(x) \ 
    293                 (__extension__                                                \ 
    294                  ({ register unsigned int __v;                                \ 
    295                     if (__builtin_constant_p (x))                             \ 
    296                       __v = __bswap_constant_32 (x);                          \ 
    297                     else                                                      \ 
    298                       __asm__ __volatile__ ("rorw $8, %w0;"                   \ 
    299                                             "rorl $16, %0;"                   \ 
    300                                             "rorw $8, %w0"                    \ 
    301                                             : "=r" (__v)                      \ 
    302                                             : "0" ((unsigned int) (x))        \ 
    303                                             : "cc");                          \ 
    304                     __v; })) 
    305 #       else 
    306 #           define __bswap_32(x) \ 
    307                 (__extension__                                                \ 
    308                  ({ register unsigned int __v;                                \ 
    309                     if (__builtin_constant_p (x))                             \ 
    310                       __v = __bswap_constant_32 (x);                          \ 
    311                     else                                                      \ 
    312                       __asm__ __volatile__ ("bswap %0"                        \ 
    313                                             : "=r" (__v)                      \ 
    314                                             : "0" ((unsigned int) (x)));      \ 
    315                     __v; })) 
    316 #       endif 
    317 #   else 
    318 #       define __bswap_32(x) __bswap_constant_32 (x) 
    319 #   endif 
    320  
    321 #   if defined __GNUC__ && __GNUC__ >= 2 
    322 /* Swap bytes in 64 bit value.  */ 
    323 #       define __bswap_constant_64(x) \ 
    324             ((((x) & 0xff00000000000000ull) >> 56)                            \ 
    325              | (((x) & 0x00ff000000000000ull) >> 40)                          \ 
    326              | (((x) & 0x0000ff0000000000ull) >> 24)                          \ 
    327              | (((x) & 0x000000ff00000000ull) >> 8)                           \ 
    328              | (((x) & 0x00000000ff000000ull) << 8)                           \ 
    329              | (((x) & 0x0000000000ff0000ull) << 24)                          \ 
    330              | (((x) & 0x000000000000ff00ull) << 40)                          \ 
    331              | (((x) & 0x00000000000000ffull) << 56)) 
    332  
    333 #       define __bswap_64(x) \ 
    334             (__extension__                                                    \ 
    335              ({ union { __extension__ unsigned long long int __ll;            \ 
    336                         unsigned long int __l[2]; } __w, __r;                 \ 
    337                 if (__builtin_constant_p (x))                                 \ 
    338                   __r.__ll = __bswap_constant_64 (x);                         \ 
    339                 else                                                          \ 
    340                   {                                                           \ 
    341                     __w.__ll = (x);                                           \ 
    342                     __r.__l[0] = __bswap_32 (__w.__l[1]);                     \ 
    343                     __r.__l[1] = __bswap_32 (__w.__l[0]);                     \ 
    344                   }                                                           \ 
    345                 __r.__ll; })) 
    346 #   else 
    347 #       define __bswap_64(i) \ 
    348             (u64)((__bswap_32((i) & 0xffffffff) << 32) |                      \ 
    349             __bswap_32(((i) >> 32) & 0xffffffff )) 
    350 #   endif 
    351  
    352 #else /* NTOHL_IN_SYS_PARAM_H || WIN32 */ 
     261#elif !defined(WIN32) /* NTOHL_IN_SYS_PARAM_H || WIN32 */ 
    353262#   include <netinet/in.h> 
    354263 
     
    372281 * MSB, and should be used for both network communications and files. Note that 
    373282 * byte orders other than little and big endians are not supported, but only 
    374  * the VAX seems to have such exotic properties - note that these 'functions' 
    375  * needs <netinet/in.h> or the local equivalent. */ 
    376 #if !defined( WIN32 ) 
     283 * the VAX seems to have such exotic properties. */ 
     284static inline u16 U16_AT( void * _p ) 
     285
     286    u8 * p = (u8 *)_p; 
     287    return ( ((u16)p[0] << 8) | p[1] ); 
     288
     289static inline u32 U32_AT( void * _p ) 
     290
     291    u8 * p = (u8 *)_p; 
     292    return ( ((u32)p[0] << 24) | ((u32)p[1] << 16) | ((u32)p[2] << 8) | p[3] ); 
     293
     294static inline u64 U64_AT( void * _p ) 
     295
     296    u8 * p = (u8 *)_p; 
     297    return ( ((u64)p[0] << 56) | ((u64)p[1] << 48) | ((u64)p[2] << 40)  
     298              | ((u64)p[3] << 32) | ((u64)p[4] << 24) | ((u64)p[5] << 16) 
     299              | ((u64)p[6] << 8) | p[7] ); 
     300
    377301#if WORDS_BIGENDIAN 
    378 #   define hton16      htons 
    379 #   define hton32      htonl 
     302#   define hton16(i)   ( i ) 
     303#   define hton32(i)   ( i ) 
    380304#   define hton64(i)   ( i ) 
    381 #   define ntoh16      ntohs 
    382 #   define ntoh32      ntohl 
     305#   define ntoh16(i)   ( i ) 
     306#   define ntoh32(i)   ( i ) 
    383307#   define ntoh64(i)   ( i ) 
    384308#else 
    385 #   define hton16      htons 
    386 #   define hton32      htonl 
    387     static inline u64 __hton64( u64 i ) 
    388     { 
    389         return ((u64)(htonl((i) & 0xffffffff)) << 32) 
    390                 | htonl(((i) >> 32) & 0xffffffff ); 
    391     } 
    392 #   define hton64(i)   __hton64( i ) 
    393 #   define ntoh16      ntohs 
    394 #   define ntoh32      ntohl 
    395 #   define ntoh64      hton64 
    396 #endif 
    397 #endif /* !defined( WIN32 ) */ 
    398  
    399 /* Macros with automatic casts */ 
    400 #define U64_AT(p)   ( ntoh64 ( *( (u64 *)(p) ) ) ) 
    401 #define U32_AT(p)   ( ntoh32 ( *( (u32 *)(p) ) ) ) 
    402 #define U16_AT(p)   ( ntoh16 ( *( (u16 *)(p) ) ) ) 
     309#   define hton16(i)   U16_AT(&i) 
     310#   define hton32(i)   U32_AT(&i) 
     311#   define hton64(i)   U64_AT(&i) 
     312#   define ntoh16(i)   U16_AT(&i) 
     313#   define ntoh32(i)   U32_AT(&i) 
     314#   define ntoh64(i)   U64_AT(&i) 
     315#endif 
    403316 
    404317/* Alignment of critical static data structures */ 
     
    445358#define I64C(x)         x##LL 
    446359 
    447  
    448 #if defined( WIN32 ) 
    449 /* The ntoh* and hton* bytes swapping functions are provided by winsock 
    450  * but for conveniency and speed reasons it is better to implement them 
    451  * ourselves. ( several plugins use them and it is too much hassle to link 
    452  * winsock with each of them ;-) 
    453  */ 
    454 #   ifdef WORDS_BIGENDIAN 
    455 #       define ntoh32(x)       (x) 
    456 #       define ntoh16(x)       (x) 
    457 #       define ntoh64(x)       (x) 
    458 #       define hton32(x)       (x) 
    459 #       define hton16(x)       (x) 
    460 #       define hton64(x)       (x) 
    461 #   else 
    462 #       define ntoh32(x)     __bswap_32 (x) 
    463 #       define ntoh16(x)     __bswap_16 (x) 
    464 #       define ntoh64(x)     __bswap_32 (x) 
    465 #       define hton32(x)     __bswap_32 (x) 
    466 #       define hton16(x)     __bswap_16 (x) 
    467 #       define hton64(x)     __bswap_64 (x) 
    468 #   endif 
    469  
     360#ifdef WIN32 
    470361/* win32, cl and icl support */ 
    471362#   if defined( _MSC_VER ) || !defined( __MINGW32__ ) 
  • src/misc/mtime.c

    r9e3ab28 rc974b7b  
    44 ***************************************************************************** 
    55 * Copyright (C) 1998-2001 VideoLAN 
    6  * $Id: mtime.c,v 1.32 2002/06/01 12:32:01 sam Exp $ 
     6 * $Id: mtime.c,v 1.33 2002/07/12 21:57:25 massiot Exp $ 
    77 * 
    88 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    8484 
    8585/***************************************************************************** 
    86  * mdate: return high precision date (inline function) 
     86 * mdate: return high precision date 
    8787 ***************************************************************************** 
    8888 * Uses the gettimeofday() function when possible (1 MHz resolution) or the 
     
    123123 
    124124/***************************************************************************** 
    125  * mwait: wait for a date (inline function) 
     125 * mwait: wait for a date 
    126126 ***************************************************************************** 
    127127 * This function uses select() and an system date function to wake up at a 
     
    202202 
    203203/***************************************************************************** 
    204  * msleep: more precise sleep() (inline function)                        (ok ?) 
     204 * msleep: more precise sleep() 
    205205 ***************************************************************************** 
    206206 * Portable usleep() function.