ustdlib.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //###########################################################################
  2. //
  3. // FILE: ustdlib.h
  4. //
  5. // TITLE: Prototypes for simple standard library functions.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //###########################################################################
  42. #ifndef __USTDLIB_H__
  43. #define __USTDLIB_H__
  44. //
  45. // Included Files
  46. //
  47. #include <stdarg.h>
  48. #include <time.h>
  49. //
  50. // If building with a C++ compiler, make all of the definitions in this header
  51. // have a C binding.
  52. //
  53. #ifdef __cplusplus
  54. extern "C"
  55. {
  56. #endif
  57. //
  58. // Function Prototypes
  59. //
  60. extern void ulocaltime(time_t timer, struct tm *tm);
  61. extern time_t umktime(struct tm *timeptr);
  62. extern int urand(void);
  63. extern int usnprintf(char * restrict s, size_t n, const char * restrict format,
  64. ...);
  65. extern int usprintf(char * restrict s, const char * restrict format, ...);
  66. extern void usrand(unsigned int seed);
  67. extern int ustrcasecmp(const char *s1, const char *s2);
  68. extern int ustrcmp(const char *s1, const char *s2);
  69. extern size_t ustrlen(const char *s);
  70. extern int ustrncasecmp(const char *s1, const char *s2, size_t n);
  71. extern int ustrncmp(const char *s1, const char *s2, size_t n);
  72. extern char *ustrncpy(char * restrict s1, const char * restrict s2, size_t n);
  73. extern char *ustrstr(const char *s1, const char *s2);
  74. extern float ustrtof(const char * restrict nptr,
  75. const char ** restrict endptr);
  76. extern unsigned long int ustrtoul(const char * restrict nptr,
  77. const char ** restrict endptr, int base);
  78. extern int uvsnprintf(char * restrict s, size_t n,
  79. const char * restrict format, va_list arg);
  80. //
  81. // Mark the end of the C bindings section for C++ compilers.
  82. //
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif // __USTDLIB_H__
  87. //
  88. // End of file
  89. //