envutil.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*############################################################################
  2. # Copyright 2016 Intel Corporation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################*/
  16. /*!
  17. * \file
  18. * \brief Environment utilities interface.
  19. */
  20. #ifndef EXAMPLE_UTIL_ENVUTIL_H_
  21. #define EXAMPLE_UTIL_ENVUTIL_H_
  22. /// set the program name
  23. void set_prog_name(char const* name);
  24. /// get the program name
  25. char const* get_prog_name();
  26. /// log an error
  27. /*!
  28. This function may add or format the message before writing it out
  29. output is written to the error stream
  30. */
  31. int log_error(char const* msg, ...);
  32. /// log a message
  33. /*!
  34. This function may add or format the message before writing it out
  35. output is written to the standard output stream
  36. */
  37. int log_msg(char const* msg, ...);
  38. /// log a formatted message
  39. /*!
  40. This function will not add or format the message before writing it out
  41. output is written to the standard output stream
  42. */
  43. int log_fmt(char const* msg, ...);
  44. #endif // EXAMPLE_UTIL_ENVUTIL_H_