| 
									
										
										
										
											1997-01-31 16:15:11 +00:00
										 |  |  | /***********************************************************
 | 
					
						
							|  |  |  | Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam, | 
					
						
							|  |  |  | The Netherlands. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         All Rights Reserved | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Permission to use, copy, modify, and distribute this software and its  | 
					
						
							|  |  |  | documentation for any purpose and without fee is hereby granted,  | 
					
						
							|  |  |  | provided that the above copyright notice appear in all copies and that | 
					
						
							|  |  |  | both that copyright notice and this permission notice appear in  | 
					
						
							|  |  |  | supporting documentation, and that the names of Stichting Mathematisch | 
					
						
							|  |  |  | Centrum or CWI not be used in advertising or publicity pertaining to | 
					
						
							|  |  |  | distribution of the software without specific, written prior permission. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO | 
					
						
							|  |  |  | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | 
					
						
							|  |  |  | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE | 
					
						
							|  |  |  | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | 
					
						
							|  |  |  | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | 
					
						
							|  |  |  | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | 
					
						
							|  |  |  | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ******************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | /*
 | 
					
						
							|  |  |  | ** Resource-IDs in use by Python. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** All resources used by the python interpreter itself fall | 
					
						
							|  |  |  | ** in the range 128-256. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Standard python modules use resources in the range | 
					
						
							|  |  |  | ** 256-512. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Python programs that use their own resources are advised to | 
					
						
							|  |  |  | ** choose resource numbers higher than 512. | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  | ** Resources that reside in the python executable (or, for | 
					
						
							|  |  |  | ** shared ppc python, in the core dynamic library) | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-08-31 13:59:36 +00:00
										 |  |  | /* The alert for "No Python directory, where is it?" (OBSOLETE) */ | 
					
						
							|  |  |  | #define NOPYTHON_ALERT	128
 | 
					
						
							|  |  |  | #define YES_ITEM		1
 | 
					
						
							|  |  |  | #define NO_ITEM			2
 | 
					
						
							|  |  |  | #define CURWD_ITEM		3
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* The alert for "this is an applet template" */ | 
					
						
							| 
									
										
										
										
											1995-08-31 13:59:36 +00:00
										 |  |  | #define NOPYC_ALERT		129
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* The dialog for our GetDirectory and PromptGetFile call */ | 
					
						
							| 
									
										
										
										
											1995-08-31 13:59:36 +00:00
										 |  |  | #define GETDIR_ID 		130		/* Resource ID for our "get directory" */
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | #define GETFILEPROMPT_ID 132	/* Resource id for prompted get file */
 | 
					
						
							| 
									
										
										
										
											1995-08-31 13:59:36 +00:00
										 |  |  | #define PROMPT_ITEM		10		/* The prompt, at the top */
 | 
					
						
							|  |  |  | #define SELECTCUR_ITEM	11	/* "Select current directory" button */
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* The dialog for interactive options */ | 
					
						
							|  |  |  | #define OPT_DIALOG		131		/* Resource ID for dialog */
 | 
					
						
							|  |  |  | #define OPT_OK			1
 | 
					
						
							|  |  |  | #define OPT_CANCEL		2
 | 
					
						
							|  |  |  | #define OPT_INSPECT		3
 | 
					
						
							|  |  |  | #define OPT_VERBOSE		4
 | 
					
						
							|  |  |  | #define OPT_SUPPRESS	5
 | 
					
						
							|  |  |  | #define OPT_UNBUFFERED	6
 | 
					
						
							|  |  |  | #define OPT_DEBUGGING	7
 | 
					
						
							| 
									
										
										
										
											1995-10-27 13:32:30 +00:00
										 |  |  | #define OPT_KEEPNORMAL	8
 | 
					
						
							|  |  |  | #define OPT_KEEPERROR	9
 | 
					
						
							| 
									
										
										
										
											1996-03-12 13:29:04 +00:00
										 |  |  | #define OPT_CMDLINE		10
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-08-31 13:59:36 +00:00
										 |  |  | /* Dialog for 'No preferences directory' */ | 
					
						
							|  |  |  | #define NOPREFDIR_ID	133
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Dialog for 'Create preferences file?' */ | 
					
						
							|  |  |  | #define NOPREFFILE_ID	134
 | 
					
						
							|  |  |  | #define NOPREFFILE_YES	1
 | 
					
						
							|  |  |  | #define NOPREFFILE_NO	2
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Dialog for 'Bad preference file' */ | 
					
						
							|  |  |  | #define BADPREFFILE_ID	135
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-09-06 00:30:45 +00:00
										 |  |  | /* About box */ | 
					
						
							|  |  |  | #define ABOUT_ID		136
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-10-22 15:24:21 +00:00
										 |  |  | /* No preferences file name resource */ | 
					
						
							|  |  |  | #define NOPREFNAME_ID	137
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-10-11 13:19:52 +00:00
										 |  |  | /* EditPythonPrefs range. Needed here to forestall conflicts with applets */ | 
					
						
							| 
									
										
										
										
											1996-12-23 17:23:23 +00:00
										 |  |  | #define EDITPYTHONPREFS_MIN	508
 | 
					
						
							| 
									
										
										
										
											1996-10-11 13:19:52 +00:00
										 |  |  | #define EDITPYTHONPREFS_MAX 511
 | 
					
						
							| 
									
										
										
										
											1996-12-23 17:23:23 +00:00
										 |  |  | /* twit range. Again needed to forestall conflicts with scripts using their own resources */ | 
					
						
							|  |  |  | #define TWIT_MIN		500
 | 
					
						
							|  |  |  | #define TWIT_MAX		507
 | 
					
						
							| 
									
										
										
										
											1996-10-11 13:19:52 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | /*
 | 
					
						
							|  |  |  | ** The following are valid both in the binary (or shared library) | 
					
						
							| 
									
										
										
										
											1996-04-04 15:39:42 +00:00
										 |  |  | ** and in the Preferences file. | 
					
						
							| 
									
										
										
										
											1996-09-06 22:18:40 +00:00
										 |  |  | ** For all these the override is tried first, in the application resource fork | 
					
						
							|  |  |  | ** only, this allows an applet to override standard settings. | 
					
						
							|  |  |  | ** If there is no override resource the preferences file is added to the head | 
					
						
							|  |  |  | ** of the resource file chain and the non-override version of the resource is | 
					
						
							|  |  |  | ** searched in any resource file. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** The effect of this is that, for example, a 'Popt' of 128 in the application or | 
					
						
							|  |  |  | ** shared library provides default options for use when no preferences are set, | 
					
						
							|  |  |  | ** while a 'Popt' of 129 (in the application *only*) overrides any options in the | 
					
						
							|  |  |  | ** preferences file. | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-10-22 15:24:21 +00:00
										 |  |  | /* The STR resource that holds the preference file name */ | 
					
						
							|  |  |  | /* #define PREFFILENAME_ID 128 */ | 
					
						
							|  |  |  | #define PREFFILENAME_NAME "\pPythonPreferenceFileName"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | /* The STR# resource for sys.path initialization */ | 
					
						
							|  |  |  | #define PYTHONPATH_ID 128
 | 
					
						
							| 
									
										
										
										
											1996-04-04 15:39:42 +00:00
										 |  |  | #define PYTHONPATHOVERRIDE_ID 129
 | 
					
						
							| 
									
										
										
										
											1995-08-14 12:34:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* The alis resource for locating the python home directory */ | 
					
						
							|  |  |  | #define PYTHONHOME_ID 128
 | 
					
						
							| 
									
										
										
										
											1996-04-04 15:39:42 +00:00
										 |  |  | #define PYTHONHOMEOVERRIDE_ID 129
 | 
					
						
							| 
									
										
										
										
											1996-02-21 16:46:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* The Python options resource and offset of its members */ | 
					
						
							|  |  |  | #define PYTHONOPTIONS_ID 128
 | 
					
						
							| 
									
										
										
										
											1996-04-04 15:39:42 +00:00
										 |  |  | #define PYTHONOPTIONSOVERRIDE_ID 129
 | 
					
						
							| 
									
										
										
										
											1996-02-21 16:46:57 +00:00
										 |  |  | #define POPT_INSPECT	0
 | 
					
						
							|  |  |  | #define POPT_VERBOSE	1
 | 
					
						
							|  |  |  | #define POPT_SUPPRESS	2
 | 
					
						
							|  |  |  | #define POPT_UNBUFFERED	3
 | 
					
						
							|  |  |  | #define POPT_DEBUGGING	4
 | 
					
						
							|  |  |  | #define POPT_KEEPNORM	5
 | 
					
						
							|  |  |  | #define POPT_KEEPERR	6
 | 
					
						
							| 
									
										
										
										
											1996-09-06 22:18:40 +00:00
										 |  |  | #define POPT_NOINTOPT	7	/* Not settable interactively */
 | 
					
						
							|  |  |  | #define POPT_NOARGS		8	/* Not settable interactively */
 | 
					
						
							| 
									
										
										
										
											1996-02-28 15:42:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-09-07 17:09:31 +00:00
										 |  |  | typedef struct PyMac_PrefRecord { | 
					
						
							|  |  |  | 	unsigned char	inspect; | 
					
						
							|  |  |  | 	unsigned char	verbose; | 
					
						
							|  |  |  | 	unsigned char	suppress_print; | 
					
						
							|  |  |  | 	unsigned char	unbuffered; | 
					
						
							|  |  |  | 	unsigned char	debugging; | 
					
						
							|  |  |  | 	unsigned char	keep_normal; | 
					
						
							|  |  |  | 	unsigned char	keep_error; | 
					
						
							|  |  |  | 	unsigned char	nointopt; | 
					
						
							|  |  |  | 	unsigned char	noargs; | 
					
						
							|  |  |  | } PyMac_PrefRecord; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-09-06 22:18:40 +00:00
										 |  |  | /* The GUSI options resources */ | 
					
						
							|  |  |  | #define GUSIOPTIONS_ID	10240
 | 
					
						
							|  |  |  | #define GUSIOPTIONSOVERRIDE_ID 10241
 | 
					
						
							| 
									
										
										
										
											1996-09-06 00:30:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-02-28 15:42:47 +00:00
										 |  |  | /* From macgetpath.c: */ | 
					
						
							| 
									
										
										
										
											1996-09-07 17:09:31 +00:00
										 |  |  | void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *)); | 
					
						
							| 
									
										
										
										
											1996-02-28 15:42:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-02-21 16:46:57 +00:00
										 |  |  |   |