1
0

project.h 2.0 KB

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