mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Extra utility function add_to_commasep_pl.
Just like add_to_commasep, but takes a ptrlen.
This commit is contained in:
parent
9aae695c62
commit
3a54f28a4e
1
ssh.h
1
ssh.h
@ -1732,6 +1732,7 @@ unsigned alloc_channel_id_general(tree234 *channels, size_t localid_offset);
|
||||
alloc_channel_id_general(tree, offsetof(type, localid)))
|
||||
|
||||
void add_to_commasep(strbuf *buf, const char *data);
|
||||
void add_to_commasep_pl(strbuf *buf, ptrlen data);
|
||||
bool get_commasep_word(ptrlen *list, ptrlen *word);
|
||||
|
||||
SeatPromptResult verify_ssh_host_key(
|
||||
|
@ -607,11 +607,16 @@ unsigned alloc_channel_id_general(tree234 *channels, size_t localid_offset)
|
||||
* lists of protocol identifiers in SSH-2.
|
||||
*/
|
||||
|
||||
void add_to_commasep(strbuf *buf, const char *data)
|
||||
void add_to_commasep_pl(strbuf *buf, ptrlen data)
|
||||
{
|
||||
if (buf->len > 0)
|
||||
put_byte(buf, ',');
|
||||
put_data(buf, data, strlen(data));
|
||||
put_datapl(buf, data);
|
||||
}
|
||||
|
||||
void add_to_commasep(strbuf *buf, const char *data)
|
||||
{
|
||||
add_to_commasep_pl(buf, ptrlen_from_asciz(data));
|
||||
}
|
||||
|
||||
bool get_commasep_word(ptrlen *list, ptrlen *word)
|
||||
|
Loading…
Reference in New Issue
Block a user