}
/* Make sure application hooks can see whether we saw EOF. */
- if (rl_eof_found = eof)
- RL_SETSTATE(RL_STATE_EOF);
+ if (eof > 0)
+ {
+ rl_eof_found = eof;
+ RL_SETSTATE(RL_STATE_EOF);
+ }
if (rl_done)
{
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
+#include <locale.h>
#if defined (HAVE_STRING_H)
# include <string.h>
@{
char *line, *s;
+ setlocale (LC_ALL, "");
+
progname = argv[0];
initialize_readline (); /* Bind our completer. */
#include <stdio.h>
#include <termios.h> /* xxx - should make this more general */
+#include <locale.h>
+
#ifdef READLINE_LIBRARY
# include "readline.h"
#else
{
fd_set fds;
+ setlocale (LC_ALL, "");
+
/* Adjust the terminal slightly before the handler is installed. Disable
* canonical mode processing and set the input character time flag to be
* non-blocking.
if (!printed)
{
- printf ("No commands match `%s'. Possibilties are:\n", arg);
+ printf ("No commands match `%s'. Possibilities are:\n", arg);
for (i = 0; commands[i].name; i++)
{
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <locale.h>
/* Used for select(2) */
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
/* Standard readline include files. */
#if defined (READLINE_LIBRARY)
# include "readline.h"
fd_set fds;
int r;
-
setlocale (LC_ALL, "");
/* Handle SIGWINCH */
extern void exit();
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#if defined (READLINE_LIBRARY)
# include "posixstat.h"
# include "readline.h"
else
progname++;
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, "");
+#endif
+
/* defaults */
prompt = "readline$ ";
fd = nch = 0;
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#if defined (READLINE_LIBRARY)
# include "readline.h"
# include "history.h"
{
char *input;
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, "");
+#endif
+
for (;;) {
input = readline ((char *)NULL);
if (input == 0)
extern void exit();
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#ifndef errno
extern int errno;
#endif
char *temp;
int opt, Vflag, Nflag;
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, ""):
+#endif
+
progname = strrchr(argv[0], '/');
if (progname == 0)
progname = argv[0];
extern void exit();
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#if defined (READLINE_LIBRARY)
# include "posixstat.h"
# include "readline.h"
int opt, fd, nch;
FILE *ifp;
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, "");
+#endif
+
progname = strrchr(argv[0], '/');
if (progname == 0)
progname = argv[0];
#include <util.h>
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
#else
main()
{
int val;
+
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, "");
+#endif
+
val = openpty (&masterfd, &slavefd, NULL, NULL, NULL);
if (val == -1)
return -1;
extern void exit();
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
# include "history.h"
char *temp, *prompt;
int done;
+#ifdef HAVE_SETLOCALE
+ setlocale (LC_ALL, "");
+#endif
+
temp = (char *)NULL;
prompt = "readline$ ";
done = 0;