Logo Search packages:      
Sourcecode: nbsmtp version File versions  Download package

util.c File Reference


Detailed Description

Util functions for string management.

Author:
Fernando J. Pereda <ferdy@ferdyx.org>

Ricardo Cervera Navarro <ricardo@zonasiete.org>

This is part of nbsmtp. nbsmtp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

nbsmtp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with nbsmtp; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

See COPYING for details.

Definition in file util.c.

#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include <time.h>
#include <string.h>
#include <stdarg.h>
#include "util.h"

Go to the source code of this file.

Functions

void arpadate (char *buf)
 Generates a date with the RFC822 (ARPA Internet Text) format.
void log_msg (int priority, char *format,...)
 Logs a message to syslog, checks for debug if the priority is LOG_DEBUG.
void print_help (char *prog)
 Prints information on how to use nbsmtp and some Copyright info.
void print_usage (char *prog)
 Prints an usage string.
void str_free (string_t *buffer)
 Frees a string_t element.
void str_incr_space (string_t *buffer, int incr)
 Increases memory for a string_t.
void str_init (string_t *buffer, int size)
 Initialize a string_t element.

Variables

int debug = 0
 Wheter we should accept LOG_DEBUG messages or not. If debug = 2 we will print all messages to stdout.


Generated by  Doxygen 1.6.0   Back to index