The branch, master has been updated
       via  ffb83d23e17e99589f46edc3e08f78dd32936e4e (commit)
       via  4d05d8830482f8d5b5f812d082f1332090fcf027 (commit)
       via  9ae2284726a8fd37f73cf98b6e78dd7540e023af (commit)
       via  1b2c62afe9ba0e52bbbcf002d5c4992976d6b4ec (commit)
       via  f28032b03127557377a75d12457fd9a0222843bb (commit)
       via  52756fb3c5376e8f59607de328f92f7f681d3972 (commit)
      from  b4750e4c352f70ce515bed1279d8561a288f1f1b (commit)

- Log -----------------------------------------------------------------
commit ffb83d23e17e99589f46edc3e08f78dd32936e4e
Merge: b4750e4 4d05d88
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Merge branch 'obsd-master'
    
    Conflicts:
        Makefile

 Makefile.am      |    1 -
 cmd-clock-mode.c |   49 -------------------------------------------------
 cmd-copy-mode.c  |   15 ++++++++++++++-
 cmd-queue.c      |    5 ++++-
 colour.c         |   16 ++++++++--------
 status.c         |    8 ++++----
 window.c         |    2 +-
 7 files changed, 31 insertions(+), 65 deletions(-)

diff --cc Makefile.am
index 071c3a1,0000000..63e20b1
mode 100644,000000..100644
--- a/Makefile.am
+++ b/Makefile.am
@@@ -1,265 -1,0 +1,264 @@@
 +# $Id$
 +
 +# Obvious program stuff.
 +bin_PROGRAMS = tmux
 +CLEANFILES = tmux.1.mdoc tmux.1.man
 +
 +# Distribution tarball options.
 +EXTRA_DIST = \
 +      CHANGES FAQ README TODO COPYING examples compat \
 +      array.h compat.h tmux.h osdep-*.c mdoc2man.awk tmux.1
 +dist-hook:
 +      make clean
 +      grep "^#found_debug=" configure
 +      find $(distdir) -name .svn -type d|xargs rm -Rf
 +
 +# Preprocessor flags.
 +CPPFLAGS += @XOPEN_DEFINES@ -DTMUX_CONF="\"$(sysconfdir)/tmux.conf\""
 +
 +# glibc as usual does things ass-backwards and hides useful things by default,
 +# so everyone has to add this.
 +if IS_GLIBC
 +CFLAGS += -D_GNU_SOURCE
 +endif
 +
 +# Set flags for gcc. gcc4 whines abouts silly stuff so it needs slightly
 +# different flags.
 +if IS_GCC
 +CFLAGS += -std=gnu99 -O2
 +if IS_DEBUG
 +CFLAGS += -g
 +CFLAGS += -Wno-long-long -Wall -W -Wnested-externs -Wformat=2
 +CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
 +CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
 +CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align
 +CFLAGS += -Wdeclaration-after-statement
 +CPPFLAGS += -DDEBUG
 +endif
 +if IS_GCC4
 +CPPFLAGS += -iquote.
 +if IS_DEBUG
 +CFLAGS += -Wno-pointer-sign
 +endif
 +else
 +CPPFLAGS += -I. -I-
 +endif
 +endif
 +
 +# Set flags for Solaris.
 +if IS_SUNOS
 +if IS_GCC
 +CPPFLAGS += -D_XPG6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
 +else
 +CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
 +endif
 +endif
 +
 +# Set flags for Sun CC.
 +if IS_SUNCC
 +CFLAGS += -erroff=E_EMPTY_DECLARATION
 +endif
 +
 +# List of sources.
 +dist_tmux_SOURCES = \
 +      arguments.c \
 +      attributes.c \
 +      cfg.c \
 +      client.c \
 +      cmd-attach-session.c \
 +      cmd-bind-key.c \
 +      cmd-break-pane.c \
 +      cmd-capture-pane.c \
 +      cmd-choose-buffer.c \
 +      cmd-choose-client.c \
 +      cmd-choose-tree.c \
 +      cmd-clear-history.c \
