Debian Codegraph @

templates/man3/stpncpy.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:45+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "stpncpy"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
28 #, no-wrap
29 msgid "2026-02-25"
30 msgstr ""
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr ""
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr ""
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid ""
49 "stpncpy, strncpy - fill a fixed-size buffer with non-null bytes from a "
50 "string, padding with null bytes as needed"
51 msgstr ""
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr ""
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr ""
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr ""
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>string.hE<gt>>\n"
78 msgstr ""
79
80 #. type: Plain text
81 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
82 #: opensuse-tumbleweed
83 #, no-wrap
84 msgid ""
85 "B<char *strncpy(>size_t dsize;\n"
86 "B< char >I<dst>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
87 "B< size_t >I<dsize>B<);>\n"
88 "B<char *stpncpy(>size_t dsize;\n"
89 "B< char >I<dst>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n"
90 "B< size_t >I<dsize>B<);>\n"
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid ""
97 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
98 msgstr ""
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 msgid "B<stpncpy>():"
104 msgstr ""
105
106 #. type: Plain text
107 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
108 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
109 #, no-wrap
110 msgid ""
111 " Since glibc 2.10:\n"
112 " _POSIX_C_SOURCE E<gt>= 200809L\n"
113 " Before glibc 2.10:\n"
114 " _GNU_SOURCE\n"
115 msgstr ""
116
117 #. type: SH
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, no-wrap
121 msgid "DESCRIPTION"
122 msgstr ""
123
124 #. type: Plain text
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 msgid ""
128 "These functions copy non-null bytes from the string pointed to by I<src> "
129 "into the array pointed to by I<dst>. If the source has too few non-null "
130 "bytes to fill the destination, the functions pad the destination with "
131 "trailing null bytes. If the destination buffer, limited by its size, isn't "
132 "large enough to hold the copy, the resulting character sequence is "
133 "truncated. For the difference between the two functions, see RETURN VALUE."
134 msgstr ""
135
136 #. type: TP
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid "B<strncpy>()"
141 msgstr ""
142
143 #. type: Plain text
144 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
145 msgid "It is equivalent to"
146 msgstr ""
147
148 #. type: Plain text
149 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
150 #, no-wrap
151 msgid "stpncpy(dst, src, dsize), dst\n"
152 msgstr ""
153
154 #. type: TP
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 #, no-wrap
158 msgid "B<stpncpy>()"
159 msgstr ""
160
161 #. type: Plain text
162 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
163 #, no-wrap
164 msgid ""
165 "memset(mempcpy(dst, src, strnlen(src, dsize)), \\[aq]\\[rs]0\\[aq],\n"
166 " dsize - strnlen(src, dsize))\n"
167 msgstr ""
168
169 #. type: SH
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 #, no-wrap
173 msgid "RETURN VALUE"
174 msgstr ""
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid "returns I<dst>."
180 msgstr ""
181
182 #. type: Plain text
183 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
184 #: opensuse-tumbleweed
185 msgid ""
186 "returns a pointer to one past the last non-null character written, that is, "
187 "I<dest\\ +\\ strnlen(src,\\ n)>."
188 msgstr ""
189
190 #. type: SH
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "ATTRIBUTES"
195 msgstr ""
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "For an explanation of the terms used in this section, see B<attributes>(7)."
202 msgstr ""
203
204 #. type: tbl table
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, no-wrap
208 msgid "Interface"
209 msgstr ""
210
211 #. type: tbl table
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 #, no-wrap
215 msgid "Attribute"
216 msgstr ""
217
218 #. type: tbl table
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid "Value"
223 msgstr ""
224
225 #. type: tbl table
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid ".na\n"
230 msgstr ""
231
232 #. type: tbl table
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 #, no-wrap
236 msgid ".nh\n"
237 msgstr ""
238
239 #. type: tbl table
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid ""
244 "B<stpncpy>(),\n"
245 "B<strncpy>()"
246 msgstr ""
247
248 #. type: tbl table
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "Thread safety"
253 msgstr ""
254
255 #. type: tbl table
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 #, no-wrap
259 msgid "MT-Safe"
260 msgstr ""
261
262 #. type: SH
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 #, no-wrap
266 msgid "STANDARDS"
267 msgstr ""
268
269 #. type: Plain text
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 msgid "C11, POSIX.1-2008."
273 msgstr ""
274
275 #. type: Plain text
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 msgid "POSIX.1-2008."
279 msgstr ""
280
281 #. type: SH
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 #, no-wrap
285 msgid "HISTORY"
286 msgstr ""
287
288 #. type: Plain text
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 msgid "C89, POSIX.1-2001, SVr4, 4.3BSD."
292 msgstr ""
293
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid "glibc 1.07. POSIX.1-2008."
298 msgstr ""
299
300 #. type: SH
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 #, no-wrap
304 msgid "CAVEATS"
305 msgstr ""
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 msgid ""
311 "The name of these functions is confusing. These functions produce a null-"
312 "padded character sequence, not a string (see B<string_copying>(7)). For "
313 "example:"
314 msgstr ""
315
316 #. type: Plain text
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid ""
321 "strncpy(buf, \"1\", 5); // { \\[aq]1\\[aq], 0, 0, 0, 0 }\n"
322 "strncpy(buf, \"1234\", 5); // { \\[aq]1\\[aq], \\[aq]2\\[aq], \\[aq]3\\[aq], \\[aq]4\\[aq], 0 }\n"
323 "strncpy(buf, \"12345\", 5); // { \\[aq]1\\[aq], \\[aq]2\\[aq], \\[aq]3\\[aq], \\[aq]4\\[aq], \\[aq]5\\[aq] }\n"
324 "strncpy(buf, \"123456\", 5); // { \\[aq]1\\[aq], \\[aq]2\\[aq], \\[aq]3\\[aq], \\[aq]4\\[aq], \\[aq]5\\[aq] }\n"
325 msgstr ""
326
327 #. type: Plain text
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 msgid ""
331 "It's impossible to distinguish truncation by the result of the call, from a "
332 "character sequence that just fits the destination buffer; truncation should "
333 "be detected by comparing the length of the input string with the size of the "
334 "destination buffer."
335 msgstr ""
336
337 #. type: Plain text
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 msgid ""
341 "If you're going to use this function in chained calls, it would be useful to "
342 "develop a similar function that accepts a pointer to the end (one after the "
343 "last element) of the destination buffer instead of its size."
344 msgstr ""
345
346 #. type: SH
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 #, no-wrap
350 msgid "EXAMPLES"
351 msgstr ""
352
353 #. type: Plain text
354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
356 #, no-wrap
357 msgid ""
358 "#include E<lt>err.hE<gt>\n"
359 "#include E<lt>stdio.hE<gt>\n"
360 "#include E<lt>stdlib.hE<gt>\n"
361 "#include E<lt>string.hE<gt>\n"
362 "\\&\n"
363 "int\n"
364 "main(void)\n"
365 "{\n"
366 " char *p;\n"
367 " char buf1[20];\n"
368 " char buf2[20];\n"
369 " size_t len;\n"
370 "\\&\n"
371 " if (sizeof(buf2) E<lt> strlen(\"Hello world!\"))\n"
372 " errx(\"strncpy: truncating character sequence\");\n"
373 " strncpy(buf2, \"Hello world!\", sizeof(buf2));\n"
374 " len = strnlen(buf2, sizeof(buf2));\n"
375 "\\&\n"
376 " printf(\"[len = %zu]: \", len);\n"
377 " fwrite(buf2, 1, len, stdout);\n"
378 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
379 "\\&\n"
380 " if (sizeof(buf1) E<lt> strlen(\"Hello world!\"))\n"
381 " errx(\"stpncpy: truncating character sequence\");\n"
382 " p = stpncpy(buf1, \"Hello world!\", sizeof(buf1));\n"
383 " len = p - buf1;\n"
384 "\\&\n"
385 " printf(\"[len = %zu]: \", len);\n"
386 " fwrite(buf1, 1, len, stdout);\n"
387 " putchar(\\[aq]\\[rs]n\\[aq]);\n"
388 "\\&\n"
389 " exit(EXIT_SUCCESS);\n"
390 "}\n"
391 msgstr ""
392
393 #. SRC END
394 #. type: SH
395 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
396 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
397 #, no-wrap
398 msgid "SEE ALSO"
399 msgstr ""
400
401 #. type: Plain text
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 msgid "B<wcpncpy>(3), B<string_copying>(7)"
405 msgstr ""
406
407 #. type: TH
408 #: debian-trixie
409 #, no-wrap
410 msgid "2024-06-15"
411 msgstr ""
412
413 #. type: TH
414 #: debian-trixie
415 #, no-wrap
416 msgid "Linux man-pages 6.9.1"
417 msgstr ""
418
419 #. type: Plain text
420 #: debian-trixie
421 msgid "Standard C library (I<libc>, I<-lc>)"
422 msgstr ""
423
424 #. type: Plain text
425 #: debian-trixie fedora-44 fedora-rawhide
426 #, no-wrap
427 msgid ""
428 "B<char *strncpy(char >I<dst>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
429 "B< size_t >I<dsize>B<);>\n"
430 "B<char *stpncpy(char >I<dst>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n"
431 "B< size_t >I<dsize>B<);>\n"
432 msgstr ""
433
434 #. type: Plain text
435 #: debian-trixie fedora-44 fedora-rawhide mageia-cauldron
436 msgid "An implementation of these functions might be:"
437 msgstr ""
438
439 #. type: Plain text
440 #: debian-trixie fedora-44 fedora-rawhide mageia-cauldron
441 #, no-wrap
442 msgid ""
443 "char *\n"
444 "strncpy(char *restrict dst, const char *restrict src, size_t dsize)\n"
445 "{\n"
446 " stpncpy(dst, src, dsize);\n"
447 " return dst;\n"
448 "}\n"
449 "\\&\n"
450 "char *\n"
451 "stpncpy(char *restrict dst, const char *restrict src, size_t dsize)\n"
452 "{\n"
453 " size_t dlen;\n"
454 "\\&\n"
455 " dlen = strnlen(src, dsize);\n"
456 " return memset(mempcpy(dst, src, dlen), 0, dsize - dlen);\n"
457 "}\n"
458 msgstr ""
459
460 #. type: Plain text
461 #: debian-trixie fedora-44 fedora-rawhide
462 msgid ""
463 "returns a pointer to one after the last character in the destination "
464 "character sequence."
465 msgstr ""
466
467 #. type: TH
468 #: fedora-44 fedora-rawhide
469 #, no-wrap
470 msgid "2024-07-23"
471 msgstr ""
472
473 #. type: TH
474 #: fedora-44 fedora-rawhide
475 #, no-wrap
476 msgid "Linux man-pages 6.13"
477 msgstr ""
478
479 #. type: TH
480 #: mageia-cauldron
481 #, no-wrap
482 msgid "2026-01-06"
483 msgstr ""
484
485 #. type: TH
486 #: mageia-cauldron
487 #, no-wrap
488 msgid "Linux man-pages 6.17"
489 msgstr ""
490
491 #. type: TH
492 #: opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid "Linux man-pages (unreleased)"
495 msgstr ""