X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Flogging.h;fp=src%2Flogging.h;h=e3fe9450a844f49e9a093e7914b9f89470bc2265;hb=9dffc9de96014e24d1fd1030a79317ba34c504e8;hp=0000000000000000000000000000000000000000;hpb=42c9226fc71c19af4d755c6900120bfa07f7e99c;p=routino diff --git a/src/logging.h b/src/logging.h new file mode 100644 index 0000000..e3fe945 --- /dev/null +++ b/src/logging.h @@ -0,0 +1,61 @@ +/*************************************** + $Header: /home/amb/routino/src/RCS/logging.h,v 1.2 2010/11/13 14:50:33 amb Exp $ + + Header file for logging function prototypes + + Part of the Routino routing software. + ******************/ /****************** + This file Copyright 2008-2010 Andrew M. Bishop + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + ***************************************/ + + +#ifndef LOGGING_H +#define LOGGING_H /*+ To stop multiple inclusions. +*/ + +#include + + +/* Variables */ + +extern int option_loggable; + + +/* In logging.c */ + +#ifdef __GNUC__ + +void printf_first(const char *format, ...) __attribute__ ((format (printf, 1, 2))); +void printf_middle(const char *format, ...) __attribute__ ((format (printf, 1, 2))); +void printf_last(const char *format, ...) __attribute__ ((format (printf, 1, 2))); + +void fprintf_first(FILE *file,const char *format, ...) __attribute__ ((format (printf, 2, 3))); +void fprintf_middle(FILE *file,const char *format, ...) __attribute__ ((format (printf, 2, 3))); +void fprintf_last(FILE *file,const char *format, ...) __attribute__ ((format (printf, 2, 3))); + +#else + +void printf_first(const char *format, ...); +void printf_middle(const char *format, ...); +void printf_last(const char *format, ...); + +void fprintf_first(FILE *file,const char *format, ...); +void fprintf_middle(FILE *file,const char *format, ...); +void fprintf_last(FILE *file,const char *format, ...); + +#endif + + +#endif /* LOGGING_H */