Swap in new paste buffer code and add a couple more commands.

This commit is contained in:
Nicholas Marriott
2008-06-20 17:31:48 +00:00
parent 9798dcd4df
commit 4e4f71febb
18 changed files with 239 additions and 63 deletions

View File

@ -1,4 +1,4 @@
/* $Id: paste.c,v 1.1 2008-06-20 08:36:20 nicm Exp $ */
/* $Id: paste.c,v 1.2 2008-06-20 17:31:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -105,7 +105,7 @@ paste_add(struct paste_stack *ps, const char *data)
ARRAY_INSERT(ps, 0, pb);
pb->data = xstrdup(data);
if (clock_gettime(CLOCK_REALTIME, &pb->created) != 0)
if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
fatal("clock_gettime");
}
@ -121,7 +121,7 @@ paste_replace(struct paste_stack *ps, u_int idx, const char *data)
xfree(pb->data);
pb->data = xstrdup(data);
if (clock_gettime(CLOCK_REALTIME, &pb->created) != 0)
if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
fatal("clock_gettime");
return (0);