diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:21:51 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:21:51 +0000 |
commit | 99df48d70f10dcf8f95d4684262a3392d72ee9c6 (patch) | |
tree | e3e7768fa327c937e15a35579c8ce3362ff96f51 /arg.c | |
parent | 28aefe41623daba7685fe54ceb0b6952d5f6d98a (diff) | |
download | rtmux-99df48d70f10dcf8f95d4684262a3392d72ee9c6.tar.gz rtmux-99df48d70f10dcf8f95d4684262a3392d72ee9c6.tar.bz2 rtmux-99df48d70f10dcf8f95d4684262a3392d72ee9c6.zip |
Trimify.
Diffstat (limited to 'arg.c')
-rw-r--r-- | arg.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,4 +1,4 @@ -/* $Id: arg.c,v 1.2 2008-06-05 21:54:47 nicm Exp $ */ +/* $Id: arg.c,v 1.3 2008-06-18 22:21:51 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -51,7 +51,7 @@ arg_lookup_session(const char *name) ts = NULL; for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { - s = ARRAY_ITEM(&sessions, i); + s = ARRAY_ITEM(&sessions, i); if (s == NULL || fnmatch(name, s->name, 0) != 0) continue; @@ -133,7 +133,7 @@ arg_parse_window(const char *arg, struct session **s, int *idx) *s = arg_parse_session(NULL); return (0); } - + /* Find the separator if any. */ arg2 = xstrdup(arg); ptr = strrchr(arg2, ':'); @@ -147,7 +147,7 @@ arg_parse_window(const char *arg, struct session **s, int *idx) if (errstr != NULL) { xfree(arg2); return (1); - } + } xfree(arg2); *s = arg_parse_session(NULL); @@ -162,25 +162,25 @@ arg_parse_window(const char *arg, struct session **s, int *idx) xfree(arg2); *s = arg_parse_session(NULL); return (0); - } + } *idx = -1; goto lookup; - } + } /* If last, strip it and look up as a session. */ if (ptr[1] == '\0') { *ptr = '\0'; goto lookup; } - + /* Present but not first and not last. Break and convert both. */ *ptr = '\0'; *idx = strtonum(ptr + 1, 0, INT_MAX, &errstr); if (errstr != NULL) { xfree(arg2); return (1); - } + } lookup: /* Look up as session. */ |