Move getline and getdelim into stdio.h, per POSIX 200x.
[pspp] / lib / yesno.c
index 24006281f0026fa412d39bd674a4228a6c2b7154..8ec798b63a862e00012c89c4c49e3b067afd8916 100644 (file)
@@ -1,6 +1,6 @@
 /* yesno.c -- read a yes/no response from stdin
 
-   Copyright (C) 1990, 1998, 2001, 2003, 2004, 2005, 2006 Free
+   Copyright (C) 1990, 1998, 2001, 2003, 2004, 2005, 2006, 2007 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
 #include <stdlib.h>
 #include <stdio.h>
 
-#if ENABLE_NLS
-# include "getline.h"
-#endif
+extern int rpmatch (char const *response);
 
-/* Return true if we read an affirmative line from standard input.  */
+/* Return true if we read an affirmative line from standard input.
 
-extern int rpmatch (char const *response);
+   Since this function uses stdin, it is suggested that the caller not
+   use STDIN_FILENO directly, and also that the line
+   atexit(close_stdin) be added to main().  */
 
 bool
 yesno (void)