| 1 |
# French translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. |
| 5 |
# Stéphan Rafin <[email protected]>, 2002. |
| 6 |
# Thierry Vignaud <[email protected]>, 1999, 2002. |
| 7 |
# François Micaux, 2002. |
| 8 |
# Alain Portal <[email protected]>, 2003-2008. |
| 9 |
# Jean-Philippe Guérard <[email protected]>, 2005-2006. |
| 10 |
# Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007. |
| 11 |
# Julien Cristau <[email protected]>, 2006-2007. |
| 12 |
# Thomas Huriaux <[email protected]>, 2006-2008. |
| 13 |
# Nicolas François <[email protected]>, 2006-2008. |
| 14 |
# Florentin Duneau <[email protected]>, 2006-2010. |
| 15 |
# Simon Paillard <[email protected]>, 2006. |
| 16 |
# Denis Barbier <[email protected]>, 2006, 2010. |
| 17 |
# David Prévot <[email protected]>, 2010, 2012. |
| 18 |
# Jean-Baptiste Holcroft <[email protected]>, 2018. |
| 19 |
# Grégoire Scano <[email protected]>, 2019. |
| 20 |
msgid "" |
| 21 |
msgstr "" |
| 22 |
"Project-Id-Version: manpages-l10n 4.25.0\n" |
| 23 |
"POT-Creation-Date: 2026-06-05 06:19+0200\n" |
| 24 |
"PO-Revision-Date: 2025-01-27 17:29+0100\n" |
| 25 |
"Last-Translator: Grégoire Scano <[email protected]>\n" |
| 26 |
"Language-Team: French <[email protected]>\n" |
| 27 |
"Language: fr\n" |
| 28 |
"MIME-Version: 1.0\n" |
| 29 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 30 |
"Content-Transfer-Encoding: 8bit\n" |
| 31 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 32 |
"X-Generator: Lokalize 22.12.3\n" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 36 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 37 |
#, no-wrap |
| 38 |
msgid "bsearch" |
| 39 |
msgstr "bsearch" |
| 40 |
|
| 41 |
#. type: TH |
| 42 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 43 |
#: opensuse-tumbleweed |
| 44 |
#, no-wrap |
| 45 |
msgid "2026-02-10" |
| 46 |
msgstr "10 février 2026" |
| 47 |
|
| 48 |
#. type: TH |
| 49 |
#: archlinux debian-unstable |
| 50 |
#, no-wrap |
| 51 |
msgid "Linux man-pages 6.18" |
| 52 |
msgstr "Pages du manuel de Linux 6.18" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
#, no-wrap |
| 58 |
msgid "NAME" |
| 59 |
msgstr "NOM" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
msgid "bsearch - binary search of a sorted array" |
| 65 |
msgstr "bsearch - Recherche dichotomique dans un tableau trié" |
| 66 |
|
| 67 |
#. type: SH |
| 68 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 69 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 70 |
#, no-wrap |
| 71 |
msgid "LIBRARY" |
| 72 |
msgstr "BIBLIOTHÈQUE" |
| 73 |
|
| 74 |
#. type: Plain text |
| 75 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 76 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 78 |
msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)" |
| 79 |
|
| 80 |
#. type: SH |
| 81 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 82 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 83 |
#, no-wrap |
| 84 |
msgid "SYNOPSIS" |
| 85 |
msgstr "SYNOPSIS" |
| 86 |
|
| 87 |
#. type: Plain text |
| 88 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 89 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 90 |
#, no-wrap |
| 91 |
msgid "B<#include E<lt>stdlib.hE<gt>>\n" |
| 92 |
msgstr "B<#include E<lt>stdlib.hE<gt>>\n" |
| 93 |
|
| 94 |
#. type: Plain text |
| 95 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 96 |
#: opensuse-tumbleweed |
| 97 |
#, fuzzy, no-wrap |
| 98 |
#| msgid "" |
| 99 |
#| "B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<n>B<],>\n" |
| 100 |
#| "B< size_t >I<n>B<, size_t >I<size>B<,>\n" |
| 101 |
#| "B< typeof(int (const void [.>I<size>B<], const void [.>I<size>B<]))>\n" |
| 102 |
#| "B< *>I<compar>B<);>\n" |
| 103 |
msgid "" |
| 104 |
"B<void *bsearch(>size_t n, size_t size;\n" |
| 105 |
"B< const void >I<key>B<[>I<size>B<], const void >I<base>B<[>I<size>B< * >I<n>B<],>\n" |
| 106 |
"B< size_t >I<n>B<, size_t >I<size>B<,>\n" |
| 107 |
"B< typeof(int (const void [>I<size>B<], const void [>I<size>B<]))>\n" |
| 108 |
"B< *>I<compar>B<);>\n" |
| 109 |
msgstr "" |
| 110 |
"B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<n>B<],>\n" |
| 111 |
"B< size_t >I<n>B<, size_t >I<size>B<,>\n" |
| 112 |
"B< typeof(int (const void [.>I<size>B<], const void [.>I<size>B<]))>\n" |
| 113 |
"B< *>I<compar>B<);>\n" |
| 114 |
|
| 115 |
#. type: SH |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 118 |
#, no-wrap |
| 119 |
msgid "DESCRIPTION" |
| 120 |
msgstr "DESCRIPTION" |
| 121 |
|
| 122 |
#. type: Plain text |
| 123 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 124 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 125 |
msgid "" |
| 126 |
"The B<bsearch>() function searches an array of I<n> objects, the initial " |
| 127 |
"member of which is pointed to by I<base>, for a member that matches the " |
| 128 |
"object pointed to by I<key>. The size of each member of the array is " |
| 129 |
"specified by I<size>." |
| 130 |
msgstr "" |
| 131 |
"La fonction B<bsearch>() recherche l'objet correspondant à I<key>, dans un " |
| 132 |
"tableau de I<n> objets, commençant à l'adresse I<base>. La taille de chaque " |
| 133 |
"élément du tableau est indiquée dans I<size>." |
| 134 |
|
| 135 |
#. type: Plain text |
| 136 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 137 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 138 |
msgid "" |
| 139 |
"The contents of the array should be in ascending sorted order according to " |
| 140 |
"the comparison function referenced by I<compar>. The I<compar> routine is " |
| 141 |
"expected to have two arguments which point to the I<key> object and to an " |
| 142 |
"array member, in that order, and should return an integer less than, equal " |
| 143 |
"to, or greater than zero if the I<key> object is found, respectively, to be " |
| 144 |
"less than, to match, or be greater than the array member." |
| 145 |
msgstr "" |
| 146 |
"Le contenu du tableau doit être trié en ordre croissant par rapport à la " |
| 147 |
"fonction de comparaison référencée par I<compar>. La routine I<compar> doit " |
| 148 |
"être capable de recevoir deux arguments, le premier pointant sur l'objet " |
| 149 |
"I<key>, et le second sur un élément du tableau (l'ordre des arguments est " |
| 150 |
"toujours respecté par B<bsearch>). Cette routine doit retourner une valeur " |
| 151 |
"entière respectivement inférieure, égale ou supérieure à zéro si l'objet " |
| 152 |
"I<key> est inférieur, égal, ou supérieur à l'élément du tableau." |
| 153 |
|
| 154 |
#. type: SH |
| 155 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 156 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 157 |
#, no-wrap |
| 158 |
msgid "RETURN VALUE" |
| 159 |
msgstr "VALEUR RENVOYÉE" |
| 160 |
|
| 161 |
#. type: Plain text |
| 162 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 163 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 164 |
msgid "" |
| 165 |
"The B<bsearch>() function returns a pointer to a matching member of the " |
| 166 |
"array, or NULL if no match is found. If there are multiple elements that " |
| 167 |
"match the key, the element returned is unspecified." |
| 168 |
msgstr "" |
| 169 |
"La fonction B<bsearch>() renvoie un pointeur sur l'élément du tableau " |
| 170 |
"correspondant à celui recherché, ou NULL si aucun élément ne correspond. Si " |
| 171 |
"plusieurs éléments du tableau correspondent à la clé, celui qui est renvoyé " |
| 172 |
"n'est pas spécifié." |
| 173 |
|
| 174 |
#. type: SH |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
#, no-wrap |
| 178 |
msgid "ATTRIBUTES" |
| 179 |
msgstr "ATTRIBUTS" |
| 180 |
|
| 181 |
#. type: Plain text |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
msgid "" |
| 185 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 186 |
msgstr "" |
| 187 |
"Pour une explication des termes utilisés dans cette section, consulter " |
| 188 |
"B<attributes>(7)." |
| 189 |
|
| 190 |
#. type: tbl table |
| 191 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 192 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 193 |
#, no-wrap |
| 194 |
msgid "Interface" |
| 195 |
msgstr "Interface" |
| 196 |
|
| 197 |
#. type: tbl table |
| 198 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 199 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 200 |
#, no-wrap |
| 201 |
msgid "Attribute" |
| 202 |
msgstr "Attribut" |
| 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 "Value" |
| 209 |
msgstr "Valeur" |
| 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 ".na\n" |
| 216 |
msgstr ".na\n" |
| 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 ".nh\n" |
| 223 |
msgstr ".nh\n" |
| 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 "B<bsearch>()" |
| 230 |
msgstr "B<bsearch>()" |
| 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 "Thread safety" |
| 237 |
msgstr "Sécurité des threads" |
| 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 "MT-Safe" |
| 244 |
msgstr "MT-Safe" |
| 245 |
|
| 246 |
#. type: SH |
| 247 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 248 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 249 |
#, no-wrap |
| 250 |
msgid "STANDARDS" |
| 251 |
msgstr "NORMES" |
| 252 |
|
| 253 |
#. type: Plain text |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 256 |
msgid "C11, POSIX.1-2008." |
| 257 |
msgstr "C11, POSIX.1-2008." |
| 258 |
|
| 259 |
#. type: SH |
| 260 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 261 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
#, no-wrap |
| 263 |
msgid "HISTORY" |
| 264 |
msgstr "HISTORIQUE" |
| 265 |
|
| 266 |
#. type: Plain text |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
msgid "POSIX.1-2001, C89, C99, SVr4, 4.3BSD." |
| 270 |
msgstr "POSIX.1-2001, C89, C99, SVr4, 4.3BSD." |
| 271 |
|
| 272 |
#. type: SH |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "EXAMPLES" |
| 277 |
msgstr "EXEMPLES" |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
msgid "" |
| 283 |
"The example below first sorts an array of structures using B<qsort>(3), then " |
| 284 |
"retrieves desired elements using B<bsearch>()." |
| 285 |
msgstr "" |
| 286 |
"L'exemple suivant trie d'abord un tableau de structures en utilisant " |
| 287 |
"B<qsort>(3), puis retrouve les éléments désirés en utilisant B<bsearch>()." |
| 288 |
|
| 289 |
#. type: Plain text |
| 290 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 291 |
#: opensuse-tumbleweed |
| 292 |
#, fuzzy, no-wrap |
| 293 |
#| msgid "" |
| 294 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 295 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 296 |
#| "#include E<lt>string.hE<gt>\n" |
| 297 |
#| "\\&\n" |
| 298 |
#| "#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))\n" |
| 299 |
#| "\\&\n" |
| 300 |
#| "struct mi {\n" |
| 301 |
#| " int nr;\n" |
| 302 |
#| " const char *name;\n" |
| 303 |
#| "};\n" |
| 304 |
#| "\\&\n" |
| 305 |
#| "static struct mi months[] = {\n" |
| 306 |
#| " { 1, \"jan\" }, { 2, \"feb\" }, { 3, \"mar\" }, { 4, \"apr\" },\n" |
| 307 |
#| " { 5, \"may\" }, { 6, \"jun\" }, { 7, \"jul\" }, { 8, \"aug\" },\n" |
| 308 |
#| " { 9, \"sep\" }, {10, \"oct\" }, {11, \"nov\" }, {12, \"dec\" }\n" |
| 309 |
#| "};\n" |
| 310 |
#| "\\&\n" |
| 311 |
#| "static int\n" |
| 312 |
#| "compmi(const void *m1, const void *m2)\n" |
| 313 |
#| "{\n" |
| 314 |
#| " const struct mi *mi1 = m1;\n" |
| 315 |
#| " const struct mi *mi2 = m2;\n" |
| 316 |
#| "\\&\n" |
| 317 |
#| " return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n" |
| 318 |
#| "}\n" |
| 319 |
#| "\\&\n" |
| 320 |
#| "int\n" |
| 321 |
#| "main(int argc, char *argv[])\n" |
| 322 |
#| "{\n" |
| 323 |
#| " qsort(months, ARRAY_SIZE(months), sizeof(months[0]), compmi);\n" |
| 324 |
#| " for (size_t i = 1; i E<lt> argc; i++) {\n" |
| 325 |
#| " struct mi key;\n" |
| 326 |
#| " struct mi *res;\n" |
| 327 |
#| "\\&\n" |
| 328 |
#| " key.name = argv[i];\n" |
| 329 |
#| " res = bsearch(&key, months, ARRAY_SIZE(months),\n" |
| 330 |
#| " sizeof(months[0]), compmi);\n" |
| 331 |
#| " if (res == NULL)\n" |
| 332 |
#| " printf(\"\\[aq]%s\\[aq]: unknown month\\[rs]n\", argv[i]);\n" |
| 333 |
#| " else\n" |
| 334 |
#| " printf(\"%s: month #%d\\[rs]n\", res-E<gt>name, res-E<gt>nr);\n" |
| 335 |
#| " }\n" |
| 336 |
#| " exit(EXIT_SUCCESS);\n" |
| 337 |
#| "}\n" |
| 338 |
msgid "" |
| 339 |
"#include E<lt>stdcountof.hE<gt>\n" |
| 340 |
"#include E<lt>stdio.hE<gt>\n" |
| 341 |
"#include E<lt>stdlib.hE<gt>\n" |
| 342 |
"#include E<lt>string.hE<gt>\n" |
| 343 |
"\\&\n" |
| 344 |
"struct mi {\n" |
| 345 |
" int nr;\n" |
| 346 |
" const char *name;\n" |
| 347 |
"};\n" |
| 348 |
"\\&\n" |
| 349 |
"static struct mi months[] = {\n" |
| 350 |
" { 1, \"jan\" }, { 2, \"feb\" }, { 3, \"mar\" }, { 4, \"apr\" },\n" |
| 351 |
" { 5, \"may\" }, { 6, \"jun\" }, { 7, \"jul\" }, { 8, \"aug\" },\n" |
| 352 |
" { 9, \"sep\" }, {10, \"oct\" }, {11, \"nov\" }, {12, \"dec\" }\n" |
| 353 |
"};\n" |
| 354 |
"\\&\n" |
| 355 |
"static int\n" |
| 356 |
"compmi(const void *m1, const void *m2)\n" |
| 357 |
"{\n" |
| 358 |
" const struct mi *mi1 = m1;\n" |
| 359 |
" const struct mi *mi2 = m2;\n" |
| 360 |
"\\&\n" |
| 361 |
" return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n" |
| 362 |
"}\n" |
| 363 |
"\\&\n" |
| 364 |
"int\n" |
| 365 |
"main(int argc, char *argv[])\n" |
| 366 |
"{\n" |
| 367 |
" qsort(months, countof(months), sizeof(months[0]), compmi);\n" |
| 368 |
" for (size_t i = 1; i E<lt> argc; i++) {\n" |
| 369 |
" struct mi key;\n" |
| 370 |
" struct mi *res;\n" |
| 371 |
"\\&\n" |
| 372 |
" key.name = argv[i];\n" |
| 373 |
" res = bsearch(&key, months, countof(months),\n" |
| 374 |
" sizeof(months[0]), compmi);\n" |
| 375 |
" if (res == NULL)\n" |
| 376 |
" printf(\"\\[aq]%s\\[aq]: unknown month\\[rs]n\", argv[i]);\n" |
| 377 |
" else\n" |
| 378 |
" printf(\"%s: month #%d\\[rs]n\", res-E<gt>name, res-E<gt>nr);\n" |
| 379 |
" }\n" |
| 380 |
" exit(EXIT_SUCCESS);\n" |
| 381 |
"}\n" |
| 382 |
msgstr "" |
| 383 |
"#include E<lt>stdio.hE<gt>\n" |
| 384 |
"#include E<lt>stdlib.hE<gt>\n" |
| 385 |
"#include E<lt>string.hE<gt>\n" |
| 386 |
"\\&\n" |
| 387 |
"#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))\n" |
| 388 |
"\\&\n" |
| 389 |
"struct mi {\n" |
| 390 |
" int nr;\n" |
| 391 |
" const char *name;\n" |
| 392 |
"};\n" |
| 393 |
"\\&\n" |
| 394 |
"static struct mi months[] = {\n" |
| 395 |
" { 1, \"jan\" }, { 2, \"feb\" }, { 3, \"mar\" }, { 4, \"apr\" },\n" |
| 396 |
" { 5, \"may\" }, { 6, \"jun\" }, { 7, \"jul\" }, { 8, \"aug\" },\n" |
| 397 |
" { 9, \"sep\" }, {10, \"oct\" }, {11, \"nov\" }, {12, \"dec\" }\n" |
| 398 |
"};\n" |
| 399 |
"\\&\n" |
| 400 |
"static int\n" |
| 401 |
"compmi(const void *m1, const void *m2)\n" |
| 402 |
"{\n" |
| 403 |
" const struct mi *mi1 = m1;\n" |
| 404 |
" const struct mi *mi2 = m2;\n" |
| 405 |
"\\&\n" |
| 406 |
" return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n" |
| 407 |
"}\n" |
| 408 |
"\\&\n" |
| 409 |
"int\n" |
| 410 |
"main(int argc, char *argv[])\n" |
| 411 |
"{\n" |
| 412 |
" qsort(months, ARRAY_SIZE(months), sizeof(months[0]), compmi);\n" |
| 413 |
" for (size_t i = 1; i E<lt> argc; i++) {\n" |
| 414 |
" struct mi key;\n" |
| 415 |
" struct mi *res;\n" |
| 416 |
"\\&\n" |
| 417 |
" key.name = argv[i];\n" |
| 418 |
" res = bsearch(&key, months, ARRAY_SIZE(months),\n" |
| 419 |
" sizeof(months[0]), compmi);\n" |
| 420 |
" if (res == NULL)\n" |
| 421 |
" printf(\"\\[aq]%s\\[aq]: unknown month\\[rs]n\", argv[i]);\n" |
| 422 |
" else\n" |
| 423 |
" printf(\"%s: month #%d\\[rs]n\", res-E<gt>name, res-E<gt>nr);\n" |
| 424 |
" }\n" |
| 425 |
" exit(EXIT_SUCCESS);\n" |
| 426 |
"}\n" |
| 427 |
|
| 428 |
#. SRC END |
| 429 |
#. type: SH |
| 430 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 431 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 432 |
#, no-wrap |
| 433 |
msgid "SEE ALSO" |
| 434 |
msgstr "VOIR AUSSI" |
| 435 |
|
| 436 |
#. type: Plain text |
| 437 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 438 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 439 |
msgid "B<hsearch>(3), B<lsearch>(3), B<qsort>(3), B<tsearch>(3)" |
| 440 |
msgstr "B<hsearch>(3), B<lsearch>(3), B<qsort>(3), B<tsearch>(3)" |
| 441 |
|
| 442 |
#. type: TH |
| 443 |
#: debian-trixie |
| 444 |
#, no-wrap |
| 445 |
msgid "2024-06-15" |
| 446 |
msgstr "15 juin 2024" |
| 447 |
|
| 448 |
#. type: TH |
| 449 |
#: debian-trixie |
| 450 |
#, no-wrap |
| 451 |
msgid "Linux man-pages 6.9.1" |
| 452 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 453 |
|
| 454 |
#. type: Plain text |
| 455 |
#: debian-trixie |
| 456 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 457 |
msgstr "Bibliothèque C standard (I<libc>, I<-lc>)" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: debian-trixie |
| 461 |
#, no-wrap |
| 462 |
msgid "" |
| 463 |
"B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<nmemb>B<],>\n" |
| 464 |
"B< size_t >I<nmemb>B<, size_t >I<size>B<,>\n" |
| 465 |
"B< int (*>I<compar>B<)(const void [.>I<size>B<], const void [.>I<size>B<]));>\n" |
| 466 |
msgstr "" |
| 467 |
"B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<nmemb>B<],>\n" |
| 468 |
"B< size_t >I<nmemb>B<, size_t >I<size>B<,>\n" |
| 469 |
"B< int (*>I<compar>B<)(const void [.>I<size>B<], const void [.>I<size>B<]));>\n" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: debian-trixie |
| 473 |
msgid "" |
| 474 |
"The B<bsearch>() function searches an array of I<nmemb> objects, the " |
| 475 |
"initial member of which is pointed to by I<base>, for a member that matches " |
| 476 |
"the object pointed to by I<key>. The size of each member of the array is " |
| 477 |
"specified by I<size>." |
| 478 |
msgstr "" |
| 479 |
"La fonction B<bsearch>() recherche l'objet correspondant à I<key>, dans un " |
| 480 |
"tableau de I<nmemb> objets, commençant à l'adresse I<base>. La taille de " |
| 481 |
"chaque élément du tableau est indiquée dans I<size>." |
| 482 |
|
| 483 |
#. type: Plain text |
| 484 |
#: debian-trixie fedora-44 fedora-rawhide |
| 485 |
#, no-wrap |
| 486 |
msgid "" |
| 487 |
"#include E<lt>stdio.hE<gt>\n" |
| 488 |
"#include E<lt>stdlib.hE<gt>\n" |
| 489 |
"#include E<lt>string.hE<gt>\n" |
| 490 |
"\\&\n" |
| 491 |
"#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))\n" |
| 492 |
"\\&\n" |
| 493 |
"struct mi {\n" |
| 494 |
" int nr;\n" |
| 495 |
" const char *name;\n" |
| 496 |
"};\n" |
| 497 |
"\\&\n" |
| 498 |
"static struct mi months[] = {\n" |
| 499 |
" { 1, \"jan\" }, { 2, \"feb\" }, { 3, \"mar\" }, { 4, \"apr\" },\n" |
| 500 |
" { 5, \"may\" }, { 6, \"jun\" }, { 7, \"jul\" }, { 8, \"aug\" },\n" |
| 501 |
" { 9, \"sep\" }, {10, \"oct\" }, {11, \"nov\" }, {12, \"dec\" }\n" |
| 502 |
"};\n" |
| 503 |
"\\&\n" |
| 504 |
"static int\n" |
| 505 |
"compmi(const void *m1, const void *m2)\n" |
| 506 |
"{\n" |
| 507 |
" const struct mi *mi1 = m1;\n" |
| 508 |
" const struct mi *mi2 = m2;\n" |
| 509 |
"\\&\n" |
| 510 |
" return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n" |
| 511 |
"}\n" |
| 512 |
"\\&\n" |
| 513 |
"int\n" |
| 514 |
"main(int argc, char *argv[])\n" |
| 515 |
"{\n" |
| 516 |
" qsort(months, ARRAY_SIZE(months), sizeof(months[0]), compmi);\n" |
| 517 |
" for (size_t i = 1; i E<lt> argc; i++) {\n" |
| 518 |
" struct mi key;\n" |
| 519 |
" struct mi *res;\n" |
| 520 |
"\\&\n" |
| 521 |
" key.name = argv[i];\n" |
| 522 |
" res = bsearch(&key, months, ARRAY_SIZE(months),\n" |
| 523 |
" sizeof(months[0]), compmi);\n" |
| 524 |
" if (res == NULL)\n" |
| 525 |
" printf(\"\\[aq]%s\\[aq]: unknown month\\[rs]n\", argv[i]);\n" |
| 526 |
" else\n" |
| 527 |
" printf(\"%s: month #%d\\[rs]n\", res-E<gt>name, res-E<gt>nr);\n" |
| 528 |
" }\n" |
| 529 |
" exit(EXIT_SUCCESS);\n" |
| 530 |
"}\n" |
| 531 |
msgstr "" |
| 532 |
"#include E<lt>stdio.hE<gt>\n" |
| 533 |
"#include E<lt>stdlib.hE<gt>\n" |
| 534 |
"#include E<lt>string.hE<gt>\n" |
| 535 |
"\\&\n" |
| 536 |
"#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))\n" |
| 537 |
"\\&\n" |
| 538 |
"struct mi {\n" |
| 539 |
" int nr;\n" |
| 540 |
" const char *name;\n" |
| 541 |
"};\n" |
| 542 |
"\\&\n" |
| 543 |
"static struct mi months[] = {\n" |
| 544 |
" { 1, \"jan\" }, { 2, \"feb\" }, { 3, \"mar\" }, { 4, \"apr\" },\n" |
| 545 |
" { 5, \"may\" }, { 6, \"jun\" }, { 7, \"jul\" }, { 8, \"aug\" },\n" |
| 546 |
" { 9, \"sep\" }, {10, \"oct\" }, {11, \"nov\" }, {12, \"dec\" }\n" |
| 547 |
"};\n" |
| 548 |
"\\&\n" |
| 549 |
"static int\n" |
| 550 |
"compmi(const void *m1, const void *m2)\n" |
| 551 |
"{\n" |
| 552 |
" const struct mi *mi1 = m1;\n" |
| 553 |
" const struct mi *mi2 = m2;\n" |
| 554 |
"\\&\n" |
| 555 |
" return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n" |
| 556 |
"}\n" |
| 557 |
"\\&\n" |
| 558 |
"int\n" |
| 559 |
"main(int argc, char *argv[])\n" |
| 560 |
"{\n" |
| 561 |
" qsort(months, ARRAY_SIZE(months), sizeof(months[0]), compmi);\n" |
| 562 |
" for (size_t i = 1; i E<lt> argc; i++) {\n" |
| 563 |
" struct mi key;\n" |
| 564 |
" struct mi *res;\n" |
| 565 |
"\\&\n" |
| 566 |
" key.name = argv[i];\n" |
| 567 |
" res = bsearch(&key, months, ARRAY_SIZE(months),\n" |
| 568 |
" sizeof(months[0]), compmi);\n" |
| 569 |
" if (res == NULL)\n" |
| 570 |
" printf(\"\\[aq]%s\\[aq]: unknown month\\[rs]n\", argv[i]);\n" |
| 571 |
" else\n" |
| 572 |
" printf(\"%s: month #%d\\[rs]n\", res-E<gt>name, res-E<gt>nr);\n" |
| 573 |
" }\n" |
| 574 |
" exit(EXIT_SUCCESS);\n" |
| 575 |
"}\n" |
| 576 |
|
| 577 |
#. type: TH |
| 578 |
#: fedora-44 fedora-rawhide |
| 579 |
#, no-wrap |
| 580 |
msgid "2024-12-13" |
| 581 |
msgstr "13 décembre 2024" |
| 582 |
|
| 583 |
#. type: TH |
| 584 |
#: fedora-44 fedora-rawhide |
| 585 |
#, no-wrap |
| 586 |
msgid "Linux man-pages 6.13" |
| 587 |
msgstr "Pages du manuel de Linux 6.13" |
| 588 |
|
| 589 |
#. type: Plain text |
| 590 |
#: fedora-44 fedora-rawhide |
| 591 |
#, no-wrap |
| 592 |
msgid "" |
| 593 |
"B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<n>B<],>\n" |
| 594 |
"B< size_t >I<n>B<, size_t >I<size>B<,>\n" |
| 595 |
"B< typeof(int (const void [.>I<size>B<], const void [.>I<size>B<]))>\n" |
| 596 |
"B< *>I<compar>B<);>\n" |
| 597 |
msgstr "" |
| 598 |
"B<void *bsearch(const void >I<key>B<[.>I<size>B<], const void >I<base>B<[.>I<size>B< * .>I<n>B<],>\n" |
| 599 |
"B< size_t >I<n>B<, size_t >I<size>B<,>\n" |
| 600 |
"B< typeof(int (const void [.>I<size>B<], const void [.>I<size>B<]))>\n" |
| 601 |
"B< *>I<compar>B<);>\n" |
| 602 |
|
| 603 |
#. type: TH |
| 604 |
#: mageia-cauldron |
| 605 |
#, no-wrap |
| 606 |
msgid "Linux man-pages 6.17" |
| 607 |
msgstr "Pages du manuel de Linux 6.17" |
| 608 |
|
| 609 |
#. type: TH |
| 610 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 611 |
#, no-wrap |
| 612 |
msgid "Linux man-pages (unreleased)" |
| 613 |
msgstr "Pages du manuel de Linux (non publiées)" |