gsasl  1.10.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL). Development version.
  Fossies Dox: gsasl-1.10.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

error.c File Reference
#include <config.h>
#include "error.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getprogname.h"
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for error.c:

Go to the source code of this file.

Macros

#define _(String)   String
 
#define program_name   getprogname ()
 

Functions

this configure time declaration test was not run int strerror_r (int errnum, char *buf, size_t buflen)
 
static int is_open (int fd)
 
static void flush_stdout (void)
 
static void print_errno_message (int errnum)
 
static void _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
 
void error (int status, int errnum, const char *message,...)
 
void error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message,...)
 

Variables

void(* error_print_progname )(void)
 
unsigned int error_message_count
 
int error_one_per_line
 

Macro Definition Documentation

◆ _

#define _ (   String)    String

Definition at line 54 of file error.c.

◆ program_name

#define program_name   getprogname ()

Definition at line 122 of file error.c.

Function Documentation

◆ _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD()

static void _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD ( ,
 
)
static

◆ error()

void error ( int  status,
int  errnum,
const char *  message,
  ... 
)

◆ error_at_line()

void error_at_line ( int  status,
int  errnum,
const char *  file_name,
unsigned int  line_number,
const char *  message,
  ... 
)

◆ flush_stdout()

static void flush_stdout ( void  )
static

Definition at line 150 of file error.c.

References is_open(), and STDOUT_FILENO.

Referenced by error(), and error_at_line().

◆ is_open()

static int is_open ( int  fd)
static

Definition at line 132 of file error.c.

References fcntl().

Referenced by flush_stdout().

◆ print_errno_message()

static void print_errno_message ( int  errnum)
static

Definition at line 175 of file error.c.

References _, NULL, and strerror().

Referenced by _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD().

◆ strerror_r()

this configure time declaration test was not run int strerror_r ( int  errnum,
char *  buf,
size_t  buflen 
)

Definition at line 144 of file strerror_r.c.

References buf, gl_lock_lock, gl_lock_unlock, msg, NULL, safe_copy(), snprintf(), STACKBUF_LEN, strerror(), and strerror_override.

Referenced by perror().

Variable Documentation

◆ error_message_count

unsigned int error_message_count

Definition at line 63 of file error.c.

Referenced by _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD().

◆ error_one_per_line

int error_one_per_line

Definition at line 336 of file error.c.

Referenced by error_at_line().

◆ error_print_progname

void(* error_print_progname) (void) ( void  )

Definition at line 60 of file error.c.

Referenced by error(), and error_at_line().