version 1.23, 2011/02/10 12:12:14 |
version 1.24, 2011/08/30 09:18:52 |
|
|
struct window *w; |
struct window *w; |
struct window_pane *wp, *new_wp = NULL; |
struct window_pane *wp, *new_wp = NULL; |
struct environ env; |
struct environ env; |
char *cmd, *cwd, *cause; |
char *cmd, *cwd, *cause, *new_cause; |
const char *shell; |
const char *shell; |
u_int hlimit, paneidx; |
u_int hlimit, paneidx; |
int size, percentage; |
int size, percentage; |
|
|
if (args_has(args, 'l')) { |
if (args_has(args, 'l')) { |
size = args_strtonum(args, 'l', 0, INT_MAX, &cause); |
size = args_strtonum(args, 'l', 0, INT_MAX, &cause); |
if (cause != NULL) { |
if (cause != NULL) { |
ctx->error(ctx, "size %s", cause); |
xasprintf(&new_cause, "size %s", cause); |
xfree(cause); |
xfree(cause); |
return (-1); |
cause = new_cause; |
|
goto error; |
} |
} |
} else if (args_has(args, 'p')) { |
} else if (args_has(args, 'p')) { |
percentage = args_strtonum(args, 'p', 0, INT_MAX, &cause); |
percentage = args_strtonum(args, 'p', 0, INT_MAX, &cause); |
if (cause != NULL) { |
if (cause != NULL) { |
ctx->error(ctx, "percentage %s", cause); |
xasprintf(&new_cause, "percentage %s", cause); |
xfree(cause); |
xfree(cause); |
return (-1); |
cause = new_cause; |
|
goto error; |
} |
} |
if (type == LAYOUT_TOPBOTTOM) |
if (type == LAYOUT_TOPBOTTOM) |
size = (wp->sy * percentage) / 100; |
size = (wp->sy * percentage) / 100; |