P99
Macros | Typedefs | Functions | Variables
p99_constraint.h File Reference
#include "p99_bitset.h"
+ Include dependency graph for p99_constraint.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define asctime_s(...)   p00_asctime_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define bsearch_s(...)   p00_bsearch_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define ctime_s(S, M, T)   asctime_s((S), (M), localtime_s((T), &(struct tm){ 0 }))
 
#define getenv_s(...)   p00_getenv_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define gets_s(...)   p00_gets_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define gmtime_s(...)   p00_gmtime_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define localtime_s(...)   p00_localtime_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define memcpy_s(S1, S1MAX, S2, N)   P99_CONSTRAINT_TRIGGER(p00_memcpy_s(false, (S1), (S1MAX), (S2), (N)), "memcpy_s runtime constraint violation")
 
#define memmove_s(S1, S1MAX, S2, N)   P99_CONSTRAINT_TRIGGER(p00_memcpy_s(true, (S1), (S1MAX), (S2), (N)), "memmove_s runtime constraint violation")
 
#define P99_CONSTRAINT_CALL(...)
 
#define P99_CONSTRAINT_HANDLER   exit_handler_s
 
#define P99_CONSTRAINT_TRIGGER(E, I)   p00_constraint_call((E), P99_STRINGIFY(__LINE__), __func__, I)
 
#define P99_STRERROR(...)
 
#define P99_STRERROR_MAX   256
 
#define strcat_s(S1, S1MAX, S2)   P99_CONSTRAINT_TRIGGER(p00_strcat_s((S1), (S1MAX), (S2)), "strcat_s runtime constraint violation")
 
#define strcpy_s(S1, S1MAX, S2)   P99_CONSTRAINT_TRIGGER(p00_strcpy_s((S1), (S1MAX), (S2)), "strcpy_s runtime constraint violation")
 
#define strncat_s(S1, S1MAX, S2, N)   P99_CONSTRAINT_TRIGGER(p00_strncat_s((S1), (S1MAX), (S2), (N)), "strncat_s runtime constraint violation")
 
#define strncpy_s(S1, S1MAX, S2, N)   P99_CONSTRAINT_TRIGGER(p00_strncpy_s((S1), (S1MAX), (S2), (N)), "strncpy_s runtime constraint violation")
 
#define strtok_s(S1, S1MAX, S2, PTR)
 
#define tmpfile_s(...)   p00_tmpfile_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 
#define tmpnam_s(...)   p00_tmpnam_s(P99_STRINGIFY(__LINE__), __func__, __VA_ARGS__)
 

Typedefs

typedef struct atomic_constraint_handler_t constraint_handler_t
 

Functions

 if (p00_err)
 
void p99_abort_handler (const char *restrict p00_msg, void *restrict p00_ptr, errno_t p00_err)
 
void p99_exit_handler (const char *restrict p00_msg, void *restrict p00_ptr, errno_t p00_err)
 
void p99_ignore_handler (const char *restrict p00_msg, void *restrict p00_ptr, errno_t p00_err)
 
void p99_report_handler (const char *restrict p00_msg, void *restrict p00_ptr, errno_t p00_err)
 
errno_t strerror_s (char *p00_s, rsize_t p00_maxsize, errno_t p00_errnum)
 maps the number in errnum to a locale-specific message string. More...
 
size_t strerrorlen_s (errno_t p00_errnum)
 calculates the length of the (untruncated) locale-specific message string that the strerror_s function maps to errnum. More...
 
size_t strnlen_s (const char *p00_s, size_t p00_maxsize)
 computes the length of the string pointed to by s. More...
 
 switch (p00_ret)
 
P00_CLAUSE2 v (_Pragma("weak exit_handler_s"))(_Pragma("weak exit_handler_s
 
P00_CLAUSE2 v (_Pragma("weak report_handler_s"))(_Pragma("weak report_handler_s
 

Variables

P00_CLAUSE2 time might be before date
 
P00_CLAUSE2 call to dynamic constraint EINVAL
 
P00_CLAUSE2 time might be before epoch
 
 errno = 0
 
P00_CLAUSE2 call to strerror_s
 
P00_CLAUSE2 call to dynamic constraint violation
 
P99_STRINGIFY
#define P99_STRINGIFY(...)
Transform the argument list into one string.
Definition: p99_compiler.h:109
P99_NARG
#define P99_NARG(...)
Return the length of the variable length argument list, where an empty argument list is considered to...
Definition: p99_args.h:117
P99_IF_LT
#define P99_IF_LT(A, B)
Test two decimal numbers A and B for whether A is strictly less than B.
Definition: p99_if.h:120
P99_STRERROR_MAX
#define P99_STRERROR_MAX