1258945Sroberto
2280849Scy/**
3280849Scy * \file project.h
4280849Scy *
5280849Scy *  This file is part of AutoOpts, a companion to AutoGen.
6280849Scy *  AutoOpts is free software.
7285169Scy *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
8280849Scy *
9280849Scy *  AutoOpts is available under any one of two licenses.  The license
10280849Scy *  in use must be one of these two and the choice is under the control
11280849Scy *  of the user of the license.
12280849Scy *
13280849Scy *   The GNU Lesser General Public License, version 3 or later
14280849Scy *      See the files "COPYING.lgplv3" and "COPYING.gplv3"
15280849Scy *
16280849Scy *   The Modified Berkeley Software Distribution License
17280849Scy *      See the file "COPYING.mbsd"
18280849Scy *
19280849Scy *  These files have the following sha256 sums:
20280849Scy *
21280849Scy *  8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95  COPYING.gplv3
22280849Scy *  4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b  COPYING.lgplv3
23280849Scy *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
24280849Scy */
25280849Scy
26258945Sroberto#ifndef AUTOGEN_PROJECT_H
27258945Sroberto#define AUTOGEN_PROJECT_H
28258945Sroberto
29258945Sroberto#include "config.h"
30280849Scy#include "compat/compat.h"
31280849Scy#include "ag-char-map.h"
32258945Sroberto
33258945Sroberto/*
34258945Sroberto *  Procedure success codes
35258945Sroberto *
36258945Sroberto *  USAGE:  define procedures to return "tSuccess".  Test their results
37258945Sroberto *          with the SUCCEEDED, FAILED and HADGLITCH macros.
38258945Sroberto *
39258945Sroberto *  Microsoft sticks its nose into user space here, so for Windows' sake,
40258945Sroberto *  make sure all of these are undefined.
41258945Sroberto */
42258945Sroberto#undef  SUCCESS
43258945Sroberto#undef  FAILURE
44258945Sroberto#undef  PROBLEM
45258945Sroberto#undef  SUCCEEDED
46258945Sroberto#undef  SUCCESSFUL
47258945Sroberto#undef  FAILED
48258945Sroberto#undef  HADGLITCH
49258945Sroberto
50258945Sroberto#define SUCCESS  ((tSuccess) 0)
51258945Sroberto#define FAILURE  ((tSuccess)-1)
52258945Sroberto#define PROBLEM  ((tSuccess) 1)
53258945Sroberto
54258945Srobertotypedef int tSuccess;
55258945Sroberto
56258945Sroberto#define SUCCEEDED(p)    ((p) == SUCCESS)
57258945Sroberto#define SUCCESSFUL(p)   SUCCEEDED(p)
58258945Sroberto#define FAILED(p)       ((p) <  SUCCESS)
59258945Sroberto#define HADGLITCH(p)    ((p) >  SUCCESS)
60258945Sroberto
61258945Sroberto#ifndef STR
62258945Sroberto#  define __STR(s)      #s
63258945Sroberto#  define STR(s)        __STR(s)
64258945Sroberto#endif
65258945Sroberto
66258945Sroberto#ifdef DEFINING
67258945Sroberto#  define VALUE(s)      = s
68258945Sroberto#  define MODE
69258945Sroberto#else
70258945Sroberto#  define VALUE(s)
71258945Sroberto#  define MODE extern
72258945Sroberto#endif
73258945Sroberto
74280849Scy#define parse_duration option_parse_duration
75280849Scy
76258945Sroberto#endif /* AUTOGEN_PROJECT_H */
77280849Scy/* end of project.h */
78