function  writedword( val )
{
     val1 = val / 16777216 ;
     val  = val%16777216 ;
     val2 = val / 65536 ;
     val  = val%65536 ;
     val3 = val / 256 ;
     val4 = val%256 ;

     printf( "%c%c%c%c", val4, val3, val2, val1 ) > "publishers.dat" ;
}
BEGIN {

     txtsize = 0 ;

     while ( getline <"xboxpublishers.txt" )
     {
        if ( length($2) > txtsize )
           txtsize = length($2) ;
     }

     txtsize++ ;

     close( "xboxpublishers.txt" ) ;

     writedword( 2 ) ;
     writedword( 4 ) ;
     writedword( txtsize ) ;


     while ( getline <"xboxpublishers.txt" )
     {
         writedword( $1 ) ;
         printf( "%s", $2 ) > "publishers.dat" ;
         for ( i = length($2) ; i < txtsize ; i++ )
         {
            printf( "%c", 0 ) > "publishers.dat" ;
         }
     }

     close( "publishers.dat" ) ;
}
{

}
