mirror of https://github.com/0intro/wmii
Make comments from earlier patch ANSI C compliant
This commit is contained in:
parent
e75df44b4e
commit
b6359f75d6
|
@ -457,8 +457,10 @@ handle_kpress(XKeyEvent * e)
|
||||||
if(strncmp(text,sel->file->name,strlen(sel->file->name))!=0) {
|
if(strncmp(text,sel->file->name,strlen(sel->file->name))!=0) {
|
||||||
set_text(sel->file->name);
|
set_text(sel->file->name);
|
||||||
break;
|
break;
|
||||||
} //if this didn't happen, we should continue with XK_Right behavior,
|
} /*
|
||||||
//so no "break;" here
|
* if this didn't happen, we should continue with
|
||||||
|
* XK_Right behavior, so no "break;" here
|
||||||
|
*/
|
||||||
case XK_Right:
|
case XK_Right:
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -497,14 +499,18 @@ handle_kpress(XKeyEvent * e)
|
||||||
size_t i = len;
|
size_t i = len;
|
||||||
if(i) {
|
if(i) {
|
||||||
int prev_nitems;
|
int prev_nitems;
|
||||||
update_items(text); //make sure nitems is in sync with text;
|
update_items(text); /*
|
||||||
//this may not be the case when the user has
|
* make sure nitems is in sync with text;
|
||||||
//has been using XK_Left or XK_Right
|
* this may not be the case when the user
|
||||||
|
* has been using XK_Left or XK_Right
|
||||||
|
*/
|
||||||
do {
|
do {
|
||||||
text[--i] = 0;
|
text[--i] = 0;
|
||||||
prev_nitems = nitems; //since update_items changes nitems,
|
prev_nitems = nitems; /*
|
||||||
//nitems == update_items(text) is always true;
|
* since update_items changes nitems,
|
||||||
//hence prev_nitems
|
* nitems == update_items(text) is
|
||||||
|
* always true; hence prev_nitems
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
while(nitems && i && prev_nitems == update_items(text));
|
while(nitems && i && prev_nitems == update_items(text));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue