Mercurial > cpython-lru_cache-weakref
diff Mac/Python/macgetpath.c @ 4238:6c86d9136c09 legacy-trunk
- Put all options in a struct
- Unified initialization code for interpreter and applet
- Implemented new options to skip AE-processing for argc/argv and for
disabling interactive option setting
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Sat, 07 Sep 1996 17:09:31 +0000 |
| parents | 84444ea3f5f6 |
| children | 0549e3428d57 |
line wrap: on
line diff
--- a/Mac/Python/macgetpath.c Sat Sep 07 17:06:49 1996 +0000 +++ b/Mac/Python/macgetpath.c Sat Sep 07 17:09:31 1996 +0000 @@ -310,9 +310,7 @@ #endif /* !USE_BUILTIN_PATH */ void -PyMac_PreferenceOptions(int *inspect, int *verbose, int *suppress_print, - int *unbuffered, int *debugging, int *keep_normal, - int *keep_error) +PyMac_PreferenceOptions(PyMac_PrefRecord *pr) { short oldrh, prefrh = -1; Handle handle; @@ -339,14 +337,15 @@ size = GetHandleSize(handle); p = (char *)*handle; - if ( size > POPT_INSPECT ) *inspect = p[POPT_INSPECT]; - if ( size > POPT_VERBOSE ) *verbose = p[POPT_VERBOSE]; - if ( size > POPT_SUPPRESS ) *suppress_print = p[POPT_SUPPRESS]; - if ( size > POPT_UNBUFFERED ) *unbuffered = p[POPT_UNBUFFERED]; - if ( size > POPT_DEBUGGING ) *debugging = p[POPT_DEBUGGING]; - if ( size > POPT_KEEPNORM ) *keep_normal = p[POPT_KEEPNORM]; - if ( size > POPT_KEEPERR ) *keep_error = p[POPT_KEEPERR]; - /* The rest are not implemented yet */ + if ( size > POPT_INSPECT ) pr->inspect = p[POPT_INSPECT]; + if ( size > POPT_VERBOSE ) pr->verbose = p[POPT_VERBOSE]; + if ( size > POPT_SUPPRESS ) pr->suppress_print = p[POPT_SUPPRESS]; + if ( size > POPT_UNBUFFERED ) pr->unbuffered = p[POPT_UNBUFFERED]; + if ( size > POPT_DEBUGGING ) pr->debugging = p[POPT_DEBUGGING]; + if ( size > POPT_KEEPNORM ) pr->keep_normal = p[POPT_KEEPNORM]; + if ( size > POPT_KEEPERR ) pr->keep_error = p[POPT_KEEPERR]; + if ( size > POPT_NOINTOPT ) pr->nointopt = p[POPT_NOINTOPT]; + if ( size > POPT_NOARGS ) pr->noargs = p[POPT_NOARGS]; HUnlock(handle);
