1 /* $NetBSD: project.h,v 1.4 2016/01/08 21:35:41 christos Exp $ */ 2 3 4 /** 5 * \file project.h 6 * 7 * This file is part of AutoOpts, a companion to AutoGen. 8 * AutoOpts is free software. 9 * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved 10 * 11 * AutoOpts is available under any one of two licenses. The license 12 * in use must be one of these two and the choice is under the control 13 * of the user of the license. 14 * 15 * The GNU Lesser General Public License, version 3 or later 16 * See the files "COPYING.lgplv3" and "COPYING.gplv3" 17 * 18 * The Modified Berkeley Software Distribution License 19 * See the file "COPYING.mbsd" 20 * 21 * These files have the following sha256 sums: 22 * 23 * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3 24 * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3 25 * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd 26 */ 27 28 #ifndef AUTOGEN_PROJECT_H 29 #define AUTOGEN_PROJECT_H 30 31 #include "config.h" 32 #include "compat/compat.h" 33 #include "ag-char-map.h" 34 35 /* 36 * Procedure success codes 37 * 38 * USAGE: define procedures to return "tSuccess". Test their results 39 * with the SUCCEEDED, FAILED and HADGLITCH macros. 40 * 41 * Microsoft sticks its nose into user space here, so for Windows' sake, 42 * make sure all of these are undefined. 43 */ 44 #undef SUCCESS 45 #undef FAILURE 46 #undef PROBLEM 47 #undef SUCCEEDED 48 #undef SUCCESSFUL 49 #undef FAILED 50 #undef HADGLITCH 51 52 #define SUCCESS ((tSuccess) 0) 53 #define FAILURE ((tSuccess)-1) 54 #define PROBLEM ((tSuccess) 1) 55 56 typedef int tSuccess; 57 58 #define SUCCEEDED(p) ((p) == SUCCESS) 59 #define SUCCESSFUL(p) SUCCEEDED(p) 60 #define FAILED(p) ((p) < SUCCESS) 61 #define HADGLITCH(p) ((p) > SUCCESS) 62 63 #ifndef STR 64 # define __STR(s) #s 65 # define STR(s) __STR(s) 66 #endif 67 68 #ifdef DEFINING 69 # define VALUE(s) = s 70 # define MODE 71 #else 72 # define VALUE(s) 73 # define MODE extern 74 #endif 75 76 #define parse_duration option_parse_duration 77 78 #endif /* AUTOGEN_PROJECT_H */ 79 /* end of project.h */ 80