From: Mart Lubbers Date: Mon, 25 Jan 2016 10:21:44 +0000 (+0100) Subject: added code comments X-Git-Tag: v0.3~4 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=d1e12488647a2c90609fe7014e011bca72a1d7eb;p=CleanReadLine.git added code comments --- diff --git a/Clean System Files/readLine.c b/Clean System Files/readLine.c index 2855915..b645039 100644 --- a/Clean System Files/readLine.c +++ b/Clean System Files/readLine.c @@ -75,14 +75,12 @@ void cleanReadLine(CleanString prompt, int history, CleanString *result) add_history(cs_answer); } - if(!cs_answer){ - //Transfor answer into cstring + if(!cs_answer){ //In case of an EOF CleanStringVariable(answer, 1); *result = (CleanString) answer; memcpy(CleanStringCharacters(answer), "", 1); CleanStringLength(answer) = 1; - } else { - //Transfor answer into cstring + } else { //In case of a proper response CleanStringVariable(answer, strlen(cs_answer)); *result = (CleanString) answer; memcpy(CleanStringCharacters(answer), cs_answer, strlen(cs_answer));