[英]how to find the implementation of C getchar() on my system (Mac OS)?
我知道int getchar(void)
是一個 C 庫 function。
如何在我當前的 Mac OS 上找到它的實現? 僅供參考,使用來自終端的“man getchar”我得到:
GETC(3) BSD Library Functions Manual GETC(3)
NAME
fgetc, getc, getc_unlocked, getchar, getchar_unlocked, getw -- get next character or word from input stream
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdio.h>
int
fgetc(FILE *stream);
int
getc(FILE *stream);
int
getc_unlocked(FILE *stream);
int
getchar(void);
int
getchar_unlocked(void);
int
getw(FILE *stream);
如果你想看看 Apple 的實現,你必須看看他們的開源部分:
您可以在以下位置找到所有開源代碼:opensource.apple.com
除非,通過實施我們的意思是:
> nm /usr/lib/libcupscgi.dylib | grep "getchar"
U _getchar
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.