.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" From: @(#)err.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD: src/lib/libc/gen/err.3,v 1.11.2.5 2001/08/17 15:42:32 ru Exp $ .\" .\" 2011-09-10, mtk, Converted from mdoc to man macros .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH ERR 3 "9 giugno 2020" Linux "Manuale del programmatore di Linux" .SH NOME err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- messaggi di errore formattati .SH SINTASSI .nf \fB#include \fP .PP \fBvoid err(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid errx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid warn(const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid warnx(const char *\fP\fIfmt\fP\fB, ...);\fP \fB#include \fP .PP \fBvoid verr(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid verrx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid vwarn(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid vwarnx(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .fi .SH DESCRIZIONE Le famiglie di funzioni \fBerr\fP() e \fBwarn\fP() visualizzano un messaggio di errore formattato sull'uscita dello standard error. In ogni caso vengono stampati l'ultimo componente del nome del programma, un carattere di due punti, e uno spazio. Se l'argomento \fIfmt\fP non è NULL viene emesso un messaggio di errore formattato in stile \fBprintf\fP(3). L'output è concluso da un carattere newline. .PP Le funzioni \fBerr\fP(), \fBverr\fP(), \fBwarn\fP() e \fBvwarn\fP() aggiungono un messaggio di errore ottenuto da \fBstrerror\fP(3) basato sulla variabile globale \fIerrno\fP, preceduto da un altro ":" e da uno spazio a meno che l'argomento \fIfmt\fP sia NULL. .PP Le funzioni \fBerrx\fP() e \fBwarnx\fP() non aggiungono un messaggio di errore. .PP Le funzioni \fBerr\fP(), \fBverr\fP(), \fBerrx\fP() e \fBverrx\fP() non ritornano, ma escono con il valore dell'argomento \fIeval\fP. .SH ATTRIBUTI Per la spiegazione dei termini usati in questa sezione, vedere \fBattributes\fP(7). .TS allbox; lbw17 lb lb l l l. Interfaccia Attributo Valore T{ \fBerr\fP(), \fBerrx\fP(), .br \fBwarn\fP(), \fBwarnx\fP(), .br \fBverr\fP(), \fBverrx\fP(), .br \fBvwarn\fP(), \fBvwarnx\fP() T} Thread safety MT\-Safe locale .TE .sp 1 .SH "CONFORME A" .\" .SH HISTORY .\" The .\" .BR err () .\" and .\" .BR warn () .\" functions first appeared in .\" 4.4BSD. Queste funzioni sono estensioni BSD non standard. .SH ESEMPI Mostra la stringa di informazione attuale \fIerrno\fP ed esce: .PP .in +4n .EX p = malloc(size); if (p == NULL) err(EXIT_FAILURE, NULL); fd = open(file_name, O_RDONLY, 0); if (fd == \-1) err(EXIT_FAILURE, "%s", file_name); .EE .in .PP Visualizza un messaggio di errore ed esce: .PP .in +4n .EX if (tm.tm_hour < START_TIME) errx(EXIT_FAILURE, "too early, wait until %s", start_time_string); .EE .in .PP Avvisa di un errore: .PP .in +4n .EX fd = open(raw_device, O_RDONLY, 0); if (fd == \-1) warnx("%s: %s: trying the block device", raw_device, strerror(errno)); fd = open(block_device, O_RDONLY, 0); if (fd == \-1) err(EXIT_FAILURE, "%s", block_device); .EE .in .SH "VEDERE ANCHE" \fBerror\fP(3), \fBexit\fP(3), \fBperror\fP(3), \fBprintf\fP(3), \fBstrerror\fP(3) .SH COLOPHON Questa pagina fa parte del rilascio 5.10 del progetto Linux \fIman\-pages\fP. Una descrizione del progetto, le istruzioni per la segnalazione degli errori, e l'ultima versione di questa pagina si trovano su \%https://www.kernel.org/doc/man\-pages/. .SH TRADUZIONE La traduzione italiana di questa pagina di manuale è stata creata da Giulio Daprelà , Elisabetta Galli e Marco Curreli . Questa traduzione è documentazione libera; leggere la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Versione 3 .UE o successiva per le condizioni di copyright. Non ci assumiamo alcuna responsabilità. Per segnalare errori nella traduzione di questa pagina di manuale inviare un messaggio a .MT pluto-ildp@lists.pluto.it .ME .