[BACK]Return to gzopen.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / compress

Diff for /src/usr.bin/compress/gzopen.c between version 1.1 and 1.2

version 1.1, 1997/07/06 20:22:57 version 1.2, 2001/11/19 19:02:13
Line 96 
Line 96 
   
 static u_char gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */  static u_char gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
   
 static int put_int32 __P((register gz_stream *, u_int32_t));  static int put_int32 __P((gz_stream *, u_int32_t));
 static u_int32_t get_int32 __P((register gz_stream *));  static u_int32_t get_int32 __P((gz_stream *));
 static int get_header __P((register gz_stream *));  static int get_header __P((gz_stream *));
 static int get_byte __P((register gz_stream *));  static int get_byte __P((gz_stream *));
   
 int  int
 gz_check_header(fd, sb, ofn)  gz_check_header(fd, sb, ofn)
Line 197 
Line 197 
 gz_close (cookie)  gz_close (cookie)
         void *cookie;          void *cookie;
 {  {
         register gz_stream *s = (gz_stream*)cookie;          gz_stream *s = (gz_stream*)cookie;
         int err = 0;          int err = 0;
   
         if (s == NULL)          if (s == NULL)
Line 225 
Line 225 
     void *cookie;      void *cookie;
     int flush;      int flush;
 {  {
         register gz_stream *s = (gz_stream*)cookie;          gz_stream *s = (gz_stream*)cookie;
         size_t len;          size_t len;
         int done = 0;          int done = 0;
         int err;          int err;
Line 262 
Line 262 
   
 static int  static int
 put_int32 (s, x)  put_int32 (s, x)
         register gz_stream *s;          gz_stream *s;
         u_int32_t x;          u_int32_t x;
 {  {
         if (write(s->z_fd, &x, 1) != 1)          if (write(s->z_fd, &x, 1) != 1)
Line 281 
Line 281 
   
 static int  static int
 get_byte(s)  get_byte(s)
         register gz_stream *s;          gz_stream *s;
 {  {
         if (s->z_eof)          if (s->z_eof)
                 return EOF;                  return EOF;
Line 301 
Line 301 
   
 static u_int32_t  static u_int32_t
 get_int32 (s)  get_int32 (s)
         register gz_stream *s;          gz_stream *s;
 {  {
         register u_int32_t x;          u_int32_t x;
   
         x  = ((u_int32_t)(get_byte(s) & 0xff));          x  = ((u_int32_t)(get_byte(s) & 0xff));
         x |= ((u_int32_t)(get_byte(s) & 0xff))<<8;          x |= ((u_int32_t)(get_byte(s) & 0xff))<<8;
Line 314 
Line 314 
   
 static int  static int
 get_header(s)  get_header(s)
         register gz_stream *s;          gz_stream *s;
 {  {
         int method; /* method byte */          int method; /* method byte */
         int flags;  /* flags byte */          int flags;  /* flags byte */
Line 375 
Line 375 
         char *buf;          char *buf;
         int len;          int len;
 {  {
         register gz_stream *s = (gz_stream*)cookie;          gz_stream *s = (gz_stream*)cookie;
         u_char *start = buf; /* starting point for crc computation */          u_char *start = buf; /* starting point for crc computation */
   
         s->z_stream.next_out = buf;          s->z_stream.next_out = buf;
Line 419 
Line 419 
         const char *buf;          const char *buf;
         int len;          int len;
 {  {
         register gz_stream *s = (gz_stream*)cookie;          gz_stream *s = (gz_stream*)cookie;
   
         s->z_stream.next_in = (char *)buf;          s->z_stream.next_in = (char *)buf;
         s->z_stream.avail_in = len;          s->z_stream.avail_in = len;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2