mirror of
https://github.com/tmux/tmux.git
synced 2025-04-22 20:38:48 +00:00
Fix compiler warnings, missing #include. From Thomas Adam.
This commit is contained in:
parent
972da2d498
commit
771d7db3a6
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
|
@ -99,14 +99,12 @@ void
|
|||||||
control_notify_window_unlinked(unused struct session *s, struct window *w)
|
control_notify_window_unlinked(unused struct session *s, struct window *w)
|
||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
struct session *cs;
|
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||||
c = ARRAY_ITEM(&clients, i);
|
c = ARRAY_ITEM(&clients, i);
|
||||||
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
|
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
|
||||||
continue;
|
continue;
|
||||||
cs = c->session;
|
|
||||||
|
|
||||||
control_write(c, "%%window-close @%u", w->id);
|
control_write(c, "%%window-close @%u", w->id);
|
||||||
}
|
}
|
||||||
@ -136,14 +134,12 @@ void
|
|||||||
control_notify_window_renamed(struct window *w)
|
control_notify_window_renamed(struct window *w)
|
||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
struct session *s;
|
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||||
c = ARRAY_ITEM(&clients, i);
|
c = ARRAY_ITEM(&clients, i);
|
||||||
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
|
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
|
||||||
continue;
|
continue;
|
||||||
s = c->session;
|
|
||||||
|
|
||||||
control_write(c, "%%window-renamed @%u %s", w->id, w->name);
|
control_write(c, "%%window-renamed @%u %s", w->id, w->name);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
|
9
window.c
9
window.c
@ -496,19 +496,18 @@ window_zoom(struct window_pane *wp)
|
|||||||
int
|
int
|
||||||
window_unzoom(struct window *w)
|
window_unzoom(struct window *w)
|
||||||
{
|
{
|
||||||
struct window_pane *wp, *wp1;
|
struct window_pane *wp;
|
||||||
|
|
||||||
if (!(w->flags & WINDOW_ZOOMED))
|
if (!(w->flags & WINDOW_ZOOMED))
|
||||||
return (-1);
|
return (-1);
|
||||||
wp = w->active;
|
|
||||||
|
|
||||||
w->flags &= ~WINDOW_ZOOMED;
|
w->flags &= ~WINDOW_ZOOMED;
|
||||||
layout_free(w);
|
layout_free(w);
|
||||||
w->layout_root = w->saved_layout_root;
|
w->layout_root = w->saved_layout_root;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp1, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
wp1->layout_cell = wp1->saved_layout_cell;
|
wp->layout_cell = wp->saved_layout_cell;
|
||||||
wp1->saved_layout_cell = NULL;
|
wp->saved_layout_cell = NULL;
|
||||||
}
|
}
|
||||||
layout_fix_panes(w, w->sx, w->sy);
|
layout_fix_panes(w, w->sx, w->sy);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user