pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0804043
)
Use for loop to iterate.
author
FreeBirdLjj
<ljj11011@mail.ustc.edu.cn>
Mon, 29 Sep 2014 06:02:59 +0000
(14:02 +0800)
committer
FreeBirdLjj
<ljj11011@mail.ustc.edu.cn>
Mon, 29 Sep 2014 06:02:59 +0000
(14:02 +0800)
src/viewer.c
patch
|
blob
|
history
diff --git
a/src/viewer.c
b/src/viewer.c
index
5413183
..
40e4bd7
100644
(file)
--- a/
src/viewer.c
+++ b/
src/viewer.c
@@
-519,7
+519,7
@@
void inline_display(WINDOW *window, const char *c, const int colors) {
cstack_t *stack = cstack_init();
// for each char in line
-
while(*c
) {
+
for(; *c; c++
) {
// if char is in special char list
if(strchr(special, *c)) {
@@
-590,8
+590,6
@@
void inline_display(WINDOW *window, const char *c, const int colors) {
// print regular char
wprintw(window, "%c", *c);
}
-
- c++;
}
// pop stack until empty to prevent formated trailing spaces