33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/oflist.h"
35 #include "dcmtk/ofstd/ofstring.h"
36 #include "dcmtk/ofstd/oftypes.h"
37 #include "dcmtk/ofstd/ofcond.h"
39 #define INCLUDE_CSTDLIB
40 #define INCLUDE_CSTDIO
41 #define INCLUDE_CSTRING
42 #define INCLUDE_UNISTD
43 #include "dcmtk/ofstd/ofstdinc.h"
46 #ifdef HAVE_SYS_TYPES_H
47 #include <sys/types.h>
97 static inline size_t strlcpy(
char *dst,
const char *src,
size_t siz)
102 return my_strlcpy(dst, src, siz);
123 static inline size_t strlcat(
char *dst,
const char *src,
size_t siz)
142 static const char *
strerror(
const int errnum,
144 const size_t buflen);
229 const OFBool assumeDirName = OFTrue);
244 const OFBool assumeFilename = OFTrue);
259 const OFBool allowEmptyDirName = OFFalse);
279 const OFBool allowEmptyDirName = OFFalse);
294 const OFBool allowLeadingPathSeparator = OFTrue);
312 const OFBool recurse = OFTrue);
337 const OFBool convertNonASCII = OFFalse);
361 const OFBool convertNonASCII = OFFalse,
363 const OFBool newlineAllowed = OFFalse);
387 const OFBool convertNonASCII = OFFalse,
389 const OFBool newlineAllowed = OFFalse);
405 const unsigned char *data,
407 const size_t width = 0);
425 const size_t width = 0);
441 unsigned char *&result);
477 static double atof(
const char *s,
478 OFBool *success = NULL);
503 static void ftoa(
char *target,
506 unsigned int flags = 0,
543 static inline unsigned int sleep(
unsigned int seconds)
545 #if defined(HAVE_SLEEP) && !defined(HAVE_WINDOWS_H)
565 const Uint32 summand2)
567 return (0xffffffff - summand1 < summand2);
580 template <
typename T>
582 safeSubtract(T minuend, T subtrahend, T& difference)
584 assert ((minuend >= 0) && (subtrahend >= 0));
585 if (minuend < subtrahend) {
588 difference = minuend - subtrahend;
603 static size_t my_strlcpy(
char *dst,
const char *src,
size_t siz);
613 static size_t my_strlcat(
char *dst,
const char *src,
size_t siz);
620 static unsigned int my_sleep(
unsigned int seconds);