1*c2c66affSColin Finck /* Strn.h */ 2*c2c66affSColin Finck 3*c2c66affSColin Finck #ifndef _Strn_h_ 4*c2c66affSColin Finck #define _Strn_h_ 1 5*c2c66affSColin Finck 6*c2c66affSColin Finck /* You should define this from the Makefile. */ 7*c2c66affSColin Finck #ifndef STRN_ZERO_PAD 8*c2c66affSColin Finck # define STRN_ZERO_PAD 1 9*c2c66affSColin Finck #endif 10*c2c66affSColin Finck 11*c2c66affSColin Finck /* You should define this from the Makefile. */ 12*c2c66affSColin Finck #ifndef STRNP_ZERO_PAD 13*c2c66affSColin Finck # define STRNP_ZERO_PAD 0 14*c2c66affSColin Finck #endif 15*c2c66affSColin Finck 16*c2c66affSColin Finck #ifdef __cplusplus 17*c2c66affSColin Finck extern "C" { 18*c2c66affSColin Finck #endif 19*c2c66affSColin Finck 20*c2c66affSColin Finck /* Strncat.c */ 21*c2c66affSColin Finck char *Strncat(char *const, const char *const, const size_t); 22*c2c66affSColin Finck 23*c2c66affSColin Finck /* Strncpy.c */ 24*c2c66affSColin Finck char *Strncpy(char *const, const char *const, const size_t); 25*c2c66affSColin Finck 26*c2c66affSColin Finck /* Strnpcat.c */ 27*c2c66affSColin Finck char *Strnpcat(char *const, const char *const, size_t); 28*c2c66affSColin Finck 29*c2c66affSColin Finck /* Strnpcpy.c */ 30*c2c66affSColin Finck char *Strnpcpy(char *const, const char *const, size_t); 31*c2c66affSColin Finck 32*c2c66affSColin Finck /* Strntok.c */ 33*c2c66affSColin Finck char *Strtok(char *, const char *); 34*c2c66affSColin Finck int Strntok(char *, size_t, char *, const char *); 35*c2c66affSColin Finck 36*c2c66affSColin Finck /* strtokc.c */ 37*c2c66affSColin Finck char *strtokc(char *, const char *, char **); 38*c2c66affSColin Finck int strntokc(char *, size_t, char *, const char *, char **); 39*c2c66affSColin Finck 40*c2c66affSColin Finck /* Dynscat.c */ 41*c2c66affSColin Finck char * Dynscat(char **dst, ...); 42*c2c66affSColin Finck 43*c2c66affSColin Finck #ifdef __cplusplus 44*c2c66affSColin Finck } 45*c2c66affSColin Finck #endif 46*c2c66affSColin Finck 47*c2c66affSColin Finck #define STRNCPY(d,s) Strncpy((d), (s), (size_t) sizeof(d)) 48*c2c66affSColin Finck #define STRNCAT(d,s) Strncat((d), (s), (size_t) sizeof(d)) 49*c2c66affSColin Finck 50*c2c66affSColin Finck #endif /* _Strn_h_ */ 51*c2c66affSColin Finck 52*c2c66affSColin Finck /* eof Strn.h */ 53