Browse Source

remove cpp version of __sputc, since the inline version is all we have

ever used.
ok jsg
OPENBSD_6_0
deraadt 8 years ago
parent
commit
0674b8f8e6
1 changed files with 1 additions and 15 deletions
  1. +1
    -15
      src/include/stdio.h

+ 1
- 15
src/include/stdio.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdio.h,v 1.51 2016/03/14 20:43:03 millert Exp $ */
/* $OpenBSD: stdio.h,v 1.52 2016/03/16 04:56:08 deraadt Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*-
@ -393,26 +393,12 @@ __END_DECLS
* define function versions in the C library.
*/
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
#if defined(__GNUC__)
static __inline int __sputc(int _c, FILE *_p) {
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else
return (__swbuf(_c, _p));
}
#else
/*
* This has been tuned to generate reasonable code on the vax using pcc.
*/
#define __sputc(c, p) \
(--(p)->_w < 0 ? \
(p)->_w >= (p)->_lbfsize ? \
(*(p)->_p = (c)), *(p)->_p != '\n' ? \
(int)*(p)->_p++ : \
__swbuf('\n', p) : \
__swbuf((int)(c), p) : \
(*(p)->_p = (c), (int)*(p)->_p++))
#endif
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
#define __sferror(p) (((p)->_flags & __SERR) != 0)


Loading…
Cancel
Save