8AB8=3  3 3 . 7 .   ;NG52>9  D@03<5=B  D09;0  l o g o _ 2 _ 4 . c ,   <5=ONI53>  ;>3>B8?  L i n u x 
 
 / * 
 
   *     E x t r a c t   a l l   L i n u x   l o g o s   f r o m   t h e   L i n u x   k e r n e l   s o u r c e s   ( 2 . 4 . x   v e r s i o n ) 
 
 *     ( C )   C o p y r i g h t   2 0 0 0 - 2 0 0 1   b y   G e e r t   U y t t e r h o e v e n   < g e e r t @ l i n u x - m 6 8 k . o r g > 
 
 *     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 *     T h i s   f i l e   i s   s u b j e c t   t o   t h e   t e r m s   a n d   c o n d i t i o n s   o f   t h e   G N U   G e n e r a l   P u b l i c 
 
   *     L i c e n s e .   S e e   t h e   f i l e   C O P Y I N G   i n   t h e   m a i n   d i r e c t o r y   o f   t h e   L i n u x 
 
   *     d i s t r i b u t i o n   f o r   m o r e   d e t a i l s . 
 
 *     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 * / 
 
 s t a t i c   v o i d   w r i t e _ l o g o ( c o n s t   c h a r   * f i l e n a m e ,   c o n s t   u n s i g n e d   c h a r   * d a t a , 
 
 	 	 	 c o n s t   u n s i g n e d   c h a r   * r e d ,   c o n s t   u n s i g n e d   c h a r   * g r e e n , 
 
 	 	 	 c o n s t   u n s i g n e d   c h a r   * b l u e ) 
 
 { 	 	 	 
 
 	 F I L E   * s t r e a m ;   i n t   i ,   j ,   d ; 
 
 	 	 	 
 
 	 s t r e a m   =   f o p e n ( f i l e n a m e ,   " w " ) ; 
 
 	 i f   ( ! s t r e a m )   {   p e r r o r ( " f i l e   o p e n   e r r o r :   " ) ; e x i t ( 1 ) ; } 
 
 	 f p u t s ( " P 3 \ n 8 0   8 0 \ n 2 5 5 \ n " ,   s t r e a m ) ; 
 
 	 f o r   ( i   =   0 ;   i   <   8 0 * 8 0 ;   i   + =   4 
 
 	 { 	 	 
 
 	 	 f o r   ( j   =   0 ;   j   <   4 ;   j + + ) 
 
 	 	 { 	 
 
 	 	 	 d   =   d a t a [ i + j ] - 3 2 ; 
 
 	 	 	 f p r i n t f ( s t r e a m ,   "   % 3 d   % 3 d   % 3 d " ,   r e d [ d ] ,   g r e e n [ d ] ,   b l u e [ d ] ) ; 
 
 	 	 }   f p u t c ( ' \ n ' ,   s t r e a m ) ; 
 
 	 }   f c l o s e ( s t r e a m ) ; 
 
 } 	 	 	 
 
 	 	 	 
 
 s t a t i c   v o i d   w r i t e _ l o g o _ b w ( c o n s t   c h a r   * f i l e n a m e ,   c o n s t   u n s i g n e d   c h a r   * d a t a ) 
 
 { 	 	 	 
 
 	 F I L E   * s t r e a m ;   i n t   i ,   j ,   d ; 
 
 	 s t r e a m   =   f o p e n ( f i l e n a m e ,   " w " ) ; 
 
 	 i f   ( ! s t r e a m )   { p e r r o r ( " f i l e   o p e n   e r r o r :   " ) ; e x i t ( 1 ) ; 
 
 	 	 	 
 
 	 f p u t s ( " P 1 \ n 8 0   8 0 \ n " ,   s t r e a m ) ; 
 
 	 f o r   ( i   =   0 ;   i   <   8 0 * 8 0 / 8 ;   i   + =   4 ) 
 
 	 { 	 	 
 
 	 	 f o r   ( j   =   0 ;   j   <   4 ;   j + + ) 
 
 	 	 { 	 
 
 	 	 	 d   =   d a t a [ i + j ] ; 
 
 	 	 	 f p r i n t f ( s t r e a m ,   "   % 1 d   % 1 d   % 1 d   % 1 d   % 1 d   % 1 d   % 1 d   % 1 d " , 
 
 	 	 	 ( d   > >   7 )   &   1 ,   ( d   > >   6 )   &   1 ,   ( d   > >   5 )   &   1 ,   ( d   > >   4 )   &   1 , 
 
 	 	 	 ( d   > >   3 )   &   1 ,   ( d   > >   2 )   &   1 ,   ( d   > >   1 )   &   1 ,   d   &   1 ) ; 
 
 	 	 }   f p u t c ( ' \ n ' ,   s t r e a m ) ; 
 
 	 }   f c l o s e ( s t r e a m ) ; 
 
 } 	 	 	 
 
 	 	 	 
 
 s t a t i c   s t r u c t   e n t r y { u n s i g n e d   c h a r   r e d ;   u n s i g n e d   c h a r   g r e e n ;   u n s i g n e d   c h a r   b l u e ; }   p a l e t t e 1 6 [ 1 6 ]   =   { 
 
 	 {   0 ,   0 ,   0 ,           } , {   0 ,   0 ,   1 7 0 ,         } , {   0 ,   1 7 0 ,   0 ,         } , {   0 ,   1 7 0 ,   1 7 0 ,     } , 
 
 	 {   1 7 0 ,   0 ,   0 ,       } , {   1 7 0 ,   0 ,   1 7 0 ,     } , {   1 7 0 ,   8 5 ,   0 ,       } , {   1 7 0 ,   1 7 0 ,   1 7 0 , } , 
 
 	 {   8 5 ,   8 5 ,   8 5 ,     } , {   8 5 ,   8 5 ,   2 5 5 ,     } , {   8 5 ,   2 5 5 ,   8 5 ,     } , {   8 5 ,   2 5 5 ,   2 5 5 ,   } , 
 
 	 {   2 5 5 ,   8 5 ,   8 5 ,   } , {   2 5 5 ,   8 5 ,   2 5 5 ,   } , {   2 5 5 ,   2 5 5 ,   8 5 ,   } , {   2 5 5 ,   2 5 5 ,   2 5 5   } , 
 
 } ; 	 	 	 
 
 	 	 	 
 
 s t a t i c   v o i d   w r i t e _ l o g o 1 6 ( c o n s t   c h a r   * f i l e n a m e ,   c o n s t   u n s i g n e d   c h a r   * d a t a ) 
 
 { 	 	 	 
 
 	 F I L E   * s t r e a m ;   i n t   i ,   j ,   d ; 
 
 	 s t r e a m   =   f o p e n ( f i l e n a m e ,   " w " ) ; 
 
 	 i f   ( ! s t r e a m )   {   p e r r o r ( " f i l e   o p e n   e r r o r :   " ) ;   e x i t ( 1 ) ;   } 
 
 	 	 	 
 
 	 f p u t s ( " P 3 \ n 8 0   8 0 \ n 2 5 5 \ n " ,   s t r e a m ) ; 
 
 	 f o r   ( i   =   0 ;   i   <   8 0 * 8 0 / 2 ;   i   + =   2 ) 
 
 	 { 	 	 
 
 	 	 f o r   ( j   =   0 ;   j   <   2 ;   j + + ) 
 
 	 	 { 	 
 
 	 	 	 d   =   d a t a [ i + j ]   > >   4 ; 
 
 	 	 	 f p r i n t f ( s t r e a m ,   "   % 3 d   % 3 d   % 3 d " ,   p a l e t t e 1 6 [ d ] . r e d , 
 
 	 	 	 p a l e t t e 1 6 [ d ] . g r e e n ,   p a l e t t e 1 6 [ d ] . b l u e ) ; 
 
 	 	 	 d   =   d a t a [ i + j ]   &   1 5 ; 
 
 	 	 	 f p r i n t f ( s t r e a m ,   "   % 3 d   % 3 d   % 3 d " ,   p a l e t t e 1 6 [ d ] . r e d , 
 
 	 	 	 p a l e t t e 1 6 [ d ] . g r e e n ,   p a l e t t e 1 6 [ d ] . b l u e ) ; 
 
 	 	 }   f p u t c ( ' \ n ' ,   s t r e a m ) ; 
 
 	 }   f c l o s e ( s t r e a m ) ; 
 
 } 	 	 	 
 
 	 	 	 
 
 i n t   m a i n ( i n t   a r g c ,   c h a r   * a r g v [ ] ) 
 
 { 	 	 	 
 
 / *   g e n e r i c   * / 
 
 w r i t e _ l o g o ( " l o g o _ 2 _ 4 . p p m " , l i n u x _ l o g o , l i n u x _ l o g o _ r e d , l i n u x _ l o g o _ g r e e n , l i n u x _ l o g o _ b l u e ) ; 
 
 w r i t e _ l o g o _ b w ( " l o g o _ b w _ 2 _ 4 . p b m " ,   l i n u x _ l o g o _ b w ) ; 
 
 w r i t e _ l o g o 1 6 ( " l o g o 1 6 _ 2 _ 4 . p p m " ,   l i n u x _ l o g o 1 6 ) ; 
 
 	 	 	 
 
 / *   m a c   * / 
 
 w r i t e _ l o g o ( " m a c _ 2 _ 4 . p p m " ,   m a c _ l o g o ,   m a c _ l o g o _ r e d ,   m a c _ l o g o _ g r e e n , m a c _ l o g o _ b l u e ) ; 
 
 	 	 	 
 
 / *   m i p s   * / 
 
 w r i t e _ l o g o ( " m i p s _ 2 _ 4 . p p m " ,   m i p s _ l o g o ,   m i p s _ l o g o _ r e d ,   m i p s _ l o g o _ g r e e n , m i p s _ l o g o _ b l u e ) ; 
 
 	 	 	 
 
 / *   m i p s 6 4   * / 
 
 w r i t e _ l o g o ( " m i p s . p p m " , m i p s 6 4 _ l o g o , m i p s 6 4 _ l o g o _ r e d , m i p s 6 4 _ l o g o _ g r e e n , m i p s 6 4 _ l o g o _ b l u e ) ; 
 
 	 	 	 
 
 / *   s p a r c   * / 
 
 w r i t e _ l o g o ( " s p a r c _ 2 _ 4 . p p m " , s p a r c _ l o g o , s p a r c _ l o g o _ r e d , s p a r c _ l o g o _ g r e e n , s p a r c _ l o g o _ b l u e ; 
 
 	 	 	 
 
 / *   s p a r c 6 4   * / 
 
 w r i t e _ l o g o ( " s p a r c . p p m " , s p a r c _ l o g o , s p a r c _ l o g o _ r e d , s p a r c _ l o g o _ g r e e n , s p a r c _ l o g o _ b l u e ) ; 
 
 	 	 	 
 
 r e t u r n   0 ; 
 
 } 	 	 	 
 
 