-       cmd-clock-mode.c \
 +      cmd-command-prompt.c \
 +      cmd-confirm-before.c \
 +      cmd-copy-mode.c \
 +      cmd-delete-buffer.c \
 +      cmd-detach-client.c \
 +      cmd-display-message.c \
 +      cmd-display-panes.c \
 +      cmd-find-window.c \
 +      cmd-if-shell.c \
 +      cmd-join-pane.c \
 +      cmd-kill-pane.c \
 +      cmd-kill-server.c \
 +      cmd-kill-session.c \
 +      cmd-kill-window.c \
 +      cmd-list-buffers.c \
 +      cmd-list-clients.c \
 +      cmd-list-keys.c \
 +      cmd-list-panes.c \
 +      cmd-list-sessions.c \
 +      cmd-list-windows.c \
 +      cmd-list.c \
 +      cmd-load-buffer.c \
 +      cmd-lock-server.c \
 +      cmd-move-window.c \
 +      cmd-new-session.c \
 +      cmd-new-window.c \
 +      cmd-paste-buffer.c \
 +      cmd-pipe-pane.c \
 +      cmd-queue.c \
 +      cmd-refresh-client.c \
 +      cmd-rename-session.c \
 +      cmd-rename-window.c \
 +      cmd-resize-pane.c \
 +      cmd-respawn-pane.c \
 +      cmd-respawn-window.c \
 +      cmd-rotate-window.c \
 +      cmd-run-shell.c \
 +      cmd-save-buffer.c \
 +      cmd-select-layout.c \
 +      cmd-select-pane.c \
 +      cmd-select-window.c \
 +      cmd-send-keys.c \
 +      cmd-set-buffer.c \
 +      cmd-set-environment.c \
 +      cmd-set-option.c \
 +      cmd-show-environment.c \
 +      cmd-show-messages.c \
 +      cmd-show-options.c \
 +      cmd-source-file.c \
 +      cmd-split-window.c \
 +      cmd-string.c \
 +      cmd-swap-pane.c \
 +      cmd-swap-window.c \
 +      cmd-switch-client.c \
 +      cmd-unbind-key.c \
 +      cmd-wait-for.c \
 +      cmd.c \
 +      colour.c \
 +      control.c \
 +      control-notify.c \
 +      environ.c \
 +      format.c \
 +      grid-cell.c \
 +      grid-view.c \
 +      grid.c \
 +      input-keys.c \
 +      input.c \
 +      job.c \
 +      key-bindings.c \
 +      key-string.c \
 +      layout-custom.c \
 +      layout-set.c \
 +      layout.c \
 +      log.c \
 +      mode-key.c \
 +      names.c \
 +      notify.c \
 +      options-table.c \
 +      options.c \
 +      paste.c \
 +      resize.c \
 +      screen-redraw.c \
 +      screen-write.c \
 +      screen.c \
 +      server-client.c \
 +      server-fn.c \
 +      server-window.c \
 +      server.c \
 +      session.c \
 +      signal.c \
 +      status.c \
 +      style.c \
 +      tmux.c \
 +      tty-acs.c \
 +      tty-keys.c \
 +      tty-term.c \
 +      tty.c \
 +      utf8.c \
 +      window-choose.c \
 +      window-clock.c \
 +      window-copy.c \
 +      window.c \
 +      xmalloc.c \
 +      xterm-keys.c
 +nodist_tmux_SOURCES = osdep-@PLATFORM@.c
 +
 +# Pile in all the compat/ stuff that is needed.
 +if NO_FORKPTY
 +nodist_tmux_SOURCES += compat/forkpty-@PLATFORM@.c
 +endif
 +if NO_IMSG
 +nodist_tmux_SOURCES += compat/imsg.c compat/imsg-buffer.c
 +endif
 +if NO_CLOSEFROM
 +nodist_tmux_SOURCES += compat/closefrom.c
 +endif
 +if NO_DAEMON
 +nodist_tmux_SOURCES += compat/daemon.c
 +endif
 +if NO_SETENV
 +nodist_tmux_SOURCES += compat/setenv.c
 +endif
 +if NO_STRLCAT
 +nodist_tmux_SOURCES += compat/strlcat.c
 +endif
 +if NO_STRLCPY
 +nodist_tmux_SOURCES += compat/strlcpy.c
 +endif
 +if NO_ASPRINTF
 +nodist_tmux_SOURCES += compat/asprintf.c
 +endif
 +if NO_FGETLN
 +nodist_tmux_SOURCES += compat/fgetln.c
 +endif
 +if NO_FPARSELN
 +nodist_tmux_SOURCES += compat/fparseln.c
 +endif
 +if NO_GETOPT
 +nodist_tmux_SOURCES += compat/getopt.c
 +endif
 +if NO_STRCASESTR
 +nodist_tmux_SOURCES += compat/strcasestr.c
 +endif
 +if NO_STRSEP
 +nodist_tmux_SOURCES += compat/strsep.c
 +endif
 +if NO_VIS
 +nodist_tmux_SOURCES += compat/vis.c compat/unvis.c
 +endif
 +if NO_STRTONUM
 +nodist_tmux_SOURCES += compat/strtonum.c
 +endif
 +if NO_B64_NTOP
 +nodist_tmux_SOURCES += compat/b64_ntop.c
 +endif
 +if NO_CFMAKERAW
 +nodist_tmux_SOURCES += compat/cfmakeraw.c
 +endif
 +if NO_OPENAT
 +nodist_tmux_SOURCES += compat/openat.c
 +endif
 +
 +# Install tmux.1 in the right format.
 +install-exec-hook:
 +      if test x@MANFORMAT@ = xmdoc; then \
 +              sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1 \
 +                      >$(srcdir)/tmux.1.mdoc; \
 +      else \
 +              sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1| \
 +                      $(AWK) -f$(srcdir)/mdoc2man.awk >$(srcdir)/tmux.1.man; \
 +      fi
 +      $(mkdir_p) $(DESTDIR)$(mandir)/man1
 +      $(INSTALL_DATA) $(srcdir)/tmux.1.@MANFORMAT@ \
 +              $(DESTDIR)$(mandir)/man1/tmux.1
 +
 +# Update SF web site.
 +upload-index.html: update-index.html
 +      scp www/index.html www/main.css www/images/*.png \
 +              ${USER},t...@web.sf.net:/home/groups/t/tm/tmux/htdocs
 +      rm -f www/index.html www/images/small-*
 +
 +update-index.html:
 +      (cd www/images && \
 +              rm -f small-* && \
 +              for i in *.png; do \
 +                      convert "$$i" -resize 200x150 "small-$$i"; \
 +              done \
 +      )
 +      sed "s/%%RELEASE%%/${RELEASE}/g" www/index.html.in >www/index.html


commit 4d05d8830482f8d5b5f812d082f1332090fcf027
Author: nicm <nicm>
Commit: nicm <nicm>

    Take a reference to prevent cmdq being freed during the command. Can
    happen to cfg_cmd_q (possibly others) when source-file recurses into
    cmdq_continue. Fixes bug reported by Ismail Donmez and Theo Buehler.
---
 cmd-queue.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/cmd-queue.c b/cmd-queue.c
index 58282c8..6be532a 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -163,6 +163,7 @@ cmdq_continue(struct cmd_q *cmdq)
        int                      empty, flags;
        char                     s[1024];
 
+       cmdq->references++;
        notify_disable();
 
        empty = TAILQ_EMPTY(&cmdq->queue);
@@ -220,11 +221,13 @@ empty:
        if (cmdq->client_exit > 0)
                cmdq->client->flags |= CLIENT_EXIT;
        if (cmdq->emptyfn != NULL)
-               cmdq->emptyfn(cmdq); /* may free cmdq */
+               cmdq->emptyfn(cmdq);
        empty = 1;
 
 out:
        notify_enable();
