О функции putc в стандартной библиотеке
Привет.
Решил почитать о функции putc в stdio.h (я работаю под FreeBSD):
http://gitweb.anholt.net/cgi-bin/cgi...nclude/stdio.h
Обратил внимание на объявление:
245 int putc(int, FILE *);
Грепая по всему дереву включений я не смог найти определение этой функции. Где эта функция определяется?
|
stdio.h от комплекта MinGW
Код:
/* Traditionally, getc and putc are defined as macros. but the
standard doesn't say that they must be macros.
We use inline functions here to allow the fast versions
to be used in C++ with namespace qualification, eg., ::getc.
_filbuf and _flsbuf are not thread-safe. */
_CRTIMP int __cdecl _filbuf (FILE*);
_CRTIMP int __cdecl _flsbuf (int, FILE*);
#if !defined _MT
__CRT_INLINE int __cdecl getc (FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) *__F->_ptr++
: _filbuf (__F);
}
__CRT_INLINE int __cdecl putc (int __c, FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
: _flsbuf (__c, __F);
}
|
Время: 01:49.
© OSzone.net 2001-