분류 전체보기683 putchar int putchar(int c) #include #undef putchar_unlocked /* * A subrouting version of the macro putchar_unlocked */ int putchar_unlocked(int c) { FILE *so = stdout; return (putc_unlocked(c,so)); } #undef putchar /* * A subroutine version of the macro putchar */ int putchar(int c) { FILE *so = stdout; return (putc(c, so)); } 2016. 7. 9. perror void perror(const char *s) #include #include #include #include #include #include #include void perror(const char *s) { struct iovec *v; struct iovec iov[4]; char buf[NL_TEXTMAX]; v = iov; if (s && *s) { v->iov_base = (char *)s; v->iov_len = strlen(s); v++; v->iov_base = ": "; v->iov_len = 2; v++; } (void)strerror_r(errno, buf, sizeof(buf)); v->iov_base = buf; v->iov_len = strlen(v->iov_base); v+.. 2016. 7. 9. getchar int getchar(void) #include /* * A subroutine version of the macro getchar_unlocked. */ #undef getchar_unlocked int getchar_unlocked(void) { return (getc_unlocked(stdin)); } /* * A subroutine version of the macro getchar. */ #undef getchar int getchar(void) { return (getc(stdin)); } 2016. 7. 9. getc int getc(FILE *fp) #include /* * 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); } 2016. 7. 9. 이전 1 ··· 139 140 141 142 143 144 145 ··· 171 다음