-/* $OpenBSD: compress.c,v 1.4 1997/01/17 07:12:29 millert Exp $ */
+/* $OpenBSD: compress.c,v 1.5 1997/01/19 17:25:11 millert Exp $ */
/* $NetBSD: compress.c,v 1.9 1995/03/26 09:44:38 glass Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
#else
-static char rcsid[] = "$OpenBSD: compress.c,v 1.4 1997/01/17 07:12:29 millert Exp $";
+static char rcsid[] = "$OpenBSD: compress.c,v 1.5 1997/01/19 17:25:11 millert Exp $";
#endif
#endif /* not lint */
struct stat isb, sb;
FILE *ifp, *ofp;
int exists, isreg, oreg;
- u_char buf[1024];
+ u_char buf[BUFSIZ];
exists = !stat(out, &sb);
if (!force && exists && S_ISREG(sb.st_mode) && !permission(out))
struct stat sb;
FILE *ifp, *ofp;
int exists, isreg, oreg;
- u_char buf[1024];
+ u_char buf[BUFSIZ];
exists = !stat(out, &sb);
if (!force && exists && S_ISREG(sb.st_mode) && !permission(out))
-.\" $OpenBSD: zopen.3,v 1.3 1996/09/22 20:05:18 tholo Exp $
+.\" $OpenBSD: zopen.3,v 1.4 1997/01/19 17:25:12 millert Exp $
.\" $NetBSD: zopen.3,v 1.3 1995/03/26 09:44:49 glass Exp $
.\"
.\" Copyright (c) 1992, 1993
The
.Nm zopen
function
-first appeared in 4.4BSD.
+first appeared in
+.Bx 4.4 .
.Sh BUGS
The
.Fn zopen
-/* $OpenBSD: zopen.c,v 1.3 1996/09/22 20:05:19 tholo Exp $ */
+/* $OpenBSD: zopen.c,v 1.4 1997/01/19 17:25:14 millert Exp $ */
/* $NetBSD: zopen.c,v 1.5 1995/03/26 09:44:53 glass Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)zopen.c 8.1 (Berkeley) 6/27/93";
#else
-static char rcsid[] = "$OpenBSD: zopen.c,v 1.3 1996/09/22 20:05:19 tholo Exp $";
+static char rcsid[] = "$OpenBSD: zopen.c,v 1.4 1997/01/19 17:25:14 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
* Since ocode is always >= 8 bits, only need to mask the first
* hunk on the left.
*/
- *bp = (*bp & rmask[r_off]) | (ocode << r_off) & lmask[r_off];
+ *bp = (*bp & rmask[r_off]) | ((ocode << r_off) & lmask[r_off]);
bp++;
bits -= (8 - r_off);
ocode >>= 8 - r_off;
{
struct s_zstate *zs;
- if (mode[0] != 'r' && mode[0] != 'w' || mode[1] != '\0' ||
+ if ((mode[0] != 'r' && mode[0] != 'w') || mode[1] != '\0' ||
bits < 0 || bits > BITS) {
errno = EINVAL;
return (NULL);
{
struct s_zstate *zs;
- if (mode[0] != 'r' && mode[0] != 'w' || mode[1] != '\0' ||
+ if ((mode[0] != 'r' && mode[0] != 'w') || mode[1] != '\0' ||
bits < 0 || bits > BITS) {
errno = EINVAL;
return (NULL);