Я помню, как в первые годы обучения C я знал, что означают аббревиатуры функций.Так что это попытка демистифицировать аббревиатуры.
Этот пост посвящен аббревиатурам, а не смыслу.Таким образом, необходимо подчеркнуть некоторые важные моменты:
некоторые сокращения не имеют смысла сами по себе.Либо потому, что некоторые слова неявные, либо потому, что при расширении аббревиатуры порядок букв странный .Например, iswprint
является аббревиатурой от "широкоформатная печать".Значение «широкий символ - печатный символ»
некоторые сокращения вводят в заблуждение.Например, FPE
в SIGFPE
означает «Исключение с плавающей точкой», но категория предназначена для арифметических исключений.Например, qsort
означает «быстрая сортировка», но стандарт не требует этого алгоритма, и он обычно реализуется как полиморфная сортировка.
Стандартная библиотека
Структура следует https://en.cppreference.com/w/c
Тип Поддержка
| abbrev | stands for |
| ----------- | ----------------------- |
| site_t | size type |
| ptrdiff_t | pointer difference type |
| NULL | null |
| max_align_t | max align type |
| offsetof | offset of |
| alignas | align as |
| alignof | align of |
| noreturn | no return |
Утилиты поддержки программ
Окончание программы
| abbrev | stands for |
| ------------- | ------------- |
| abort | abort |
| exit | exit |
| quick_exit | quick_exit |
| _Exit | exit |
| atexit | at exit |
| at_quick_exit | at quick exit |
Связь с окружающей средой
| abbrev | stands for |
| -------- | -------------------------------- |
| system | system |
| getenv | get environment (variables) |
| getenv_s | get environment (variables) safe |
Сигналы
| abbrev | stands for |
| ------------ | ------------------ |
| signal | signal |
| raise | raise |
| sig_atomic_t | signal atomic type |
| SIG_DFL | signal default |
| SIG_IGN | signal ignore |
| SIG_ERR | signal error |
Типы сигналов
| abbrev | stands for |
| ------- | ------------------------------- |
| SIGTERM | signal termination |
| SIGSEGV | signal segmentation violation |
| SIGINT | signal interrupt |
| SIGILL | signal illegal instruction |
| SIGABRT | signal abnormal termination |
| SIGFPE | signal floating point exception |
Нелокальные переходы
| abbrev | stands for |
| ------- | ---------- |
| setjmp | set jump |
| longjmp | long jump |
Типы
| abbrev | stands for |
| ------- | ----------- |
| jmp_buf | jump buffer |
Функция Variadic
| abbrev | stands for |
| -------- | ------------------------ |
| va_start | variable arguments start |
| va_end | variable arguments end |
| va_copy | variable arguments copy |
| va_end | variable arguments end |
| va_list | variable arguments list |
Управление памятью
| abbrev | stands for |
| ------------- | ------------------------------- |
| malloc | memory allocate |
| calloc | (unknown origin for c) allocate |
| realloc | reallocate |
| free | free |
| aligned_alloc | aligned allocate |
Утилиты даты и времени
TODO
Библиотека строк
Null-завершенные байтовые строки
Классификация символов
| abbrev | stands for |
| -------- | --------------- |
| isalnum | is alphanumeric |
| isalpha | is alphabetic |
| islower | is lowercase |
| isupper | is uppercase |
| isdigit | is digit |
| isxdigit | is hexadecimal |
| iscntrl | is control |
| isgraph | is graphical |
| isspace | is space |
| isblang | is blank |
| isprint | is printing |
| ispunct | is punctuation |
Манипулирование символами
| abbrev | stands for |
| ------- | ------------ |
| tolower | to lowercase |
| toupper | to uppercase |
Преобразование в числовые форматы
| abbrev | stands for |
| --------- | ---------------------------- |
| atof | ascii to floating-point |
| atol | ascii to long |
| atoll | ascii to long long |
| strtol | string to long |
| strtoll | string to long long |
| strtoul | string to unsigned long |
| strtoull | string to unsigned long long |
| strtof | string to float |
| strtod | string to double |
| strotold | string to long double |
| strtoimax | string to int max |
| strtoumax | string to unsigned max |
Манипулирование строками
| abbrev | stands for |
| --------- | -------------------------- |
| strcpy | string copy |
| strcpy_s | string copy safe |
| strncpy | string n copy |
| strncpy_s | string n copy safe |
| strcat | string concatenation |
| strcat_s | string concatenation safe |
| strncat | string n concatenation |
| strncat_s | string n concatetaion safe |
| strxfrm | string ?? |
Проверка строки
| abbrev | stands for |
| -------- | -------------------------------- |
| strlen | string length |
| strlen_s | string length safe |
| strcmp | string compare |
| strncmp | string n compare |
| strcoll | string compare locale collation |
| strchr | string (find) character |
| strrchr | string reverse (find) character |
| strspn | string span |
| strcspn | string complementary span |
| strpbrk | string pointer break |
| strstr | string (find) string |
| strtok | string tokenizer |
| strtok_s | string tokenizer (with) state |
Работа с массивами символов
| abbrev | stands for |
| --------- | ------------------------- |
| memchr | memory (search) character |
| memcmp | memory compare |
| memset | memory set |
| memset_s | memory set safe |
| memcpy | memory copy |
| memcpy_s | memory copy safe |
| memmove | memory move |
| memmove_s | memory move safe |
Разное
| abbrev | stands for |
| ------------- | ------------------------ |
| strerror | string error |
| strerror_s | string error safe |
| strerrorlen_s | string error length safe |
Многобайтовые строки с нулевым символом в конце
Преобразования в многобайтовые / широкие символы
| abbrev | stands for |
| ----------- | ---------------------------------------------------------- |
| mblen | multibyte length |
| mbtowc | multibyte to wide character |
| wctomb | wide character to multibyte |
| wctomb_s | wide character to multibyte safe |
| mbstowcs | multibyte string to wide character string |
| mbstowcs_s | multibyte string to wide character string safe |
| wcstombs | wide character string to multibyte string |
| wcstombs_s | wide character string to multibyte string safe |
| msinit | initial mbstate_t |
| btowc | byte to wide character |
| wctob | wide character to byte |
| mbrlen | multibyte restartable length |
| mbrtowc | multibyte restartable to wide character |
| wcrtomb | wide character restartable to multibyte |
| wcrtomb_s | wide character restartable to multibyte safe |
| mbsrtowcs | multibyte string restartable to wide character string |
| mbsrtowcs_s | multibyte string restartable to wide character string safe |
| wcsrtombs | wide character string restartable to multibyte string |
| wcsrtombs_s | wide character string restartable to multibyte string safe |
| mbrtoc16 | multibyte restartable to character 16 |
| c16rtomb | character 16 restartable to multibyte |
| mbrtoc32 | multibyte restartable to character 32 |
| c32rtomb | character 32 restartable to multibyte |
Типы
| abbrev | stands for |
| --------- | -------------------- |
| mbstate_t | multibyte state type |
| char16_t | character 16 type |
| char32_t | character 32 type |
Широкие строки с нулевым символом в конце
Классификация символов
| abbrev | stands for |
| --------- | -------------------- |
| iswalnum | is wide alphanumeric |
| iswalpha | is wide alphabetic |
| iswlower | is wide lowercase |
| iswupper | is wide uppercase |
| iswdigit | is wide digit |
| iswxdigit | is wide hexadecimal |
| iswcntrl | is wide control |
| iswgraph | is wide graphical |
| iswspace | is wide space |
| iswblang | is wide blank |
| iswprint | is wide printing |
| iswpunct | is wide punctuation |
| iswctype | is wide ctype |
| wctype | wide ctype |
Манипулирование символами
| abbrev | stands for |
| --------- | -------------------------------- |
| towlower | to wide lowercase |
| towupper | to wide uppercase |
| towctrans | to wide character transformation |
| wctrans | wide character transformation |
Преобразование в числовые форматы
| abbrev | stands for |
| --------- | ------------------------------------------- |
| wcstol | wide character string to long |
| wcstoll | wide character string to long long |
| wcstoul | wide character string to unsigned long |
| wcstoull | wide character string to unsigned long long |
| wcstof | wide character string to float |
| wcstod | wide character string to double |
| wcstold | wide character string to long double |
| wcstoimax | string to int max |
| wcstoumax | string to unsigned max |
Манипулирование строками
| abbrev | stands for |
| --------- | ----------------------------------------- |
| wcscpy | wide character string copy |
| wcscpy_s | wide character string copy safe |
| wcsncpy | wide character string n copy |
| wcsncpy_s | wide character string n copy safe |
| wcscat | wide character string concatenation |
| wcscat_s | wide character string concatenation safe |
| wcsncat | wide character string n concatenation |
| wcsncat_s | wide character string n concatenaion safe |
| wcsxfrm | wide character string ?? |
Проверка строки
| abbrev | stands for |
| -------- | ----------------------------------------------- |
| wcslen | wide character string length |
| wcslen_s | wide character string length safe |
| wcscmp | wide character string compare |
| wcsncmp | wide character string n compare |
| wcscoll | wide character string compare locale collation |
| wcschr | wide character string (find) character |
| wcsrchr | wide character string reverse (find) character |
| wcsspn | wide character string span |
| wcscspn | wide character string complementary span |
| wcspbrk | wide character string pointer break |
| wcsstr | wide character string (find) string |
| wcstok | wide character string tokenizer |
| wcstok_s | wide character string tokenizer (with) state |
Работа с массивом широких символов
| abbrev | stands for |
| ---------- | ---------------------------- |
| wmemcpy | wide memory copy |
| wmemcpy_s | wide memory copy safe |
| wmemmove | wide memory move |
| wmemmove_s | wide memory move safe |
| wmemcmp | wide memory cmp |
| wmemchr | wide memory (find) character |
| wmemset | wide momory set |
Типы
| abbrev | stands for |
| --------- | ---------------------------------- |
| wchar_t | wide character type |
| wint_t | wide integer type |
| wctrans_t | wide character transformation type |
| wctype_t | wide character type type |
Алгоритмы
| abbrev | stands for |
| --------- | ------------------ |
| qsort | quick sort |
| qsort_s | quick sort safe |
| bsearch | binary search |
| bsearch_s | binary search safe |
Числа
Математические функции
TODO
Среда с плавающей запятой
TODO
Генерация псевдослучайных чисел
TODO
Комплексное арифметическое число
TODO
Типовая математика
TODO
Поддержка ввода / вывода
TODO
Поддержка локализации
TODO
Библиотека атомарных операций
TODO
Библиотека поддержки потоков
TODO
POSIX
TODO