[Python-checkins] CVS: python/dist/src/Mac/Demo/embed demo.c,1.1,1.2

Jack Jansen jackjansen@users.sourceforge.net
2001年10月08日 08:32:19 -0700


Update of /cvsroot/python/python/dist/src/Mac/Demo/embed
In directory usw-pr-cvs1:/tmp/cvs-serv14354/python/Mac/Demo/embed
Modified Files:
	demo.c 
Log Message:
Brought up to date with the current state of affairs.
Index: demo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/embed/demo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** demo.c	1997年01月15日 16:53:34	1.1
--- demo.c	2001年10月08日 15:32:17	1.2
***************
*** 4,8 ****
 #ifdef macintosh
 #include "macglue.h"
- #include <SIOUX.h>
 #endif /* macintosh */
 
--- 4,7 ----
***************
*** 22,25 ****
--- 21,30 ----
 	/* Initialize the Python interpreter. Required. */
 #ifdef macintosh
+ 	/* If the first option is "-q" we don't open a console */
+ 	if ( argc > 1 && strcmp(argv[1], "-q") == 0 ) {
+ 		PyMac_SetConsoleHandler(PyMac_DummyReadHandler, PyMac_DummyWriteHandler,
+ 			PyMac_DummyWriteHandler);
+ /*		freopen("demo output", "w", stdout); */
+ 	}
 	PyMac_Initialize();
 #else
***************
*** 46,53 ****
 	/* Some more application specific code */
 	printf("\nGoodbye, cruel world\n");
- #ifdef macintosh
- 	printf("Type return or so-\n");
- 	getchar();
- #endif
 	/* Exit, cleaning up the interpreter */
 	Py_Exit(0);
--- 51,54 ----

AltStyle によって変換されたページ (->オリジナル) /