.TH "util.h" 3 "23 Oct 2003" "libnewmail" \" -*- nroff -*- .ad l .nh .SH NAME util.h \- Some utility functions which may be used by plugins. .SH SYNOPSIS .br .PP \fC#include 'newmail.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "char * \fBnm_chomp\fP (char *ln)" .br .RI "\fIRemove all newline and carriage return characters from the end of the string.\fP" .ti -1c .RI "char * \fBnm_specials\fP (const char *format)" .br .RI "\fIReplace all special characters like '%h' by their respective meanings.\fP" .ti -1c .RI "char * \fBnm_strdup\fP (const char *s)" .br .RI "\fILike libc's strdup() but uses \fBnm_malloc()\fP for memory allocation.\fP" .ti -1c .RI "void \fBnm_error\fP (enum nm_error en, const char *exp)" .br .RI "\fISet the current error condition to the given values.\fP" .in -1c .SH "DETAILED DESCRIPTION" .PP Some utility functions which may be used by plugins. .PP .PP .PP Definition in file \fButil.h\fP. .SH "FUNCTION DOCUMENTATION" .PP .SS "char* nm_chomp (char * ln)" .PP Remove all newline and carriage return characters from the end of the string. .PP \fBParameters: \fP .in +1c .TP \fB\fIln\fP\fP The string to chomp .PP \fBReturns: \fP .in +1c The same string, chomped .SS "void nm_error (enum nm_error en, const char * exp)" .PP Set the current error condition to the given values. .PP \fBParameters: \fP .in +1c .TP \fB\fIen\fP\fP Specifies the error condition to set .TP \fB\fIexp\fP\fP Specifies an explanation for the error, if sensible. May be NULL. NM_ERROR_EXPLANATION is set iff exp is not NULL. .SS "char* nm_specials (const char * format)" .PP Replace all special characters like '%h' by their respective meanings. .PP \fBParameters: \fP .in +1c .TP \fB\fIformat\fP\fP The format string to expand .PP \fBReturns: \fP .in +1c A pointer to a static memory region containing the expanded string .SS "char* nm_strdup (const char * s)" .PP Like libc's strdup() but uses \fBnm_malloc()\fP for memory allocation. .PP \fBParameters: \fP .in +1c .TP \fB\fIs\fP\fP The string to duplicate .PP \fBReturns: \fP .in +1c A pointer to a newly allocated memory block containing the copied string .SH "AUTHOR" .PP Generated automatically by Doxygen for libnewmail from the source code.