Revise comments
@@ -117,7 +117,7 @@ | ||
117 | 117 | assert(false); |
118 | 118 | case W_INTERRUPTED: |
119 | 119 | // Ignore interruption and continue reading, because: |
120 | - // 1) POSIX does not require to do so, and | |
120 | + // 1) POSIX does not require to handle interruption, and | |
121 | 121 | // 2) the buffer for canonical-mode editing cannot be |
122 | 122 | // controlled from the shell. |
123 | 123 | goto read_input; |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Yash: yet another shell */ |
2 | 2 | /* input.h: functions for input of command line */ |
3 | -/* (C) 2007-2011 magicant */ | |
3 | +/* (C) 2007-2018 magicant */ | |
4 | 4 | |
5 | 5 | /* This program is free software: you can redistribute it and/or modify |
6 | 6 | * it under the terms of the GNU General Public License as published by |
@@ -64,6 +64,9 @@ | ||
64 | 64 | * Input is done line-wise: the buffer contents are always terminated by a |
65 | 65 | * newline character (L'\n') except when the end of file is reached and the last |
66 | 66 | * line does not have a newline. |
67 | + * An input function should not read more than one line at a time, as commands | |
68 | + * (which may contain alias definitions) should be executed as soon as possible, | |
69 | + * before the next line is parsed. | |
67 | 70 | * The result is indicated by a value of the `inputresult_T' type. If the return |
68 | 71 | * value is other than INPUT_OK, the buffer is unchanged. |
69 | 72 | * The input function may be called even after it returned a value other than |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Yash: yet another shell */ |
2 | 2 | /* parser.c: syntax parser */ |
3 | -/* (C) 2007-2017 magicant */ | |
3 | +/* (C) 2007-2018 magicant */ | |
4 | 4 | |
5 | 5 | /* This program is free software: you can redistribute it and/or modify |
6 | 6 | * it under the terms of the GNU General Public License as published by |
@@ -388,7 +388,7 @@ | ||
388 | 388 | struct aliaslist_T *aliases; |
389 | 389 | } parsestate_T; |
390 | 390 | /* info: contains parameter that affect the behavior of parsing. |
391 | - * error: set to true when an parsing error occurs. | |
391 | + * error: set to true when a parsing error occurs. | |
392 | 392 | * src: a buffer that contains the source code to parse. |
393 | 393 | * index: the index to the string in `src'. |
394 | 394 | * indicates the character position that is being parsed. |