home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / unix / unxbin.sha / gethead.c < prev    next >
C/C++ Source or Header  |  1986-04-02  |  385b  |  28 lines

  1. /*
  2.  * filter to change a foo.info file into a proper header for a .hqx file
  3.  */
  4.  
  5. char head[ 128 ];
  6.  
  7. main()
  8. {
  9.     int n;
  10.  
  11.     read( 0, head, 128 );
  12.  
  13.     put( 1, 1 );
  14.  
  15.     for ( n = 0; n < head[1]; n++ )
  16.         put( 1, n+2 );
  17.     head[0] = 0; put( 1, 0 );
  18.     put( 4, 65 ); put( 4, 69 );
  19.     put( 2, 63 ); put( 4, 83 );
  20.     put( 4, 87 );
  21. }
  22.  
  23. put( cnt, offset )
  24. {
  25.     while ( cnt-- > 0 )
  26.         putchar( head[ offset++ ] );
  27. }
  28.