4 void parse_opt_servers(memcached_st
*memc
,
12 assert(server_strings
);
15 end_ptr
= server_strings
+ strlen(server_strings
);
17 for (begin_ptr
= server_strings
, string
= index(server_strings
, ',');
19 string
= index(begin_ptr
, ','))
21 char buffer
[HUGE_STRING_LEN
];
25 memset(buffer
, 0, HUGE_STRING_LEN
);
28 memcpy(buffer
, begin_ptr
, string
- begin_ptr
);
33 size_t length
= strlen(begin_ptr
);
34 memcpy(buffer
, begin_ptr
, length
);
38 ptr
= index(buffer
, ':');
46 port
= strtol(ptr
, (char **)NULL
, 10);
49 memcached_server_add(memc
, buffer
, port
);
51 if (isspace(*begin_ptr
))