-/* $OpenBSD: arguments.c,v 1.40 2021/08/21 08:44:59 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.41 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
RB_REMOVE(args_tree, &args->tree, entry);
TAILQ_FOREACH_SAFE(value, &entry->values, entry, value1) {
TAILQ_REMOVE(&entry->values, value, entry);
- free(value->value);
+ free(value->string);
free(value);
}
free(entry);
args_print_add(&buf, &len, " -%c", entry->flag);
else
args_print_add(&buf, &len, "-%c", entry->flag);
- args_print_add_argument(&buf, &len, value->value);
+ args_print_add_argument(&buf, &len, value->string);
}
}
if (s != NULL) {
value = xcalloc(1, sizeof *value);
- value->value = xstrdup(s);
+ value->string = xstrdup(s);
TAILQ_INSERT_TAIL(&entry->values, value, entry);
}
}
return (NULL);
if (TAILQ_EMPTY(&entry->values))
return (NULL);
- return (TAILQ_LAST(&entry->values, args_values)->value);
+ return (TAILQ_LAST(&entry->values, args_values)->string);
}
/* Get first argument. */
}
value = TAILQ_LAST(&entry->values, args_values);
- ll = strtonum(value->value, minval, maxval, &errstr);
+ ll = strtonum(value->string, minval, maxval, &errstr);
if (errstr != NULL) {
*cause = xstrdup(errstr);
return (0);
*cause = xstrdup("missing");
return (0);
}
- value = TAILQ_LAST(&entry->values, args_values)->value;
+ value = TAILQ_LAST(&entry->values, args_values)->string;
return (args_string_percentage(value, minval, maxval, curval, cause));
}
-/* $OpenBSD: cmd-new-session.c,v 1.142 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-new-session.c,v 1.143 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
environ_update(global_s_options, c->environ, env);
av = args_first_value(args, 'e');
while (av != NULL) {
- environ_put(env, av->value, 0);
+ environ_put(env, av->string, 0);
av = args_next_value(av);
}
s = session_create(prefix, newname, cwd, env, oo, tiop);
-/* $OpenBSD: cmd-new-window.c,v 1.94 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-new-window.c,v 1.95 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
av = args_first_value(args, 'e');
while (av != NULL) {
- environ_put(sc.environ, av->value, 0);
+ environ_put(sc.environ, av->string, 0);
av = args_next_value(av);
}
-/* $OpenBSD: cmd-queue.c,v 1.105 2021/08/20 19:50:16 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.106 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com>
av = args_first_value(args, flag);
while (av != NULL) {
xsnprintf(tmp, sizeof tmp, "hook_flag_%c_%d", flag, i);
- cmdq_add_format(new_state, tmp, "%s", av->value);
+ cmdq_add_format(new_state, tmp, "%s", av->string);
i++;
av = args_next_value(av);
}
-/* $OpenBSD: cmd-refresh-client.c,v 1.43 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-refresh-client.c,v 1.44 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
goto not_control_client;
av = args_first_value(args, 'A');
while (av != NULL) {
- cmd_refresh_client_update_offset(tc, av->value);
+ cmd_refresh_client_update_offset(tc, av->string);
av = args_next_value(av);
}
return (CMD_RETURN_NORMAL);
goto not_control_client;
av = args_first_value(args, 'B');
while (av != NULL) {
- cmd_refresh_client_update_subscription(tc, av->value);
+ cmd_refresh_client_update_subscription(tc, av->string);
av = args_next_value(av);
}
return (CMD_RETURN_NORMAL);
-/* $OpenBSD: cmd-resize-pane.c,v 1.50 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-resize-pane.c,v 1.51 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
if (args_count(args) == 0)
adjust = 1;
else {
- adjust = strtonum(args_string(args, 0), 1, INT_MAX,
- &errstr);
+ adjust = strtonum(args_string(args, 0), 1, INT_MAX, &errstr);
if (errstr != NULL) {
cmdq_error(item, "adjustment %s", errstr);
return (CMD_RETURN_ERROR);
-/* $OpenBSD: cmd-resize-window.c,v 1.7 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-resize-window.c,v 1.8 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2018 Nicholas Marriott <nicholas.marriott@gmail.com>
if (args_count(args) == 0)
adjust = 1;
else {
- adjust = strtonum(args_string(args, 0), 1, INT_MAX,
- &errstr);
+ adjust = strtonum(args_string(args, 0), 1, INT_MAX, &errstr);
if (errstr != NULL) {
cmdq_error(item, "adjustment %s", errstr);
return (CMD_RETURN_ERROR);
-/* $OpenBSD: cmd-respawn-pane.c,v 1.36 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-pane.c,v 1.37 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
av = args_first_value(args, 'e');
while (av != NULL) {
- environ_put(sc.environ, av->value, 0);
+ environ_put(sc.environ, av->string, 0);
av = args_next_value(av);
}
-/* $OpenBSD: cmd-respawn-window.c,v 1.47 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-window.c,v 1.48 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
av = args_first_value(args, 'e');
while (av != NULL) {
- environ_put(sc.environ, av->value, 0);
+ environ_put(sc.environ, av->string, 0);
av = args_next_value(av);
}
-/* $OpenBSD: cmd-split-window.c,v 1.108 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.109 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
av = args_first_value(args, 'e');
while (av != NULL) {
- environ_put(sc.environ, av->value, 0);
+ environ_put(sc.environ, av->string, 0);
av = args_next_value(av);
}
-/* $OpenBSD: tmux.h,v 1.1129 2021/08/21 10:22:39 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1130 2021/08/21 10:28:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
/* Argument value. */
struct args_value {
- char *value;
+ char *string;
TAILQ_ENTRY(args_value) entry;
};