1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
|
# Russian translation of manpages
# This file is distributed under the same license as the manpages-l10n package.
# Copyright © of this file:
# Alexander Golubev <fatzer2@gmail.com>, 2018.
# Azamat Hackimov <azamat.hackimov@gmail.com>, 2011, 2014-2016.
# Hotellook, 2014.
# Nikita <zxcvbnm3230@mail.ru>, 2014.
# Spiros Georgaras <sng@hellug.gr>, 2016.
# Vladislav <ivladislavefimov@gmail.com>, 2015.
# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019.
# Иван Павлов <pavia00@gmail.com>, 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 <yuray@komyakino.ru>\n"
"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\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 E<lt>string.hE<gt>>\n"
msgstr "B<#include E<lt>string.hE<gt>>\n"
#. type: Plain text
#: opensuse-leap-15-6
#, no-wrap
msgid "B<char *strcat(char *>I<dest>B<, const char *>I<src>B<);>\n"
msgstr "B<char *strcat(char *>I<dest>B<, const char *>I<src>B<);>\n"
#. type: Plain text
#: opensuse-leap-15-6
#, no-wrap
msgid "B<char *strncat(char *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
msgstr "B<char *strncat(char *>I<dest>B<, const char *>I<src>B<, size_t >I<n>B<);>\n"
#. type: SH
#: opensuse-leap-15-6
#, no-wrap
msgid "DESCRIPTION"
msgstr "ОПИСАНИЕ"
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"The B<strcat>() function appends the I<src> string to the I<dest> string, "
"overwriting the terminating null byte (\\(aq\\e0\\(aq) at the end of "
"I<dest>, and then adds a terminating null byte. The strings may not "
"overlap, and the I<dest> string must have enough space for the result. If "
"I<dest> is not large enough, program behavior is unpredictable; I<buffer "
"overruns are a favorite avenue for attacking secure programs>."
msgstr ""
"Функция B<strcat>() добавляет строку I<src> к строке I<dest>, перезаписывая "
"байт null (\\(aq\\e0\\(aq) в конце I<dest> и добавляет завершающий байт "
"null. Строки не могут перекрываться, а в строке I<dest> должно хватать "
"свободного места для размещения объединённой строки. Если размер I<dest> "
"мал, то поведение программы непредсказуемо; I<переполнение буфера — любимое "
"средство для атаки защищённых программ>."
#. type: Plain text
#: opensuse-leap-15-6
msgid "The B<strncat>() function is similar, except that"
msgstr "Функция B<strncat>() работает аналогичным образом, но"
#. type: IP
#: opensuse-leap-15-6
#, no-wrap
msgid "*"
msgstr "*"
#. type: Plain text
#: opensuse-leap-15-6
msgid "it will use at most I<n> bytes from I<src>; and"
msgstr "задействует не более I<n> первых байт строки I<src> и"
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"I<src> does not need to be null-terminated if it contains I<n> or more bytes."
msgstr ""
"строка I<src> может не завершаться байтом null, если в ней содержится I<n> "
"или более байт."
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"As with B<strcat>(), the resulting string in I<dest> is always null-"
"terminated."
msgstr ""
"Как и B<strcat>(), строка-результат в I<dest> всегда заканчивается байтом "
"null."
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"If I<src> contains I<n> or more bytes, B<strncat>() writes I<n+1> bytes to "
"I<dest> (I<n> from I<src> plus the terminating null byte). Therefore, the "
"size of I<dest> must be at least I<strlen(dest)+n+1>."
msgstr ""
"Если в I<src> содержится I<n> или более байт, то B<strncat>() записывает "
"I<n+1> байт в I<dest> (I<n> из I<src> плюс завершающий байт null). Поэтому "
"размер I<dest> должен быть не менее I<strlen(dest)+n+1>."
#. type: Plain text
#: opensuse-leap-15-6
msgid "A simple implementation of B<strncat>() might be:"
msgstr "Простейшей реализацией B<strncat>() может быть:"
#. 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<lt> 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<lt> 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<strcat>() and B<strncat>() functions return a pointer to the "
"resulting string I<dest>."
msgstr ""
"Функции B<strcat>() и B<strncat>() возвращают указатель на скопированную "
"строку I<dest>."
#. 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<attributes>(7)."
msgstr "Описание терминов данного раздела смотрите в B<attributes>(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<strcat>(),\n"
"B<strncat>()"
msgstr ""
"B<strcat>(),\n"
"B<strncat>()"
#. 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<src> to the string "
"I<dest>, copying at most I<size-strlen(dest)-1> from I<src>, and adds a "
"terminating null byte to the result, I<unless> I<size> is less than "
"I<strlen(dest)>. This function fixes the buffer overrun problem of "
"B<strcat>(), but the caller must still handle the possibility of data loss "
"if I<size> is too small. The function returns the length of the string "
"B<strlcat>() tried to create; if the return value is greater than or equal "
"to I<size>, data loss occurred. If data loss matters, the caller I<must> "
"either check the arguments before the call, or test the function return "
"value. B<strlcat>() is not present in glibc and is not standardized by "
"POSIX, but is available on Linux via the I<libbsd> library."
msgstr ""
"Эта функция добавляет строку I<src>, оканчивающуюся null, к строке I<dest>, "
"копируя не более I<size-strlen(dest)-1> байт из I<src>, и добавляет к "
"результату конечный байт null, I<если> I<size> менее I<strlen(dest)>. Эта "
"функция исправляет проблему с переполнением буфера в B<strcat>(), но "
"вызывающий по прежнему должен рассматривать возможность потери данных, если "
"I<size> слишком мал. Функция возвращает длину строки, которую B<strlcat>() "
"пыталась создать; если возвращаемое значение больше или равно I<size>, то "
"произошла потеря данных. Если потеря данных критична, то вызывающий "
"I<должен> или проверять аргументы перед вызовом, или проверять возвращаемое "
"функцией значение. Функция B<strlcat>() отсутствует в glibc и не "
"стандартизована POSIX, но доступна в Linux в библиотеке I<libbsd>."
#. type: SH
#: opensuse-leap-15-6
#, no-wrap
msgid "EXAMPLE"
msgstr "ПРИМЕР"
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"Because B<strcat>() and B<strncat>() must find the null byte that "
"terminates the string I<dest> 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<dest>. 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<strcat>() и B<strncat>() должны найти байт null, завершающий "
"строку I<dest>, начиная поиск от начала строки, время выполнения этих "
"функций пропорционально длине строки I<dest>. Это можно увидеть из запуска "
"программы, представленной ниже (если целью является склейка несколько строк "
"в одну, то ручное копирование байт из одного источника и управление концом "
"строки назначения будет более производительным)."
#. type: SS
#: opensuse-leap-15-6
#, no-wrap
msgid "Program source"
msgstr "Исходный код программы"
#. type: Plain text
#: opensuse-leap-15-6
#, no-wrap
msgid ""
"#include E<lt>string.hE<gt>\n"
"#include E<lt>time.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
msgstr ""
"#include E<lt>string.hE<gt>\n"
"#include E<lt>time.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\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<lt> 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<lt> 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<bcopy>(3), B<memccpy>(3), B<memcpy>(3), B<strcpy>(3), B<string>(3), "
"B<strncpy>(3), B<wcscat>(3), B<wcsncat>(3)"
msgstr ""
"B<bcopy>(3), B<memccpy>(3), B<memcpy>(3), B<strcpy>(3), B<string>(3), "
"B<strncpy>(3), B<wcscat>(3), B<wcsncat>(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<man-pages> 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<man-pages> версии 4.16. "
"Описание проекта, информацию об ошибках и последнюю версию этой страницы "
"можно найти по адресу \\%https://www.kernel.org/doc/man-pages/."
|