summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
authortcunha <tcunha>2009-10-28 23:12:38 (GMT)
committer tcunha <tcunha>2009-10-28 23:12:38 (GMT)
commitb38f7219145acedfce4d5f8a696b3f4546303dbe (patch) (side-by-side diff)
tree3a88301055e57cec80dd82684b537cdffd2d84c9 /cmd-string.c
parente55fb7cf12bcfeff3caa944eec83e5e004c8330c (diff)
downloadtmux-old-b38f7219145acedfce4d5f8a696b3f4546303dbe.zip
tmux-old-b38f7219145acedfce4d5f8a696b3f4546303dbe.tar.gz
tmux-old-b38f7219145acedfce4d5f8a696b3f4546303dbe.tar.bz2
Sync OpenBSD patchset 467:
tabs are better; ok nicm
Diffstat (limited to 'cmd-string.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-string.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/cmd-string.c b/cmd-string.c
index d6bbc97..cc14893 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-string.c,v 1.23 2009/08/09 17:48:55 tcunha Exp $ */
+/* $Id: cmd-string.c,v 1.24 2009/10/28 23:12:38 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <[email protected]>
@@ -204,33 +204,33 @@ cmd_string_string(const char *s, size_t *p, char endch, int esc)
char *buf, *t;
size_t len;
- buf = NULL;
+ buf = NULL;
len = 0;
- while ((ch = cmd_string_getc(s, p)) != endch) {
- switch (ch) {
+ while ((ch = cmd_string_getc(s, p)) != endch) {
+ switch (ch) {
case EOF:
goto error;
- case '\\':
+ case '\\':
if (!esc)
break;
- switch (ch = cmd_string_getc(s, p)) {
+ switch (ch = cmd_string_getc(s, p)) {
case EOF:
goto error;
case 'e':
ch = '\033';
break;
- case 'r':
- ch = '\r';
- break;
- case 'n':
- ch = '\n';
- break;
- case 't':
- ch = '\t';
- break;
- }
- break;
+ case 'r':
+ ch = '\r';
+ break;
+ case 'n':
+ ch = '\n';
+ break;
+ case 't':
+ ch = '\t';
+ break;
+ }
+ break;
case '$':
if (!esc)
break;
@@ -241,13 +241,13 @@ cmd_string_string(const char *s, size_t *p, char endch, int esc)
len += strlen(t);
xfree(t);
continue;
- }
+ }
if (len >= SIZE_MAX - 2)
goto error;
buf = xrealloc(buf, 1, len + 1);
- buf[len++] = ch;
- }
+ buf[len++] = ch;
+ }
buf = xrealloc(buf, 1, len + 1);
buf[len] = '\0';
@@ -272,7 +272,7 @@ cmd_string_variable(const char *s, size_t *p)
((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z') || \
((ch) >= '0' && (ch) <= '9'))
- buf = NULL;
+ buf = NULL;
len = 0;
fch = EOF;