+       cmdq_free(cmdq);
+
        return (empty);
 }
 


commit 9ae2284726a8fd37f73cf98b6e78dd7540e023af
Author: nicm <nicm>
Commit: nicm <nicm>

    Merge clock-mode command into copy-mode.
---
 Makefile         |    1 -
 cmd-clock-mode.c |   49 -------------------------------------------------
 cmd-copy-mode.c  |   15 ++++++++++++++-
 3 files changed, 14 insertions(+), 51 deletions(-)

diff --git a/Makefile b/Makefile
index 67b39bb..a719eaf 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,6 @@ SRCS= arguments.c \
        cmd-choose-client.c \
        cmd-choose-tree.c \
        cmd-clear-history.c \
-       cmd-clock-mode.c \
        cmd-command-prompt.c \
        cmd-confirm-before.c \
        cmd-copy-mode.c \
diff --git a/cmd-clock-mode.c b/cmd-clock-mode.c
deleted file mode 100644
index 8083581..0000000
--- a/cmd-clock-mode.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD$ */
-
-/*
- * Copyright (c) 2009 Nicholas Marriott <n...@users.sourceforge.net>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/types.h>
-
-#include "tmux.h"
-
-/*
- * Enter clock mode.
- */
-
-enum cmd_retval         cmd_clock_mode_exec(struct cmd *, struct cmd_q *);
-
-const struct cmd_entry cmd_clock_mode_entry = {
-       "clock-mode", NULL,
-       "t:", 0, 0,
-       CMD_TARGET_PANE_USAGE,
-       0,
-       cmd_clock_mode_exec
-};
-
-enum cmd_retval
-cmd_clock_mode_exec(struct cmd *self, struct cmd_q *cmdq)
-{
-       struct args             *args = self->args;
-       struct window_pane      *wp;
-
-       if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL)
-               return (CMD_RETURN_ERROR);
-
-       window_pane_set_mode(wp, &window_clock_mode);
-
-       return (CMD_RETURN_NORMAL);
-}
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index 8933529..b46a5a4 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -21,7 +21,7 @@
 #include "tmux.h"
 
 /*
- * Enter copy mode.
+ * Enter copy or clock mode.
  */
 
 enum cmd_retval         cmd_copy_mode_exec(struct cmd *, struct cmd_q *);
