1 /* $Id$ */
2 /******************************************************************************
3 * AREAFIX --- library for areafix operations
4 ******************************************************************************
5 * Copyright (C) 1998-2002
6 *
7 * Husky Delopment Team
8 *
9 * Internet: http://husky.sourceforge.net
10 *
11 * This file is part of AREAFIX.
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library/Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
22 *
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; see file COPYING. If not, write to the Free
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 * See also http://www.gnu.org
28 *****************************************************************************
29 */
30 #include <string.h>
31 #include <huskylib/huskylib.h>
32
33 /* export functions from DLL */
34 #define DLLEXPORT
35 #include <huskylib/huskyext.h>
36
37 #define __VERSION__C__
38
39 #include "version.h"
40
41 /* Check version of areafix library
42 * return zero if test failed; non-zero if passed
43 * test cvs need for DLL version only, using #include <fidoconf/cvsdate.h>
44 */
CheckAreafixVersion(int need_major,int need_minor,int need_patch,branch_t need_branch,const char * cvs)45 HUSKYEXT int CheckAreafixVersion( int need_major, int need_minor,
46 int need_patch, branch_t need_branch, const char *cvs )
47 { /* We don't need check pathlevel: see huskybse/develop-docs/ */
48
49 static
50 #include "../cvsdate.h" /* char cvs_date[]=datestring; */
51
52 if( need_major==AF_VER_MAJOR && need_minor==AF_VER_MINOR ) {
53 if(need_branch==BRANCH_CURRENT) {
54 if(need_patch) fprintf(stderr, "Areafix library: strange, current patch level can't be non-zero\n");
55 return (AF_VER_BRANCH==BRANCH_CURRENT) && !(cvs && strcmp(cvs,cvs_date));
56 }
57 else return AF_VER_BRANCH!=BRANCH_CURRENT;
58 }
59 return 0;
60 }
61