project.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-2016 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. #define parse_duration option_parse_duration
  65. #endif /* AUTOGEN_PROJECT_H */
  66. /* end of project.h */