libSPF v1.0: macro.h Source File

Main Page | Data Structures | File List | Data Fields | Globals | Search for

# macro.h

Go to the documentation of this file.

    00001 /* libspf - Sender Policy Framework library
    00002 *
    00003 *  ANSI C implementation of spf-draft-200405.txt
    00004 *
    00005 *  Author: James Couzens <jcouzens@codeshare.ca>
    00006 *  Author: Sean Comeau   <scomeau@obscurity.org>
    00007 *
    00008 *  FILE: macro.h
    00009 *  DESC: macro functions header file
    00010 *
    00011 *  License:
    00012 *
    00013 *  The libspf Software License, Version 1.0
    00014 *
    00015 *  Copyright (c) 2004 James Couzens & Sean Comeau  All rights
    00016 *  reserved.
    00017 *
    00018 *  Redistribution and use in source and binary forms, with or without
    00019 *  modification, are permitted provided that the following conditions
    00020 *  are met:
    00021 *
    00022 *  1. Redistributions of source code must retain the above copyright
    00023 *     notice, this list of conditions and the following disclaimer.
    00024 *
    00025 *  2. Redistributions in binary form must reproduce the above copyright
    00026 *     notice, this list of conditions and the following disclaimer in
    00027 *     the documentation and/or other materials provided with the
    00028 *     distribution.
    00029 *
    00030 *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    00031 *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00032 *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    00033 *  DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS MAKING USE OF THIS LICESEN
    00034 *  OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00035 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00036 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    00037 *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00038 *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    00039 *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    00040 *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    00041 *  SUCH DAMAGE.
    00042 *
    00043 */
    00044
    00045
    00046 #ifndef _MACRO_H
    00047 #define _MACRO_H 1
    00048
    00049 #include <stdio.h>        /* stdin / stdout */
    00050 #include <stdlib.h>       /* malloc / free */
    00051 #include <string.h>       /* strstr / strdup */
    00052 #include <ctype.h>        /* isupper / tolower */
    00053
    00054 #include "../../config.h" /* autoconf */
    00055 #include "spf.h"
    00056
    00057 #ifdef  HAVE__BEGIN_DECLS
    00058 __BEGIN_DECLS
    00059 #else
    00060 # ifdef __cplusplus
    00061 extern "C" {
    00062 # endif /* __cplusplus */
    00063 #endif /* HAVE__BEGIN_DECLS */
    00064
    00065
    00066 char      *MACRO_expand(peer_info_t *peer_info, const char *s);
    00067 char      *MACRO_process(peer_info_t *peer_info, char *macro, const size_t size);
    00068 char      *MACRO_eatmore(char *macro, char *s);
    00069 SPF_BOOL  MACRO_addbuf(strbuf_t *master, char *s, const size_t size);
    00070
    00071
    00072 #ifdef  HAVE__BEGIN_DECLS
    00073 __END_DECLS /* _MACRO_H */
    00074 #else
    00075 # ifdef __cplusplus
    00076 }
    00077 # endif /* __cplusplus */
    00078 #endif /* HAVE__BEGIN_DECLS */
    00079
    00080 #endif /* _MACRO_H */
    00081
    00082 /* end macro.h */