version 1.20, 2014/04/24 09:14:43 |
version 1.21, 2014/05/13 07:34:35 |
|
|
struct args *args = self->args; |
struct args *args = self->args; |
struct paste_buffer *pb; |
struct paste_buffer *pb; |
struct format_tree *ft; |
struct format_tree *ft; |
u_int idx; |
|
char *line; |
char *line; |
const char *template; |
const char *template; |
|
|
if ((template = args_get(args, 'F')) == NULL) |
if ((template = args_get(args, 'F')) == NULL) |
template = LIST_BUFFERS_TEMPLATE; |
template = LIST_BUFFERS_TEMPLATE; |
|
|
idx = 0; |
pb = NULL; |
while ((pb = paste_walk_stack(&idx)) != NULL) { |
while ((pb = paste_walk(pb)) != NULL) { |
ft = format_create(); |
ft = format_create(); |
format_add(ft, "line", "%u", idx - 1); |
|
format_paste_buffer(ft, pb, 0); |
format_paste_buffer(ft, pb, 0); |
|
|
line = format_expand(ft, template); |
line = format_expand(ft, template); |