Debian Codegraph @

templates/man3/getline.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:25+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 "getline"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "getline, getdelim - delimited string input"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>stdio.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<ssize_t getline(char **restrict >I<lineptr>B<, size_t *restrict >I<n>B<,>\n"
85 "B< FILE *restrict >I<stream>B<);>\n"
86 "B<ssize_t getdelim(char **restrict >I<lineptr>B<, size_t *restrict >I<n>B<,>\n"
87 "B< int >I<delim>B<, FILE *restrict >I<stream>B<);>\n"
88 msgstr ""
89
90 #. type: Plain text
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 msgid ""
94 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
95 msgstr ""
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
99 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
100 msgid "B<getline>(), B<getdelim>():"
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid ""
108 " Since glibc 2.10:\n"
109 " _POSIX_C_SOURCE E<gt>= 200809L\n"
110 " Before glibc 2.10:\n"
111 " _GNU_SOURCE\n"
112 msgstr ""
113
114 #. type: SH
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid "DESCRIPTION"
119 msgstr ""
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "B<getline>() reads an entire line from I<stream>, storing the address of "
126 "the buffer containing the text into I<*lineptr>. The buffer is null-"
127 "terminated and includes the newline character, if one was found."
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 msgid ""
134 "If I<*lineptr> is set to NULL before the call, then B<getline>() will "
135 "allocate a buffer for storing the line. This buffer should be freed by the "
136 "user program even if B<getline>() failed."
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
144 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size. If the "
145 "buffer is not large enough to hold the line, B<getline>() resizes it with "
146 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
147 msgstr ""
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid ""
153 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
154 "to reflect the buffer address and allocated size respectively."
155 msgstr ""
156
157 #. type: Plain text
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 msgid ""
161 "B<getdelim>() works like B<getline>(), except that a line delimiter other "
162 "than newline can be specified as the I<delimiter> argument. As with "
163 "B<getline>(), a delimiter character is not added if one was not present in "
164 "the input before end of file was reached."
165 msgstr ""
166
167 #. type: SH
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 #, no-wrap
171 msgid "RETURN VALUE"
172 msgstr ""
173
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 msgid ""
178 "On success, B<getline>() and B<getdelim>() return the number of characters "
179 "read, including the delimiter character, but not including the terminating "
180 "null byte (\\[aq]\\[rs]0\\[aq]). This value can be used to handle embedded "
181 "null bytes in the line read."
182 msgstr ""
183
184 #. type: Plain text
185 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
186 #: opensuse-leap-16-1 opensuse-tumbleweed
187 msgid ""
188 "At end of file, both functions return -1 with the file stream end-of-file "
189 "indicator set. On error, both functions return -1 with the file stream "
190 "error indicator set, and I<errno> is set to indicate the error."
191 msgstr ""
192
193 #. type: Plain text
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 msgid ""
197 "If I<*lineptr> was set to NULL before the call, then the buffer should be "
198 "freed by the user program even on failure."
199 msgstr ""
200
201 #. type: SH
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 #, no-wrap
205 msgid "ERRORS"
206 msgstr ""
207
208 #. type: TP
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 #, no-wrap
212 msgid "B<EINVAL>"
213 msgstr ""
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
219 msgstr ""
220
221 #. type: TP
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<ENOMEM>"
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 msgid "Allocation or reallocation of the line buffer failed."
232 msgstr ""
233
234 #. type: SH
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "ATTRIBUTES"
239 msgstr ""
240
241 #. type: Plain text
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 msgid ""
245 "For an explanation of the terms used in this section, see B<attributes>(7)."
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 "Interface"
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 "Attribute"
260 msgstr ""
261
262 #. type: tbl table
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 #, no-wrap
266 msgid "Value"
267 msgstr ""
268
269 #. type: tbl table
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 #, no-wrap
273 msgid ".na\n"
274 msgstr ""
275
276 #. type: tbl table
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 #, no-wrap
280 msgid ".nh\n"
281 msgstr ""
282
283 #. type: tbl table
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid ""
288 "B<getline>(),\n"
289 "B<getdelim>()"
290 msgstr ""
291
292 #. type: tbl table
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 #, no-wrap
296 msgid "Thread safety"
297 msgstr ""
298
299 #. type: tbl table
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, no-wrap
303 msgid "MT-Safe"
304 msgstr ""
305
306 #. type: SH
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 #, no-wrap
310 msgid "STANDARDS"
311 msgstr ""
312
313 #. type: Plain text
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 msgid "POSIX.1-2008."
317 msgstr ""
318
319 #. type: SH
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "HISTORY"
324 msgstr ""
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid "GNU, POSIX.1-2008."
330 msgstr ""
331
332 #. type: SH
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 #, no-wrap
336 msgid "EXAMPLES"
337 msgstr ""
338
339 #. type: Plain text
340 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
341 #: opensuse-leap-16-1 opensuse-tumbleweed
342 #, no-wrap
343 msgid ""
344 "#define _GNU_SOURCE\n"
345 "#include E<lt>stdio.hE<gt>\n"
346 "#include E<lt>stdlib.hE<gt>\n"
347 "\\&\n"
348 "int\n"
349 "main(int argc, char *argv[])\n"
350 "{\n"
351 " FILE *stream;\n"
352 " char *line = NULL;\n"
353 " size_t size = 0;\n"
354 " ssize_t nread;\n"
355 "\\&\n"
356 " if (argc != 2) {\n"
357 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
358 " exit(EXIT_FAILURE);\n"
359 " }\n"
360 "\\&\n"
361 " stream = fopen(argv[1], \"r\");\n"
362 " if (stream == NULL) {\n"
363 " perror(\"fopen\");\n"
364 " exit(EXIT_FAILURE);\n"
365 " }\n"
366 "\\&\n"
367 " while ((nread = getline(&line, &size, stream)) != -1) {\n"
368 " printf(\"Retrieved line of length %zd:\\[rs]n\", nread);\n"
369 " fwrite(line, nread, 1, stdout);\n"
370 " }\n"
371 "\\&\n"
372 " free(line);\n"
373 " fclose(stream);\n"
374 " exit(EXIT_SUCCESS);\n"
375 "}\n"
376 msgstr ""
377
378 #. SRC END
379 #. type: SH
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, no-wrap
383 msgid "SEE ALSO"
384 msgstr ""
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
390 msgstr ""
391
392 #. type: TH
393 #: debian-trixie
394 #, no-wrap
395 msgid "2024-06-15"
396 msgstr ""
397
398 #. type: TH
399 #: debian-trixie
400 #, no-wrap
401 msgid "Linux man-pages 6.9.1"
402 msgstr ""
403
404 #. type: Plain text
405 #: debian-trixie
406 msgid "Standard C library (I<libc>, I<-lc>)"
407 msgstr ""
408
409 #. type: Plain text
410 #: debian-trixie
411 msgid ""
412 "Both functions return -1 on failure to read a line (including end-of-file "
413 "condition). In the event of a failure, I<errno> is set to indicate the "
414 "error."
415 msgstr ""
416
417 #. type: Plain text
418 #: debian-trixie
419 #, no-wrap
420 msgid ""
421 "#define _GNU_SOURCE\n"
422 "#include E<lt>stdio.hE<gt>\n"
423 "#include E<lt>stdlib.hE<gt>\n"
424 "\\&\n"
425 "int\n"
426 "main(int argc, char *argv[])\n"
427 "{\n"
428 " FILE *stream;\n"
429 " char *line = NULL;\n"
430 " size_t len = 0;\n"
431 " ssize_t nread;\n"
432 "\\&\n"
433 " if (argc != 2) {\n"
434 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
435 " exit(EXIT_FAILURE);\n"
436 " }\n"
437 "\\&\n"
438 " stream = fopen(argv[1], \"r\");\n"
439 " if (stream == NULL) {\n"
440 " perror(\"fopen\");\n"
441 " exit(EXIT_FAILURE);\n"
442 " }\n"
443 "\\&\n"
444 " while ((nread = getline(&line, &len, stream)) != -1) {\n"
445 " printf(\"Retrieved line of length %zd:\\[rs]n\", nread);\n"
446 " fwrite(line, nread, 1, stdout);\n"
447 " }\n"
448 "\\&\n"
449 " free(line);\n"
450 " fclose(stream);\n"
451 " exit(EXIT_SUCCESS);\n"
452 "}\n"
453 msgstr ""
454
455 #. type: TH
456 #: fedora-44 fedora-rawhide
457 #, no-wrap
458 msgid "2024-12-20"
459 msgstr ""
460
461 #. type: TH
462 #: fedora-44 fedora-rawhide
463 #, no-wrap
464 msgid "Linux man-pages 6.13"
465 msgstr ""
466
467 #. type: TH
468 #: mageia-cauldron
469 #, no-wrap
470 msgid "Linux man-pages 6.17"
471 msgstr ""
472
473 #. type: TH
474 #: opensuse-leap-16-1 opensuse-tumbleweed
475 #, no-wrap
476 msgid "Linux man-pages (unreleased)"
477 msgstr ""