=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/Attic/clock.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/tmux/Attic/clock.c 2009/08/26 16:16:06 1.2 --- src/usr.bin/tmux/Attic/clock.c 2009/08/26 16:23:30 1.3 *************** *** 1,4 **** ! /* $OpenBSD: clock.c,v 1.2 2009/08/26 16:16:06 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: clock.c,v 1.3 2009/08/26 16:23:30 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 112,119 **** strftime(tim, sizeof tim, "%H:%M", localtime(&t)); screen_write_clearscreen(ctx); - memcpy(&gc, &grid_default_cell, sizeof gc); - gc.bg = colour; if (screen_size_x(s) < 6 * strlen(tim) || screen_size_y(s) < 6) { if (screen_size_x(s) >= strlen(tim) && screen_size_y(s) != 0) { --- 112,117 ---- *************** *** 121,126 **** --- 119,125 ---- y = screen_size_y(s) / 2; screen_write_cursormove(ctx, x, y); + memcpy(&gc, &grid_default_cell, sizeof gc); gc.fg = colour; screen_write_puts(ctx, &gc, "%s", tim); } *************** *** 130,135 **** --- 129,136 ---- x = (screen_size_x(s) / 2) - 3 * strlen(tim); y = (screen_size_y(s) / 2) - 3; + memcpy(&gc, &grid_default_cell, sizeof gc); + gc.bg = colour; for (ptr = tim; *ptr != '\0'; ptr++) { if (*ptr >= '0' && *ptr <= '9') idx = *ptr - '0';