]> git.pond.sub.org Git - empserver/commitdiff
(termio) [_WIN32]: Change remaining "n"s to "records" for the
authorRon Koenderink <rkoenderink@yahoo.ca>
Wed, 8 Mar 2006 18:45:56 +0000 (18:45 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Wed, 8 Mar 2006 18:45:56 +0000 (18:45 +0000)
WIN32 ReadConsole().  Fixes broken exec command.
Broken in Rev 1.17.

src/client/termio.c

index aad6051f6b7807f6bcb9296c821358acc5521c81..8025406d090eb18e29a7f5cb5175b29db415a54d 100644 (file)
@@ -107,7 +107,7 @@ termio(int fd, int sock, FILE *auxfi)
 
        if (c == 13)
            c = 10;
-       n = 1;
+       records = 1;
        p[0] = c;
        p[1] = '\0';
        if (c != 10) {
@@ -120,11 +120,11 @@ termio(int fd, int sock, FILE *auxfi)
        } else
            putchar(c);
 /* Strip off the CRLF to just LF */
-       if (n > 1) {
-           if (p[n - 2] == 13 && p[n - 1] == 10) {
-               p[n - 2] = 10;
-               p[n - 1] = 0;
-               n--;
+       if (records > 1) {
+           if (p[records - 2] == 13 && p[records - 1] == 10) {
+               p[records - 2] = 10;
+               p[records - 1] = 0;
+               records--;
            }
        }
        FlushConsoleInputBuffer(hStdIn);