#ifndef __CHANGE_LOG_H #define __CHANGE_LOG_H /*------------------------------------------------------------------------- * Copyright (c) 2001-2002 Kenneth W. Sodemann (stuffle@charter.net) *------------------------------------------------------------------------- * change_log * * Synopsis: * Create the project ChangeLog files * * $Id: change_log.h,v 1.1 2003/03/09 20:59:11 stuffle Exp $ * * This program 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. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to * Free Software Foundation, Inc. * 59 Temple Place, Suite 330 * Boston, MA 02111-1307 USA * *------------------------------------------------------------------------- */ /*! \file change_log.h \brief Project ChangeLog related routines. These routines are used to generate project ChangeLog files. In actuallity, the files are probably best used as templates for the real ChangeLog file. \author Kenneth W. Sodemann (stuffle@charter.net) $Revision: 1.1 $ $Date: 2003/03/09 20:59:11 $ */ /* * __BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use __END_DECLS at * the end of C declarations. */ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif /* * __P is a macro used to wrap function prototypes, so that compilers * that don't understand ANSI C prototypes still work, and ANSI C * compilers can issue warnings about type mismatches. */ #undef __P #if defined (__STDC__) || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(WIN32) || defined(__cplusplus) # define __P(protos) protos #else # define __P(protos) () #endif __BEGIN_DECLS /*! \fn gint create_change_log (PGconn *conn, gchar *file_path, gint prj_num) \brief Create the ChangeLog file for a given project. \param conn Pointer to the database connection. \param file_path The name of the ChangeLog file to create, including full path and file name. The directories in the path to the file must exist. If the file itself exists, it will be overwritten. \param prj_num Primary key of the project to create the ChangeLog for. \retval 0 Success \retval -1 There was an error generating the ChangeLog. Check errno. Check the system log for details on the error. \retval -2 Some kind of SQL error. Usually this is an internal error that needs to be reported to the library maintainer. However, it could also occur in cases where the database is not available for some reason. Change the system log for details. */ gint create_change_log __P((PGconn *conn, gchar *file_path, gint prj_num)); __END_DECLS #endif