leafnode  1.12.0
About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.
  Fossies Dox: leafnode-1.12.0.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

critmem.c File Reference
#include "critmem.h"
#include <stdlib.h>
#include <syslog.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for critmem.c:

Go to the source code of this file.

Macros

#define _DEFAULT_SOURCE
 
#define _GNU_SOURCE
 
#define _BSD_SOURCE
 

Functions

static void barf (const char *func, size_t size, const char *message)
 
char * critmalloc (size_t size, const char *message)
 
char * critrealloc (char *a, size_t size, const char *message)
 
char * critstrdup (const char *source, const char *message)
 
void critsyslog (int do_log)
 

Variables

static char ebuf [1024]
 
static int log_syslog = 1
 

Macro Definition Documentation

◆ _BSD_SOURCE

#define _BSD_SOURCE

Definition at line 33 of file critmem.c.

◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE

Definition at line 26 of file critmem.c.

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 30 of file critmem.c.

Function Documentation

◆ barf()

static void barf ( const char *  func,
size_t  size,
const char *  message 
)
static

Definition at line 47 of file critmem.c.

References ebuf, log_syslog, and snprintf.

Referenced by critmalloc(), critrealloc(), migrate(), and th().

◆ critmalloc()

◆ critrealloc()

char * critrealloc ( char *  a,
size_t  size,
const char *  message 
)

Definition at line 79 of file critmem.c.

References barf().

Referenced by getfoldedline(), getgroup(), getline(), getxoverline(), main(), mergegroups(), readtodelim(), and validateactive().

◆ critstrdup()

◆ critsyslog()

void critsyslog ( int  do_log)

Definition at line 101 of file critmem.c.

References log_syslog.

Referenced by main().

Variable Documentation

◆ ebuf

char ebuf[1024]
static

Definition at line 43 of file critmem.c.

Referenced by barf().

◆ log_syslog

int log_syslog = 1
static

Definition at line 45 of file critmem.c.

Referenced by barf(), and critsyslog().