comparison Python/pythonmain.c @ 262:6acd41a45d8d legacy-trunk

Removed Think C 3.0 stuff and wish list.
author Guido van Rossum <guido@python.org>
date Tue, 04 Jun 1991 19:38:58 +0000
parents 3cc54972ab52
children d5c9ae422b41
comparison
equal deleted inserted replaced
261:f4a944e9835f 262:6acd41a45d8d
366 366
367 #ifdef REF_DEBUG 367 #ifdef REF_DEBUG
368 fprintf(stderr, "[%ld refs]\n", ref_total); 368 fprintf(stderr, "[%ld refs]\n", ref_total);
369 #endif 369 #endif
370 370
371 #ifdef THINK_C_3_0
372 if (sts == 0)
373 Click_On(0);
374 #endif
375
376 #ifdef TRACE_REFS 371 #ifdef TRACE_REFS
377 if (askyesno("Print left references?")) { 372 if (askyesno("Print left references?")) {
378 #ifdef THINK_C_3_0
379 Click_On(1);
380 #endif
381 printrefs(stderr); 373 printrefs(stderr);
382 } 374 }
383 #endif /* TRACE_REFS */ 375 #endif /* TRACE_REFS */
384 376
385 exit(sts); 377 exit(sts);
390 finaloutput() 382 finaloutput()
391 { 383 {
392 #ifdef TRACE_REFS 384 #ifdef TRACE_REFS
393 if (!askyesno("Print left references?")) 385 if (!askyesno("Print left references?"))
394 return; 386 return;
395 #ifdef THINK_C_3_0
396 Click_On(1);
397 #endif
398 printrefs(stderr); 387 printrefs(stderr);
399 #endif /* TRACE_REFS */ 388 #endif /* TRACE_REFS */
400 } 389 }
401 390
402 /* Ask a yes/no question */ 391 /* Ask a yes/no question */
411 if (fgets(buf, sizeof buf, stdin) == NULL) 400 if (fgets(buf, sizeof buf, stdin) == NULL)
412 return 0; 401 return 0;
413 return buf[0] == 'y' || buf[0] == 'Y'; 402 return buf[0] == 'y' || buf[0] == 'Y';
414 } 403 }
415 404
416 #ifdef THINK_C_3_0 405 #ifdef applec /* MPW (also usable for Think C 3.0) */
417 406
418 /* Check for file descriptor connected to interactive device. 407 /* Check for file descriptor connected to interactive device.
419 Pretend that stdin is always interactive, other files never. */ 408 Pretend that stdin is always interactive, other files never. */
420 409
421 int 410 int
423 int fd; 412 int fd;
424 { 413 {
425 return fd == fileno(stdin); 414 return fd == fileno(stdin);
426 } 415 }
427 416
428 #ifdef macintosh
429 /* same */
430 int
431 isatty(fd)
432 int fd;
433 {
434 return fd == fileno(stdin);
435 }
436 #endif 417 #endif
437
438 #endif
439
440 /* XXX WISH LIST
441
442 - possible new types:
443 - iterator (for range, keys, ...)
444 - improve interpreter error handling, e.g., true tracebacks
445 - save precompiled modules on file?
446 - fork threads, locking
447 - allow syntax extensions
448 */
449
450 /* "Floccinaucinihilipilification" */