doubt in Chef and Left-Right

http://www.codechef.com/viewsolution/4880571

What does these line mean

while(!(c == ‘l’ || c == ‘r’))
c = getchar();

this means that if the char c is not ‘l’ or ‘r’ then just take it as input but do not perform any operation.

This is for newline character present at the end of the string.