Debian Codegraph @

po/ru/archive/man3/strcat.3.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Alexander Golubev <[email protected]>, 2018.
5 # Azamat Hackimov <[email protected]>, 2011, 2014-2016.
6 # Hotellook, 2014.
7 # Nikita <[email protected]>, 2014.
8 # Spiros Georgaras <[email protected]>, 2016.
9 # Vladislav <[email protected]>, 2015.
10 # Yuri Kozlov <[email protected]>, 2011-2019.
11 # Иван Павлов <[email protected]>, 2017.
12 msgid ""
13 msgstr ""
14 "Project-Id-Version: manpages-l10n\n"
15 "POT-Creation-Date: 2023-08-27 17:24+0200\n"
16 "PO-Revision-Date: 2019-10-15 18:55+0300\n"
17 "Last-Translator: Yuri Kozlov <[email protected]>\n"
18 "Language-Team: Russian <[email protected]>\n"
19 "Language: ru\n"
20 "MIME-Version: 1.0\n"
21 "Content-Type: text/plain; charset=UTF-8\n"
22 "Content-Transfer-Encoding: 8bit\n"
23 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
24 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
25 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
26 "X-Generator: Lokalize 2.0\n"
27
28 #. type: TH
29 #: opensuse-leap-15-6
30 #, no-wrap
31 msgid "STRCAT"
32 msgstr "STRCAT"
33
34 #. type: TH
35 #: opensuse-leap-15-6
36 #, no-wrap
37 msgid "2017-09-15"
38 msgstr "15 сентября 2017 г."
39
40 #. type: TH
41 #: opensuse-leap-15-6
42 #, no-wrap
43 msgid "GNU"
44 msgstr "GNU"
45
46 #. type: TH
47 #: opensuse-leap-15-6
48 #, no-wrap
49 msgid "Linux Programmer's Manual"
50 msgstr "Руководство программиста Linux"
51
52 #. type: SH
53 #: opensuse-leap-15-6
54 #, no-wrap
55 msgid "NAME"
56 msgstr "ИМЯ"
57
58 #. type: Plain text
59 #: opensuse-leap-15-6
60 msgid "strcat, strncat - concatenate two strings"
61 msgstr "strcat, strncat - объединяет две строки"
62
63 #. type: SH
64 #: opensuse-leap-15-6
65 #, no-wrap
66 msgid "SYNOPSIS"
67 msgstr "СИНТАКСИС"
68
69 #. type: Plain text
70 #: opensuse-leap-15-6
71 #, no-wrap
72 msgid "B<#include E<lt>string.hE<gt>>\n"
73 msgstr "B<#include E<lt>string.hE<gt>>\n"
74
75 #. type: Plain text
76 #: opensuse-leap-15-6
77 #, no-wrap
78 msgid "B<char *strcat(char *>I<dest>B<, const char *>I<src>B<);>\n"
79 msgstr "B<char *strcat(char *>I<dest>B<, const char *>I<src>B<);>\n"
80
81 #. type: Plain text
82 #: opensuse-leap-15-6
83 #, no-wrap
84 msgid "B<char *strncat(char *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
85 msgstr "B<char *strncat(char *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
86
87 #. type: SH
88 #: opensuse-leap-15-6
89 #, no-wrap
90 msgid "DESCRIPTION"
91 msgstr "ОПИСАНИЕ"
92
93 #. type: Plain text
94 #: opensuse-leap-15-6
95 msgid ""
96 "The B<strcat>() function appends the I<src> string to the I<dest> string, "
97 "overwriting the terminating null byte (\\(aq\\e0\\(aq) at the end of "
98 "I<dest>, and then adds a terminating null byte. The strings may not "
99 "overlap, and the I<dest> string must have enough space for the result. If "
100 "I<dest> is not large enough, program behavior is unpredictable; I<buffer "
101 "overruns are a favorite avenue for attacking secure programs>."
102 msgstr ""
103 "Функция B<strcat>() добавляет строку I<src> к строке I<dest>, перезаписывая "
104 "байт null (\\(aq\\e0\\(aq) в конце I<dest> и добавляет завершающий байт "
105 "null. Строки не могут перекрываться, а в строке I<dest> должно хватать "
106 "свободного места для размещения объединённой строки. Если размер I<dest> "
107 "мал, то поведение программы непредсказуемо; I<переполнение буфера — любимое "
108 "средство для атаки защищённых программ>."
109
110 #. type: Plain text
111 #: opensuse-leap-15-6
112 msgid "The B<strncat>() function is similar, except that"
113 msgstr "Функция B<strncat>() работает аналогичным образом, но"
114
115 #. type: IP
116 #: opensuse-leap-15-6
117 #, no-wrap
118 msgid "*"
119 msgstr "*"
120
121 #. type: Plain text
122 #: opensuse-leap-15-6
123 msgid "it will use at most I<n> bytes from I<src>; and"
124 msgstr "задействует не более I<n> первых байт строки I<src> и"
125
126 #. type: Plain text
127 #: opensuse-leap-15-6
128 msgid ""
129 "I<src> does not need to be null-terminated if it contains I<n> or more bytes."
130 msgstr ""
131 "строка I<src> может не завершаться байтом null, если в ней содержится I<n> "
132 "или более байт."
133
134 #. type: Plain text
135 #: opensuse-leap-15-6
136 msgid ""
137 "As with B<strcat>(), the resulting string in I<dest> is always null-"
138 "terminated."
139 msgstr ""
140 "Как и B<strcat>(), строка-результат в I<dest> всегда заканчивается байтом "
141 "null."
142
143 #. type: Plain text
144 #: opensuse-leap-15-6
145 msgid ""
146 "If I<src> contains I<n> or more bytes, B<strncat>() writes I<n+1> bytes to "
147 "I<dest> (I<n> from I<src> plus the terminating null byte). Therefore, the "
148 "size of I<dest> must be at least I<strlen(dest)+n+1>."
149 msgstr ""
150 "Если в I<src> содержится I<n> или более байт, то B<strncat>() записывает "
151 "I<n+1> байт в I<dest> (I<n> из I<src> плюс завершающий байт null). Поэтому "
152 "размер I<dest> должен быть не менее I<strlen(dest)+n+1>."
153
154 #. type: Plain text
155 #: opensuse-leap-15-6
156 msgid "A simple implementation of B<strncat>() might be:"
157 msgstr "Простейшей реализацией B<strncat>() может быть:"
158
159 #. type: Plain text
160 #: opensuse-leap-15-6
161 #, no-wrap
162 msgid ""
163 "char *\n"
164 "strncat(char *dest, const char *src, size_t n)\n"
165 "{\n"
166 " size_t dest_len = strlen(dest);\n"
167 " size_t i;\n"
168 msgstr ""
169 "char *\n"
170 "strncat(char *dest, const char *src, size_t n)\n"
171 "{\n"
172 " size_t dest_len = strlen(dest);\n"
173 " size_t i;\n"
174
175 #. type: Plain text
176 #: opensuse-leap-15-6
177 #, no-wrap
178 msgid ""
179 " for (i = 0 ; i E<lt> n && src[i] != \\(aq\\e0\\(aq ; i++)\n"
180 " dest[dest_len + i] = src[i];\n"
181 " dest[dest_len + i] = \\(aq\\e0\\(aq;\n"
182 msgstr ""
183 " for (i = 0 ; i E<lt> n && src[i] != \\(aq\\e0\\(aq ; i++)\n"
184 " dest[dest_len + i] = src[i];\n"
185 " dest[dest_len + i] = \\(aq\\e0\\(aq;\n"
186
187 #. type: Plain text
188 #: opensuse-leap-15-6
189 #, no-wrap
190 msgid ""
191 " return dest;\n"
192 "}\n"
193 msgstr ""
194 " return dest;\n"
195 "}\n"
196
197 #. type: SH
198 #: opensuse-leap-15-6
199 #, no-wrap
200 msgid "RETURN VALUE"
201 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
202
203 #. type: Plain text
204 #: opensuse-leap-15-6
205 msgid ""
206 "The B<strcat>() and B<strncat>() functions return a pointer to the "
207 "resulting string I<dest>."
208 msgstr ""
209 "Функции B<strcat>() и B<strncat>() возвращают указатель на скопированную "
210 "строку I<dest>."
211
212 #. type: SH
213 #: opensuse-leap-15-6
214 #, no-wrap
215 msgid "ATTRIBUTES"
216 msgstr "АТРИБУТЫ"
217
218 #. type: Plain text
219 #: opensuse-leap-15-6
220 msgid ""
221 "For an explanation of the terms used in this section, see B<attributes>(7)."
222 msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)."
223
224 #. type: tbl table
225 #: opensuse-leap-15-6
226 #, no-wrap
227 msgid "Interface"
228 msgstr "Интерфейс"
229
230 #. type: tbl table
231 #: opensuse-leap-15-6
232 #, no-wrap
233 msgid "Attribute"
234 msgstr "Атрибут"
235
236 #. type: tbl table
237 #: opensuse-leap-15-6
238 #, no-wrap
239 msgid "Value"
240 msgstr "Значение"
241
242 #. type: tbl table
243 #: opensuse-leap-15-6
244 #, no-wrap
245 msgid ""
246 "B<strcat>(),\n"
247 "B<strncat>()"
248 msgstr ""
249 "B<strcat>(),\n"
250 "B<strncat>()"
251
252 #. type: tbl table
253 #: opensuse-leap-15-6
254 #, no-wrap
255 msgid "Thread safety"
256 msgstr "Безвредность в нитях"
257
258 #. type: tbl table
259 #: opensuse-leap-15-6
260 #, no-wrap
261 msgid "MT-Safe"
262 msgstr "MT-Safe"
263
264 #. type: SH
265 #: opensuse-leap-15-6
266 #, no-wrap
267 msgid "CONFORMING TO"
268 msgstr "СООТВЕТСТВИЕ СТАНДАРТАМ"
269
270 #. type: Plain text
271 #: opensuse-leap-15-6
272 msgid "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
273 msgstr "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
274
275 #. type: SH
276 #: opensuse-leap-15-6
277 #, no-wrap
278 msgid "NOTES"
279 msgstr "ЗАМЕЧАНИЯ"
280
281 #. type: Plain text
282 #: opensuse-leap-15-6
283 msgid ""
284 "Some systems (the BSDs, Solaris, and others) provide the following function:"
285 msgstr "В некоторых системах (BSD, Solaris и других) есть следующая функция:"
286
287 #. type: Plain text
288 #: opensuse-leap-15-6
289 #, no-wrap
290 msgid " size_t strlcat(char *dest, const char *src, size_t size);\n"
291 msgstr " size_t strlcat(char *dest, const char *src, size_t size);\n"
292
293 #. https://lwn.net/Articles/506530/
294 #. type: Plain text
295 #: opensuse-leap-15-6
296 msgid ""
297 "This function appends the null-terminated string I<src> to the string "
298 "I<dest>, copying at most I<size-strlen(dest)-1> from I<src>, and adds a "
299 "terminating null byte to the result, I<unless> I<size> is less than "
300 "I<strlen(dest)>. This function fixes the buffer overrun problem of "
301 "B<strcat>(), but the caller must still handle the possibility of data loss "
302 "if I<size> is too small. The function returns the length of the string "
303 "B<strlcat>() tried to create; if the return value is greater than or equal "
304 "to I<size>, data loss occurred. If data loss matters, the caller I<must> "
305 "either check the arguments before the call, or test the function return "
306 "value. B<strlcat>() is not present in glibc and is not standardized by "
307 "POSIX, but is available on Linux via the I<libbsd> library."
308 msgstr ""
309 "Эта функция добавляет строку I<src>, оканчивающуюся null, к строке I<dest>, "
310 "копируя не более I<size-strlen(dest)-1> байт из I<src>, и добавляет к "
311 "результату конечный байт null, I<если> I<size> менее I<strlen(dest)>. Эта "
312 "функция исправляет проблему с переполнением буфера в B<strcat>(), но "
313 "вызывающий по прежнему должен рассматривать возможность потери данных, если "
314 "I<size> слишком мал. Функция возвращает длину строки, которую B<strlcat>() "
315 "пыталась создать; если возвращаемое значение больше или равно I<size>, то "
316 "произошла потеря данных. Если потеря данных критична, то вызывающий "
317 "I<должен> или проверять аргументы перед вызовом, или проверять возвращаемое "
318 "функцией значение. Функция B<strlcat>() отсутствует в glibc и не "
319 "стандартизована POSIX, но доступна в Linux в библиотеке I<libbsd>."
320
321 #. type: SH
322 #: opensuse-leap-15-6
323 #, no-wrap
324 msgid "EXAMPLE"
325 msgstr "ПРИМЕР"
326
327 #. type: Plain text
328 #: opensuse-leap-15-6
329 msgid ""
330 "Because B<strcat>() and B<strncat>() must find the null byte that "
331 "terminates the string I<dest> using a search that starts at the beginning of "
332 "the string, the execution time of these functions scales according to the "
333 "length of the string I<dest>. This can be demonstrated by running the "
334 "program below. (If the goal is to concatenate many strings to one target, "
335 "then manually copying the bytes from each source string while maintaining a "
336 "pointer to the end of the target string will provide better performance.)"
337 msgstr ""
338 "Так как B<strcat>() и B<strncat>() должны найти байт null, завершающий "
339 "строку I<dest>, начиная поиск от начала строки, время выполнения этих "
340 "функций пропорционально длине строки I<dest>. Это можно увидеть из запуска "
341 "программы, представленной ниже (если целью является склейка несколько строк "
342 "в одну, то ручное копирование байт из одного источника и управление концом "
343 "строки назначения будет более производительным)."
344
345 #. type: SS
346 #: opensuse-leap-15-6
347 #, no-wrap
348 msgid "Program source"
349 msgstr "Исходный код программы"
350
351 #. type: Plain text
352 #: opensuse-leap-15-6
353 #, no-wrap
354 msgid ""
355 "#include E<lt>string.hE<gt>\n"
356 "#include E<lt>time.hE<gt>\n"
357 "#include E<lt>stdio.hE<gt>\n"
358 msgstr ""
359 "#include E<lt>string.hE<gt>\n"
360 "#include E<lt>time.hE<gt>\n"
361 "#include E<lt>stdio.hE<gt>\n"
362
363 #. type: Plain text
364 #: opensuse-leap-15-6
365 #, fuzzy, no-wrap
366 #| msgid ""
367 #| "int\n"
368 #| "main(int argc, char *argv[])\n"
369 #| "{\n"
370 #| "#define LIM 4000000\n"
371 #| " int j;\n"
372 #| " char p[LIM + 1]; /* +1 for terminating null byte */\n"
373 #| " time_t base;\n"
374 msgid ""
375 "int\n"
376 "main(int argc, char *argv[])\n"
377 "{\n"
378 "#define LIM 4000000\n"
379 " int j;\n"
380 " char p[LIM];\n"
381 " time_t base;\n"
382 msgstr ""
383 "int\n"
384 "main(int argc, char *argv[])\n"
385 "{\n"
386 "#define LIM 4000000\n"
387 " int j;\n"
388 " char p[LIM + 1]; /* +1 для конечного байта null */\n"
389 " time_t base;\n"
390
391 #. type: Plain text
392 #: opensuse-leap-15-6
393 #, no-wrap
394 msgid ""
395 " base = time(NULL);\n"
396 " p[0] = \\(aq\\e0\\(aq;\n"
397 msgstr ""
398 " base = time(NULL);\n"
399 " p[0] = \\(aq\\e0\\(aq;\n"
400
401 #. type: Plain text
402 #: opensuse-leap-15-6
403 #, no-wrap
404 msgid ""
405 " for (j = 0; j E<lt> LIM; j++) {\n"
406 " if ((j % 10000) == 0)\n"
407 " printf(\"%d %ld\\en\", j, (long) (time(NULL) - base));\n"
408 " strcat(p, \"a\");\n"
409 " }\n"
410 "}\n"
411 msgstr ""
412 " for (j = 0; j E<lt> LIM; j++) {\n"
413 " if ((j % 10000) == 0)\n"
414 " printf(\"%d %ld\\en\", j, (long) (time(NULL) - base));\n"
415 " strcat(p, \"a\");\n"
416 " }\n"
417 "}\n"
418
419 #. type: SH
420 #: opensuse-leap-15-6
421 #, no-wrap
422 msgid "SEE ALSO"
423 msgstr "СМ. ТАКЖЕ"
424
425 #. type: Plain text
426 #: opensuse-leap-15-6
427 msgid ""
428 "B<bcopy>(3), B<memccpy>(3), B<memcpy>(3), B<strcpy>(3), B<string>(3), "
429 "B<strncpy>(3), B<wcscat>(3), B<wcsncat>(3)"
430 msgstr ""
431 "B<bcopy>(3), B<memccpy>(3), B<memcpy>(3), B<strcpy>(3), B<string>(3), "
432 "B<strncpy>(3), B<wcscat>(3), B<wcsncat>(3)"
433
434 #. type: SH
435 #: opensuse-leap-15-6
436 #, no-wrap
437 msgid "COLOPHON"
438 msgstr "ЗАМЕЧАНИЯ"
439
440 #. type: Plain text
441 #: opensuse-leap-15-6
442 msgid ""
443 "This page is part of release 4.16 of the Linux I<man-pages> project. A "
444 "description of the project, information about reporting bugs, and the latest "
445 "version of this page, can be found at \\%https://www.kernel.org/doc/man-"
446 "pages/."
447 msgstr ""
448 "Эта страница является частью проекта Linux I<man-pages> версии 4.16. "
449 "Описание проекта, информацию об ошибках и последнюю версию этой страницы "
450 "можно найти по адресу \\%https://www.kernel.org/doc/man-pages/."