16 if (flen <= 0)
return NULL;
19 for (i = flen - 1; i >= 0; i--) {
40 strncpy(s, fstr, len);
49 if (flen <= 0)
return NULL;
51 if (bufsize <= 0)
return NULL;
54 for (i = flen - 1; i >= 0; i--) {
64 if (len > bufsize - 1) {
67 strncpy(buf, fstr, len);
75 if (fstr ==
NULL)
return 0;
76 if (flen <= 0)
return 0;
86 memset(fstr,
' ', flen);
87 strncpy(fstr, cstr, clen);
int HECMW_set_error(int errorno, const char *fmt,...)
char * HECMW_strcpy_f2c(const char *fstr, int flen)
int HECMW_strcpy_c2f(const char *cstr, char *fstr, int flen)
char * HECMW_strcpy_f2c_r(const char *fstr, int flen, char *buf, int bufsize)
#define HECMW_malloc(size)