.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 1995 Jim Van Zandt .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Corrected prototype and include, aeb, 990927 .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH lsearch 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE lfind, lsearch \- búsqueda líneal en una matriz .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBvoid *lfind(const void \fP\fIkey\fP\fB[.\fP\fIsize\fP\fB], const void \fP\fIbase\fP\fB[.\fP\fIsize\fP\fB * .\fP\fInmemb\fP\fB],\fP \fB size_t *\fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB,\fP \fB int(*\fP\fIcompar\fP\fB)(const void [.\fP\fIsize\fP\fB], const void [.\fP\fIsize\fP\fB]));\fP \fBvoid *lsearch(const void \fP\fIkey\fP\fB[.\fP\fIsize\fP\fB], void \fP\fIbase\fP\fB[.\fP\fIsize\fP\fB * .\fP\fInmemb\fP\fB],\fP \fB size_t *\fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB,\fP \fB int(*\fP\fIcompar\fP\fB)(const void [.\fP\fIsize\fP\fB], const void [.\fP\fIsize\fP\fB]));\fP .fi .SH DESCRIPCIÓN \fBlfind\fP() y \fBlsearch\fP() realizan una búsqueda líneal de \fIkey\fP en la matriz \fIbase\fP que tiene \fI*nmemb\fP elementos de \fIsize\fP bytes cada uno. Se espera que la función de comparación a que hace referencia \fIcompar\fP tenga dos argumentos que apuntan al objeto \fIkey\fP y a un miembro de la matriz, en ese orden, y que devuelva cero si el objeto \fIkey\fP coincide con el miembro de la matriz, y distinto de cero en cualquier otro caso. .PP If \fBlsearch\fP() does not find a matching element, then the \fIkey\fP object is inserted at the end of the table, and \fI*nmemb\fP is incremented. In particular, one should know that a matching element exists, or that more room is available. .SH "VALOR DEVUELTO" \fBlfind\fP() devuelve un puntero a un miembro coincidente de la matriz, o NULL si no hubo coincidencias. \fBlsearch()\fP devuelve un puntero a un miembro coincidente de la matriz, o al nuevo miembro añadido si no hubo coincidencias. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBlfind\fP(), \fBlsearch\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, SVr4, 4.3BSD. libc\-4.6.27. .SH ERRORES The naming is unfortunate. .SH "VÉASE TAMBIÉN" \fBbsearch\fP(3), \fBhsearch\fP(3), \fBtsearch\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Vicente Pastor Gómez y Juan Piernas . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .