以下是 C 标准库头文件和函数的翻译:

头文件

ANSI C (C89)/ISO C (C90)

  • assert.h:程序断言验证文件
  • ctype.h:字符类型文件
  • errno.h:系统错误号文件
  • float.h:浮动类型文件
  • limits.h:实现定义常量文件
  • locale.h:类别宏文件
  • math.h:数学声明文件
  • setjmp.h:堆栈环境声明文件
  • signal.h:信号文件
  • stdarg.h:处理可变参数列表文件
  • stddef.h:标准类型定义文件
  • stdio.h:标准缓冲输入/输出文件
  • stdlib.h:标准库定义文件
  • string.h:字符串操作文件
  • time.h:时间类型文件

ISO C (C94/C95), 修正案 1 (AMD1)

  • iso646.h:替代拼写。
  • wchar.h:宽字符处理。
  • wctype.h:宽字符分类和映射工具。

ISO C (C99) 这些在新版本编译器中支持

  • complex.h:复数算术。
  • fenv.h:浮动点环境。
  • inttypes.h:固定大小整数类型。
  • stdbool.h:布尔类型和布尔值。
  • stdint.h:整数类型。
  • tgmath.h:类型泛化宏。

ISO C (C11) 这些在新版本编译器中支持

  • stdalign.h:对齐关键字和宏。
  • stdatomic.h:线程间共享数据的原子操作。
  • stdnoreturn.h_Noreturn 函数说明符宏。
  • threads.h:支持多线程执行。
  • uchar.h:操作 Unicode 字符的类型和函数。

函数表

此表还包含函数类似的宏

assert.h

  • assert

complex.h

  • cacos, cacosf, cacosl
  • casin, casinf, casinl
  • catan, catanf, catanl
  • ccos, ccosf, ccosl
  • csin, csinf, csinl
  • ctan, ctanf, ctanl
  • cacosh, cacoshf, cacoshl
  • casinh, casinhf, casinhl
  • catanh, catanhf, catanhl
  • ccosh, ccoshf, ccoshl
  • csinh, csinhf, csinhl
  • ctanh, ctanhf, ctanhl
  • cexp, cexpf, cexpl
  • clog, clogf, clogl
  • cabs, cabsf, cabsl
  • cpow, cpowf, cpowl
  • csqrt, csqrtf, csqrtl
  • carg, cargf, cargl
  • cimag, cimagf, cimagl
  • conj, conjf, conjl
  • cproj, cprojf, cprojl
  • creal, crealf, creall

ctype.h

  • isalnum, isalpha, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit
  • tolower, toupper

fenv.h

  • feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept, feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept, feupdateenv

inttypes.h

  • imaxabs, imaxdiv, strtoimax, strtoumax, wcstoimax, wcstoumax

locale.h

  • localeconv, setlocale

math.h

  • fpclassify, isfinite, isgreater, isgreaterequal, isinf, isless, islessequal, islessgreater, isnan, isnormal, isunordered, signbit

setjmp.h

  • longjmp, setjmp

signal.h

  • raise

stdarg.h

  • va_arg, va_copy, va_end, va_start

stdatomic.h

  • atomic_init, atomic_thread_fence, atomic_signal_fence, atomic_is_lock_free, atomic_store, atomic_store_explicit, atomic_load, atomic_load_explicit, atomic_exchange, atomic_exchange_explicit, atomic_compare_exchange_strong, atomic_compare_exchange_strong_explicit, atomic_compare_exchange_weak, atomic_compare_exchange_weak_explicit, atomic_fetch, atomic_fetch_key_explicit, atomic_flag_test_and_set, atomic_flag_test_and_set_explicit, atomic_flag_clear, atomic_flag_clear_explicit

stddef.h

  • offsetof

stdio.h

  • clearerr, fclose, feof, fgetc, fgetpos, fgets, fopen, fprintf, fputs, fread, fscanf, fseek, fsetpos, ftell, fwprintf, fwrite, getc, getchar, gets, perror, printf, putc, putchar, puts, remove, rename, rewind, scanf, setbuf, setvbuf, sprintf, tmpfile, ungetc, vwprintf, wprintf, wscanf

stdlib.h

  • abort, abs, labs, atexit, atof, atoi, atol, bsearch, div, ldiv, exit, free, getenv, malloc, calloc, realloc, qsort, rand, srand, strtod, strtol, strtoul, system

string.h

  • memchr, memcmp, memcpy, memmove, memset, strcat, strncat, strchr, strcmp, strncmp, strcoll, strcpy, strncpy, strcspn, strerror, strlen, strpbrk, strrchr, strspn, strstr, strtok, strxfrm

threads.h

  • call_once, cnd_broadcast, cnd_destroy, cnd_init, cnd_signal, cnd_timedwait, cnd_wait, mtx_destroy, mtx_init, mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock, thrd_create, thrd_current, thrd_detach, thrd_equal, thrd_exit, thrd_join, thrd_sleep, thrd_yield, tss_create, tss_delete, tss_get, tss_set

time.h

  • asctime, clock, ctime, difftime, gmtime, localtime, mktime, strftime, time

uchar.h

  • mbrtoc16, c16rtomb, mbrtoc32, c32rtomb

wchar.h

  • btowc, fgetwc, fgetws, fputwc, fwide, fwprintf, fwscanf, getwc, getwchar, mbrlen, mbrtowc, mbsinit, mbsrtowcs, putwc, putwchar, swprintf, swscanf, ungetwc, vfwprintf, vswprintf, vwprintf, wcrtomb, wcscat, wcschr, wcscmp, wcscoll, wcscpy, wcscspn, wcsftime, wcslen, wcsncat, wcsncmp, wcsncpy, wcspbrk, wcsrchr, wcsrtombs, wcsspn, wcsstr, wcstod, wcstok, wcstol, wcstoul, wcsxfrm, wctob, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, wprintf, wscanf

wctype.h

  • iswalnum, iswalpha, iswcntrl, iswctype, iswdigit, iswgraph, iswlower, `

iswprint, iswpunct, iswspace, iswupper, iswxdigit, towctrans, towlower, towupper, wctrans, wctype`

Last modified: Sunday, 12 January 2025, 12:58 PM