save-flags.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* -*- buffer-read-only: t -*- vi: set ro:
  2. *
  3. * DO NOT EDIT THIS FILE (save-flags.h)
  4. *
  5. * It has been AutoGen-ed
  6. * From the definitions /tmp/.ag-ufBbQe/save-flags.def
  7. * and the template file str2enum
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the name ``Bruce Korb'' nor the name of any other
  18. * contributor may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
  22. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  23. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
  25. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  26. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  27. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  28. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  29. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  30. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  31. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. * Command/Keyword Dispatcher
  34. */
  35. #ifndef STR2ENUM_SAVE_FLAGS_H_GUARD
  36. #define STR2ENUM_SAVE_FLAGS_H_GUARD 1
  37. #include <sys/types.h>
  38. #include <inttypes.h>
  39. /** integral type for holding save_flags masks */
  40. typedef uint32_t save_flags_mask_t;
  41. /** bits defined for save_flags_mask_t */
  42. /** include default values in commentary */
  43. #define SVFL_DEFAULT 0x0001U
  44. /** include usage text in commentary */
  45. #define SVFL_USAGE 0x0002U
  46. /** replace or append state */
  47. #define SVFL_UPDATE 0x0004U
  48. /** bits in USAGE_DEFAULT mask:
  49. * usage default */
  50. #define SVFL_USAGE_DEFAULT_MASK 0x0003U
  51. /** all bits in save_flags_mask_t masks */
  52. #define SVFL_MASK_ALL 0x0007U
  53. /** no bits in save_flags_mask_t */
  54. #define SVFL_NONE 0x0000U
  55. /** buffer size needed to hold all bit names for save_flags_mask_t masks */
  56. #define MAX_SAVE_FLAGS_NAME_SIZE 21
  57. extern save_flags_mask_t
  58. save_flags_str2mask(char const * str, save_flags_mask_t old);
  59. #endif /* STR2ENUM_SAVE_FLAGS_H_GUARD */
  60. /* end of save-flags.h */