From: mmcc Date: Wed, 21 Oct 2015 15:47:41 +0000 (+0000) Subject: Remove a couple of unhelpful defines. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2c9697c4871f93ee694179c5ce56198d1a39d992;p=openbsd Remove a couple of unhelpful defines. ok nicm@ --- diff --git a/bin/ksh/history.c b/bin/ksh/history.c index 34f3075077b..6ff6ac5fc74 100644 --- a/bin/ksh/history.c +++ b/bin/ksh/history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: history.c,v 1.50 2015/10/21 15:20:37 mmcc Exp $ */ +/* $OpenBSD: history.c,v 1.51 2015/10/21 15:47:41 mmcc Exp $ */ /* * command history @@ -243,7 +243,7 @@ c_fc(char **wp) return 1; } - n = fstat(shf_fileno(shf), &statb) < 0 ? 128 : + n = fstat(shf->fd, &statb) < 0 ? 128 : statb.st_size + 1; Xinit(xs, xp, n, hist_source->areap); while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) { diff --git a/bin/ksh/shf.h b/bin/ksh/shf.h index 234d1510ea1..44e31abe0fb 100644 --- a/bin/ksh/shf.h +++ b/bin/ksh/shf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: shf.h,v 1.6 2005/12/11 18:53:51 deraadt Exp $ */ +/* $OpenBSD: shf.h,v 1.7 2015/10/21 15:47:41 mmcc Exp $ */ #ifndef SHF_H # define SHF_H @@ -9,8 +9,6 @@ #define SHF_BSIZE 512 -#define shf_fileno(shf) ((shf)->fd) -#define shf_setfileno(shf,nfd) ((shf)->fd = (nfd)) #define shf_getc(shf) ((shf)->rnleft > 0 ? (shf)->rnleft--, *(shf)->rp++ : \ shf_getchar(shf)) #define shf_putc(c, shf) ((shf)->wnleft == 0 ? shf_putchar((c), (shf)) : \