@@ -34,6 +34,14 @@ const struct cmd_entry cmd_copy_mode_entry = {
        cmd_copy_mode_exec
 };
 
+const struct cmd_entry cmd_clock_mode_entry = {
+       "clock-mode", NULL,
+       "t:", 0, 0,
+       CMD_TARGET_PANE_USAGE,
+       0,
+       cmd_copy_mode_exec
+};
+
 enum cmd_retval
 cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
 {
@@ -43,6 +51,11 @@ cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
        if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL)
                return (CMD_RETURN_ERROR);
 
+       if (self->entry == &cmd_clock_mode_entry) {
+               window_pane_set_mode(wp, &window_clock_mode);
+               return (CMD_RETURN_NORMAL);
+       }
+
        if (wp->mode != &window_copy_mode) {
                if (window_pane_set_mode(wp, &window_copy_mode) != 0)
                        return (CMD_RETURN_NORMAL);


commit 1b2c62afe9ba0e52bbbcf002d5c4992976d6b4ec
Author: nicm <nicm>
Commit: nicm <nicm>

    Entries in the window list can be NULL, prompted by a crash seen by Ben
    Boeckel.
---
 window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/window.c b/window.c
index 0206c6c..6a742a2 100644
--- a/window.c
+++ b/window.c
@@ -263,7 +263,7 @@ window_find_by_id(u_int id)
 
        for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
                w = ARRAY_ITEM(&windows, i);
-               if (w->id == id)
+               if (w != NULL && w->id == id)
                        return (w);
        }
        return (NULL);


