mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Slight efficiency improvement.
This commit is contained in:
@@ -278,7 +278,7 @@ int ReadLine(void)
|
||||
return ReadLineFromFile(0);
|
||||
}
|
||||
|
||||
#define IS_INTERACTIVE() (fp && fileno(fp) == STDIN_FILENO && isatty(STDIN_FILENO) && isatty(STDOUT_FILENO))
|
||||
#define IS_INTERACTIVE() (fileno(fp) == STDIN_FILENO && isatty(STDIN_FILENO) && isatty(STDOUT_FILENO))
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
@@ -412,7 +412,7 @@ static int ReadLineFromFile(int use_pclose)
|
||||
}
|
||||
|
||||
#ifdef USE_READLINE_HISTORY
|
||||
if (IS_INTERACTIVE()) {
|
||||
if (fp && IS_INTERACTIVE()) {
|
||||
add_history(CurLine);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user