Lines Matching +defs:src +defs:pos
258 /* Is the word starting at position pos in buf a whole word? */
259 bool is_whole_word(size_t pos, const char *buf, const char *word)
262 size_t word_end = pos + strlen(word);
265 assert(buf != NULL && pos <= strlen(buf) && word != NULL);
267 parse_mbchar(buf + move_mbleft(buf, pos), p, NULL);
274 retval = (pos == 0 || !is_word_mbchar(p, FALSE)) &&
385 * pointer. Should be used as: "dest = mallocstrncpy(dest, src,
387 char *mallocstrncpy(char *dest, const char *src, size_t n)
389 if (src == NULL)
390 src = "";
392 if (src != dest)
396 strncpy(dest, src, n);
402 * "dest = mallocstrcpy(dest, src);". */
403 char *mallocstrcpy(char *dest, const char *src)
405 return mallocstrncpy(dest, src, (src == NULL) ? 1 :
406 strlen(src) + 1);
410 * at src. Should be used as: "answer = mallocstrassn(answer,
412 char *mallocstrassn(char *dest, char *src)
415 return src;