comparison Python/pythonrun.c @ 24162:8ee2ab4f2a2d legacy-trunk

_Py_AskYesNo(): Removed this function. It was defined only in a Py_TRACE_REFS build, but wasn't referenced.
author Tim Peters <tim.peters@gmail.com>
date Tue, 09 Jul 2002 18:22:55 +0000
parents cb728141ae12
children 06f1e2fd05bc
comparison
equal deleted inserted replaced
24161:e685f32d8068 24162:8ee2ab4f2a2d
40 PyCompilerFlags *); 40 PyCompilerFlags *);
41 static void err_input(perrdetail *); 41 static void err_input(perrdetail *);
42 static void initsigs(void); 42 static void initsigs(void);
43 static void call_sys_exitfunc(void); 43 static void call_sys_exitfunc(void);
44 static void call_ll_exitfuncs(void); 44 static void call_ll_exitfuncs(void);
45
46 #ifdef Py_TRACE_REFS
47 int _Py_AskYesNo(char *prompt);
48 #endif
49
50 extern void _PyUnicode_Init(void); 45 extern void _PyUnicode_Init(void);
51 extern void _PyUnicode_Fini(void); 46 extern void _PyUnicode_Fini(void);
52 extern void _PyCodecRegistry_Init(void); 47 extern void _PyCodecRegistry_Init(void);
53 extern void _PyCodecRegistry_Fini(void); 48 extern void _PyCodecRegistry_Fini(void);
54 49
1387 #endif 1382 #endif
1388 #endif /* HAVE_SIGNAL_H */ 1383 #endif /* HAVE_SIGNAL_H */
1389 PyOS_InitInterrupts(); /* May imply initsignal() */ 1384 PyOS_InitInterrupts(); /* May imply initsignal() */
1390 } 1385 }
1391 1386
1392 #ifdef Py_TRACE_REFS
1393 /* Ask a yes/no question */
1394
1395 int
1396 _Py_AskYesNo(char *prompt)
1397 {
1398 char buf[256];
1399
1400 fprintf(stderr, "%s [ny] ", prompt);
1401 if (fgets(buf, sizeof buf, stdin) == NULL)
1402 return 0;
1403 return buf[0] == 'y' || buf[0] == 'Y';
1404 }
1405 #endif
1406
1407 #ifdef MPW 1387 #ifdef MPW
1408 1388
1409 /* Check for file descriptor connected to interactive device. 1389 /* Check for file descriptor connected to interactive device.
1410 Pretend that stdin is always interactive, other files never. */ 1390 Pretend that stdin is always interactive, other files never. */
1411 1391