| 1 |
|
|---|
| 2 | /* Readline interface for tokenizer.c and [raw_]input() in bltinmodule.c.
|
|---|
| 3 | By default, or when stdin is not a tty device, we have a super
|
|---|
| 4 | simple my_readline function using fgets.
|
|---|
| 5 | Optionally, we can use the GNU readline library.
|
|---|
| 6 | my_readline() has a different return value from GNU readline():
|
|---|
| 7 | - NULL if an interrupt occurred or if an error occurred
|
|---|
| 8 | - a malloc'ed empty string if EOF was read
|
|---|
| 9 | - a malloc'ed string ending in \n normally
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | #include "Python.h"
|
|---|
| 13 | #ifdef MS_WINDOWS
|
|---|
| 14 | #define WIN32_LEAN_AND_MEAN
|
|---|
| 15 | #include "windows.h"
|
|---|
| 16 | #endif /* MS_WINDOWS */
|
|---|
| 17 |
|
|---|
| 18 | #ifdef __VMS
|
|---|
| 19 | extern char* vms__StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt);
|
|---|
| 20 | #endif
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
|
|---|