commit f28032b03127557377a75d12457fd9a0222843bb
Author: nicm <nicm>
Commit: nicm <nicm>

    Check for \0 in the right place, from J Raynor.
---
 colour.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/colour.c b/colour.c
index 9e90596..b5efd6f 100644
--- a/colour.c
+++ b/colour.c
@@ -236,28 +236,28 @@ colour_fromstring(const char *s)
        if (strcasecmp(s, "default") == 0 || (s[0] == '8' && s[1] == '\0'))
                return (8);
        if (strcasecmp(s, "brightblack") == 0 ||
-           (s[0] == '9' && s[1] == '0' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '0' && s[2] == '\0'))
                return (90);
        if (strcasecmp(s, "brightred") == 0 ||
-           (s[0] == '9' && s[1] == '1' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '1' && s[2] == '\0'))
                return (91);
        if (strcasecmp(s, "brightgreen") == 0 ||
-           (s[0] == '9' && s[1] == '2' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '2' && s[2] == '\0'))
                return (92);
        if (strcasecmp(s, "brightyellow") == 0 ||
-           (s[0] == '9' && s[1] == '3' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '3' && s[2] == '\0'))
                return (93);
        if (strcasecmp(s, "brightblue") == 0 ||
-           (s[0] == '9' && s[1] == '4' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '4' && s[2] == '\0'))
                return (94);
        if (strcasecmp(s, "brightmagenta") == 0 ||
-           (s[0] == '9' && s[1] == '5' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '5' && s[2] == '\0'))
                return (95);
        if (strcasecmp(s, "brightcyan") == 0 ||
-           (s[0] == '9' && s[1] == '6' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '6' && s[2] == '\0'))
                return (96);
        if (strcasecmp(s, "brightwhite") == 0 ||
-           (s[0] == '9' && s[1] == '7' && s[1] == '\0'))
+           (s[0] == '9' && s[1] == '7' && s[2] == '\0'))
                return (97);
        return (-1);
 }


commit 52756fb3c5376e8f59607de328f92f7f681d3972
Author: nicm <nicm>
Commit: nicm <nicm>

    Use the same time for both calls to format_expand_time.
---
 status.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/status.c b/status.c
index e7714a0..5f8895f 100644
--- a/status.c
+++ b/status.c
@@ -758,9 +758,9 @@ status_prompt_set(struct client *c, const char *msg, const 
char *input,
        status_message_clear(c);
        status_prompt_clear(c);
 
-       c->prompt_string = format_expand_time(ft, msg, time(NULL));
+       c->prompt_string = format_expand_time(ft, msg, t);
 
-       c->prompt_buffer = format_expand_time(ft, input, time(NULL));
+       c->prompt_buffer = format_expand_time(ft, input, t);
        c->prompt_index = strlen(c->prompt_buffer);
 
        c->prompt_callbackfn = callbackfn;
@@ -817,10 +817,10 @@ status_prompt_update(struct client *c, const char *msg, 
const char *input)
        t = time(NULL);
 
        free(c->prompt_string);
-       c->prompt_string = format_expand_time(ft, msg, time(NULL));
+       c->prompt_string = format_expand_time(ft, msg, t);
 
        free(c->prompt_buffer);
-       c->prompt_buffer = format_expand_time(ft, input, time(NULL));
+       c->prompt_buffer = format_expand_time(ft, input, t);
        c->prompt_index = strlen(c->prompt_buffer);
 
        c->prompt_hindex = 0;


-----------------------------------------------------------------------

Summary of changes:
 Makefile.am      |    1 -
 cmd-clock-mode.c |   49 -------------------------------------------------
 cmd-copy-mode.c  |   15 ++++++++++++++-
 cmd-queue.c      |    5 ++++-
 colour.c         |   16 ++++++++--------
 status.c         |    8 ++++----
 window.c         |    2 +-
 7 files changed, 31 insertions(+), 65 deletions(-)
 delete mode 100644 cmd-clock-mode.c


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to