# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Alexander Golubev , 2018. # Azamat Hackimov , 2011, 2014-2016. # Hotellook, 2014. # Nikita , 2014. # Spiros Georgaras , 2016. # Vladislav , 2015. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2023-08-27 17:24+0200\n" "PO-Revision-Date: 2019-10-15 18:55+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " "(n%100>=11 && n%100<=14)? 2 : 3);\n" "X-Generator: Lokalize 2.0\n" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "STRCAT" msgstr "STRCAT" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2017-09-15" msgstr "15 сентября 2017 г." #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "GNU" msgstr "GNU" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux Programmer's Manual" msgstr "Руководство программиста Linux" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: opensuse-leap-15-6 msgid "strcat, strncat - concatenate two strings" msgstr "strcat, strncat - объединяет две строки" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "B<#include Estring.hE>\n" msgstr "B<#include Estring.hE>\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "BIB<, const char *>IB<);>\n" msgstr "BIB<, const char *>IB<);>\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "BIB<, const char *>IB<, size_t >IB<);>\n" msgstr "BIB<, const char *>IB<, size_t >IB<);>\n" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "The B() function appends the I string to the I string, " "overwriting the terminating null byte (\\(aq\\e0\\(aq) at the end of " "I, and then adds a terminating null byte. The strings may not " "overlap, and the I string must have enough space for the result. If " "I is not large enough, program behavior is unpredictable; I." msgstr "" "Функция B() добавляет строку I к строке I, перезаписывая " "байт null (\\(aq\\e0\\(aq) в конце I и добавляет завершающий байт " "null. Строки не могут перекрываться, а в строке I должно хватать " "свободного места для размещения объединённой строки. Если размер I " "мал, то поведение программы непредсказуемо; I<переполнение буфера — любимое " "средство для атаки защищённых программ>." #. type: Plain text #: opensuse-leap-15-6 msgid "The B() function is similar, except that" msgstr "Функция B() работает аналогичным образом, но" #. type: IP #: opensuse-leap-15-6 #, no-wrap msgid "*" msgstr "*" #. type: Plain text #: opensuse-leap-15-6 msgid "it will use at most I bytes from I; and" msgstr "задействует не более I первых байт строки I и" #. type: Plain text #: opensuse-leap-15-6 msgid "" "I does not need to be null-terminated if it contains I or more bytes." msgstr "" "строка I может не завершаться байтом null, если в ней содержится I " "или более байт." #. type: Plain text #: opensuse-leap-15-6 msgid "" "As with B(), the resulting string in I is always null-" "terminated." msgstr "" "Как и B(), строка-результат в I всегда заканчивается байтом " "null." #. type: Plain text #: opensuse-leap-15-6 msgid "" "If I contains I or more bytes, B() writes I bytes to " "I (I from I plus the terminating null byte). Therefore, the " "size of I must be at least I." msgstr "" "Если в I содержится I или более байт, то B() записывает " "I байт в I (I из I плюс завершающий байт null). Поэтому " "размер I должен быть не менее I." #. type: Plain text #: opensuse-leap-15-6 msgid "A simple implementation of B() might be:" msgstr "Простейшей реализацией B() может быть:" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" "char *\n" "strncat(char *dest, const char *src, size_t n)\n" "{\n" " size_t dest_len = strlen(dest);\n" " size_t i;\n" msgstr "" "char *\n" "strncat(char *dest, const char *src, size_t n)\n" "{\n" " size_t dest_len = strlen(dest);\n" " size_t i;\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" " for (i = 0 ; i E n && src[i] != \\(aq\\e0\\(aq ; i++)\n" " dest[dest_len + i] = src[i];\n" " dest[dest_len + i] = \\(aq\\e0\\(aq;\n" msgstr "" " for (i = 0 ; i E n && src[i] != \\(aq\\e0\\(aq ; i++)\n" " dest[dest_len + i] = src[i];\n" " dest[dest_len + i] = \\(aq\\e0\\(aq;\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" " return dest;\n" "}\n" msgstr "" " return dest;\n" "}\n" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "RETURN VALUE" msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "The B() and B() functions return a pointer to the " "resulting string I." msgstr "" "Функции B() и B() возвращают указатель на скопированную " "строку I." #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "ATTRIBUTES" msgstr "АТРИБУТЫ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "Описание терминов данного раздела смотрите в B(7)." #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "Interface" msgstr "Интерфейс" #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "Attribute" msgstr "Атрибут" #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "Value" msgstr "Значение" #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "" "B(),\n" "B()" msgstr "" "B(),\n" "B()" #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "Thread safety" msgstr "Безвредность в нитях" #. type: tbl table #: opensuse-leap-15-6 #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "CONFORMING TO" msgstr "СООТВЕТСТВИЕ СТАНДАРТАМ" #. type: Plain text #: opensuse-leap-15-6 msgid "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD." msgstr "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD." #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "NOTES" msgstr "ЗАМЕЧАНИЯ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "Some systems (the BSDs, Solaris, and others) provide the following function:" msgstr "В некоторых системах (BSD, Solaris и других) есть следующая функция:" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid " size_t strlcat(char *dest, const char *src, size_t size);\n" msgstr " size_t strlcat(char *dest, const char *src, size_t size);\n" #. https://lwn.net/Articles/506530/ #. type: Plain text #: opensuse-leap-15-6 msgid "" "This function appends the null-terminated string I to the string " "I, copying at most I from I, and adds a " "terminating null byte to the result, I I is less than " "I. This function fixes the buffer overrun problem of " "B(), but the caller must still handle the possibility of data loss " "if I is too small. The function returns the length of the string " "B() tried to create; if the return value is greater than or equal " "to I, data loss occurred. If data loss matters, the caller I " "either check the arguments before the call, or test the function return " "value. B() is not present in glibc and is not standardized by " "POSIX, but is available on Linux via the I library." msgstr "" "Эта функция добавляет строку I, оканчивающуюся null, к строке I, " "копируя не более I байт из I, и добавляет к " "результату конечный байт null, I<если> I менее I. Эта " "функция исправляет проблему с переполнением буфера в B(), но " "вызывающий по прежнему должен рассматривать возможность потери данных, если " "I слишком мал. Функция возвращает длину строки, которую B() " "пыталась создать; если возвращаемое значение больше или равно I, то " "произошла потеря данных. Если потеря данных критична, то вызывающий " "I<должен> или проверять аргументы перед вызовом, или проверять возвращаемое " "функцией значение. Функция B() отсутствует в glibc и не " "стандартизована POSIX, но доступна в Linux в библиотеке I." #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "EXAMPLE" msgstr "ПРИМЕР" #. type: Plain text #: opensuse-leap-15-6 msgid "" "Because B() and B() must find the null byte that " "terminates the string I using a search that starts at the beginning of " "the string, the execution time of these functions scales according to the " "length of the string I. This can be demonstrated by running the " "program below. (If the goal is to concatenate many strings to one target, " "then manually copying the bytes from each source string while maintaining a " "pointer to the end of the target string will provide better performance.)" msgstr "" "Так как B() и B() должны найти байт null, завершающий " "строку I, начиная поиск от начала строки, время выполнения этих " "функций пропорционально длине строки I. Это можно увидеть из запуска " "программы, представленной ниже (если целью является склейка несколько строк " "в одну, то ручное копирование байт из одного источника и управление концом " "строки назначения будет более производительным)." #. type: SS #: opensuse-leap-15-6 #, no-wrap msgid "Program source" msgstr "Исходный код программы" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" "#include Estring.hE\n" "#include Etime.hE\n" "#include Estdio.hE\n" msgstr "" "#include Estring.hE\n" "#include Etime.hE\n" "#include Estdio.hE\n" #. type: Plain text #: opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "int\n" #| "main(int argc, char *argv[])\n" #| "{\n" #| "#define LIM 4000000\n" #| " int j;\n" #| " char p[LIM + 1]; /* +1 for terminating null byte */\n" #| " time_t base;\n" msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" "#define LIM 4000000\n" " int j;\n" " char p[LIM];\n" " time_t base;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" "#define LIM 4000000\n" " int j;\n" " char p[LIM + 1]; /* +1 для конечного байта null */\n" " time_t base;\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" " base = time(NULL);\n" " p[0] = \\(aq\\e0\\(aq;\n" msgstr "" " base = time(NULL);\n" " p[0] = \\(aq\\e0\\(aq;\n" #. type: Plain text #: opensuse-leap-15-6 #, no-wrap msgid "" " for (j = 0; j E LIM; j++) {\n" " if ((j % 10000) == 0)\n" " printf(\"%d %ld\\en\", j, (long) (time(NULL) - base));\n" " strcat(p, \"a\");\n" " }\n" "}\n" msgstr "" " for (j = 0; j E LIM; j++) {\n" " if ((j % 10000) == 0)\n" " printf(\"%d %ld\\en\", j, (long) (time(NULL) - base));\n" " strcat(p, \"a\");\n" " }\n" "}\n" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "SEE ALSO" msgstr "СМ. ТАКЖЕ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "B(3), B(3), B(3), B(3), B(3), " "B(3), B(3), B(3)" msgstr "" "B(3), B(3), B(3), B(3), B(3), " "B(3), B(3), B(3)" #. type: SH #: opensuse-leap-15-6 #, no-wrap msgid "COLOPHON" msgstr "ЗАМЕЧАНИЯ" #. type: Plain text #: opensuse-leap-15-6 msgid "" "This page is part of release 4.16 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%https://www.kernel.org/doc/man-" "pages/." msgstr "" "Эта страница является частью проекта Linux I версии 4.16. " "Описание проекта, информацию об ошибках и последнюю версию этой страницы " "можно найти по адресу \\%https://www.kernel.org/doc/man-pages/."