/[path-sandbox]/trunk/libsbutil/src/string.c
Gentoo

Diff of /trunk/libsbutil/src/string.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 406 Revision 407
8 * Licensed under the GPL-2 8 * Licensed under the GPL-2
9 */ 9 */
10 10
11#include "headers.h" 11#include "headers.h"
12#include "rcscripts/rcutil.h" 12#include "rcscripts/rcutil.h"
13
14char *
15rc_memrepchr (char **str, char old, char new, size_t size)
16{
17 char *str_p;
18
19 if (!check_arg_strv (str))
20 return NULL;
21
22 str_p = memchr (*str, old, size);
23
24 while (NULL != str_p)
25 {
26 str_p[0] = new;
27 str_p = memchr (&str_p[1], old, size - (str_p - *str) - 1);
28 }
29
30 return *str;
31}
32 13
33char * 14char *
34rc_strcatpaths (const char *pathname1, const char *pathname2) 15rc_strcatpaths (const char *pathname1, const char *pathname2)
35{ 16{
36 char *new_path = NULL; 17 char *new_path = NULL;

Legend:
Removed from v.406  
changed lines
  Added in v.407

  ViewVC Help
Powered by ViewVC 1.1.20