Skip to content

Commit

Permalink
Merge branch 'obsd-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Jan 19, 2016
2 parents 5d21faa + b5b5221 commit dc42c35
Show file tree
Hide file tree
Showing 108 changed files with 209 additions and 156 deletions.
2 changes: 1 addition & 1 deletion alerts.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion arguments.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion array.h
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2006 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2006 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cfg.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion client.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-attach-session.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-bind-key.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-break-pane.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-choose-buffer.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-choose-client.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-clear-history.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-command-prompt.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-copy-mode.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-detach-client.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-display-panes.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-find-window.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
31 changes: 18 additions & 13 deletions cmd-find.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down Expand Up @@ -922,15 +922,27 @@ cmd_find_from_pane(struct cmd_find_state *fs, struct window_pane *wp)
return (0);
}

/* Find current state. */
int
cmd_find_current(struct cmd_find_state *fs, struct cmd_q *cmdq, int flags)
{
cmd_find_clear_state(fs, cmdq, flags);
if (cmd_find_current_session(fs) != 0) {
if (~flags & CMD_FIND_QUIET)
cmdq_error(cmdq, "no current session");
return (-1);
}
return (0);
}

/*
* Split target into pieces and resolve for the given type. Fills in the given
* state. Returns 0 on success or -1 on error.
*/
int
cmd_find_target(struct cmd_find_state *fs, struct cmd_q *cmdq,
const char *target, enum cmd_find_type type, int flags)
cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
struct cmd_q *cmdq, const char *target, enum cmd_find_type type, int flags)
{
struct cmd_find_state current;
struct mouse_event *m;
char *colon, *period, *copy = NULL;
const char *session, *window, *pane;
Expand All @@ -950,15 +962,8 @@ cmd_find_target(struct cmd_find_state *fs, struct cmd_q *cmdq,
fs->current = &marked_pane;
else if (cmd_find_valid_state(&cmdq->current))
fs->current = &cmdq->current;
else {
cmd_find_clear_state(&current, cmdq, flags);
if (cmd_find_current_session(&current) != 0) {
if (~flags & CMD_FIND_QUIET)
cmdq_error(cmdq, "no current session");
goto error;
}
fs->current = &current;
}
else
fs->current = current;

/* An empty or NULL target is the current. */
if (target == NULL || *target == '\0')
Expand Down
2 changes: 1 addition & 1 deletion cmd-join-pane.c
Expand Up @@ -2,7 +2,7 @@

/*
* Copyright (c) 2011 George Nachman <tmux@georgester.com>
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-pane.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-server.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-session.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-kill-window.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-buffers.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-clients.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-keys.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-panes.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-sessions.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list-windows.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-list.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-lock-server.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-move-window.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-new-session.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-new-window.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-paste-buffer.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-pipe-pane.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
4 changes: 2 additions & 2 deletions cmd-queue.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down Expand Up @@ -199,7 +199,7 @@ cmdq_continue_one(struct cmd_q *cmdq)

cmdq_guard(cmdq, "begin", flags);

if (cmd_prepare_state(cmd, cmdq) != 0)
if (cmd_prepare_state(cmd, cmdq, NULL) != 0)
goto error;
retval = cmd->entry->exec(cmd, cmdq);
if (retval == CMD_RETURN_ERROR)
Expand Down
2 changes: 1 addition & 1 deletion cmd-refresh-client.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion cmd-rename-session.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */

/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down

0 comments on commit dc42c35

Please sign in to comment.