"stdio" 和 "stdlib" 在 C 中代表什么?

What does "stdio" and "stdlib" stand for in C?

本文关键字:什么 stdio stdlib      更新时间:2023-10-16

有什么地方可以解释所有的简写库名称吗?我不想要关于图书馆功能的文档,我只想知道标题的缩写是什么。它们是缩写吗?

好吧,那么让一个列表开始吧:

  • "stdio":标准输入/输出
  • "stdlib":标准库
  • "printf":打印格式
  • "fprintf":文件打印格式("打印格式为文件")
  • "sprintf":字符串打印格式("打印格式为字符串")
  • "vfprintf":可变fprintf
  • "fputc":file put char("将char放入文件")
  • "scanf":扫描格式
  • "fread":文件读取("从文件读取")
  • "pthread":Posix线程
  • "uint16_t":无符号整数类型,16位宽
  • "sigatomic_t":可以在信号处理程序中原子访问的类型
  • "_t"在一般情况下:为标准库中的类型名称保留的后缀
  • "float":浮点数
  • "double":双精度浮点数
  • "char":字符
  • "bit":二进制数字
  • "fd":文件描述符
  • "fcntl.h":文件控制(Posix文件描述符)
  • "ioctl.h":I/O控制(也称为Posix)
  • "stat":文件的状态(也称为Posix)
  • "lstat":状态,可能是链接本身的状态
  • "fstat":文件描述符的状态
  • "睡眠":中断正常活动而完全不活动
  • "usleep":上面的版本,参数以微秒(µs)为单位,"u"看起来有点像"µ",同时是基本的ASCII
  • "recv":接收
  • "create":创建
  • "str":string,在C中,它通常指以null结尾的char数组
  • "strtok":标记化字符串
  • "pow":力量
  • "frexp":小数部分(有效位)和指数
  • "abs":绝对值
  • "malloc":内存分配
  • "calloc":分配并澄清初始状态为零
  • "wcsrpyrams":宽字符串到多字节字符串,可重入
  • "wc坟墓":宽字符到多字节字符
  • "iconv":
  • "uconv":ICU版本的"iconv"

标准I/O(输入输出)和标准库

您想知道如何自己找到这些。(我喜欢Kerrek SB的列表,但我不能责怪你想知道如何自己查找这些东西。)

首先:如果你在Debian或Ubuntu上,我强烈建议你除了安装通常的manpages包外,还安装manpages-posixmanpages-posix-dev包。除了Linux手册页项目之外,还可以使用这些标准。

差异通过立即可见

man 2 close       # gives you the Linux documentation of the system call
man 3posix close  # gives you the POSIX definition of the function

您还可以看到不太可能是系统调用的函数的差异:

man 3 qsort       # Linux man-pages project describing the glibc function
man 3posix qsort  # POSIX standard definition of the function, should be useful
                    description for any POSIX-compliant system

我还建议安装dictdictddict-jargondict-foldoc(或两者)软件包:

$ dict stdin
2 definitions found
From The Free On-line Dictionary of Computing (26 July 2010) [foldoc]:
  standard input/output
  standard I/O
  stderr
  stdin
  stdio
  stdout
     <programming, operating system> The predefined input/output
     channels which every {Unix} process is initialised with.
     Standard input is by default from the terminal, and standard
     output and standard error are to the terminal.  Each of these
     channels (controlled via a {file descriptor} 0, 1, or 2 -
     stdin, stdout, stderr) can be redirected to a file, another
     device or a {pipe} connecting its process to another process.
     The process is normally unaware of such {I/O redirection},
     thus simplifying prototyping of combinations of commands.
     The {C} programming language library includes routines to
     perform basic operations on standard I/O.  Examples are
     "printf", allowing text to be sent to standard output, and
     "scanf", allowing the program to read from standard input.
     (1996-06-07)

From V.E.R.A. -- Virtual Entity of Relevant Acronyms (June 2006) [vera]:
  STDIN
         STandarD INput
$ dict stdlib
No definitions found for "stdlib"
$ 

(很有趣,对吧?没有你想要的工具。但它们仍然是很棒的工具。)

stdio:标准输入/输出

http://www.cplusplus.com/reference/clibrary/cstdio/

"…使用C标准输入和输出库(cstdio,在C语言中称为stdio.h)"

stdlib:标准库

http://www.cplusplus.com/reference/clibrary/cstdlib/

"C标准通用工具库此标头定义了几个通用函数。。。"