본문 바로가기
C 언어

getc

by SpeeDr00t 2016. 7. 9.
반응형

int getc(FILE *fp)

#include <stdio.h>

/*
 * A subroutine version of the macro getc_unlocked.
 */
#undef getc_unlocked

int
getc_unlocked(FILE *fp)
{
	return (__sgetc(fp));
}

/*
 * A subroutine version of the macro getc.
 */
#undef getc

int
getc(FILE *fp)
{
	int c;

	flockfile(fp);
	c = __sgetc(fp);
	funlockfile(fp);
	return (c);
}
반응형

'C 언어' 카테고리의 다른 글

perror  (0) 2016.07.09
getchar  (0) 2016.07.09
gets  (0) 2016.07.09
puts  (0) 2016.07.09
printf  (0) 2016.07.09