Commit Graph

169 Commits

Author SHA1 Message Date
Jack Jansen 0168f279cc Added options for keeping window open on normal/error termination
Moved whole exit-handling of console window here (from pythonrun.c)
1995-10-27 13:32:30 +00:00
Jack Jansen 85c9aea6e2 Added prototypes. 1995-10-23 13:57:03 +00:00
Jack Jansen 178652b06d Export strdup (parsermodule needs it) 1995-10-12 10:22:57 +00:00
Jack Jansen 83f45401e8 Removed unused variables 1995-10-09 23:25:32 +00:00
Jack Jansen b39be2173b Fixed to work on 68K (could be yet another optimizer bug or something) 1995-09-01 11:48:10 +00:00
Jack Jansen 41fa7ea719 Python will now attempt (again) to create at least a minimal
preferences file if it is missing.
1995-08-31 13:59:36 +00:00
Jack Jansen 847e89ecfa Removed unused variables 1995-08-31 13:57:40 +00:00
Jack Jansen 57633c1a48 removed unused variables 1995-08-31 13:57:06 +00:00
Jack Jansen 819f1770f6 Lots of stuff moved to other files.
Include pythonresources.h.
1995-08-14 12:35:10 +00:00
Jack Jansen 696c95800e This is completely different from the old mainmain (which wasn't used
anymore) and is the new main program for MacPython. Built from bits
and pieces of config.c, macglue.c and pythonmain.c.
1995-08-14 12:33:20 +00:00
Jack Jansen 12fce3eda9 macgetpath - sys.path setting code factored out of config.c and
macglue.c
macgetplatform - factored out of config.c
1995-08-14 12:31:44 +00:00
Jack Jansen f717ac29f0 Merged Jack's macgetcompiler.c and Guido's maccompiler.c and named the
result macgetcompiler.c (after all, *I* did the merging:-)
1995-08-14 12:30:15 +00:00
Guido van Rossum 6e39e53cde Initial revision 1995-08-08 14:11:07 +00:00
Jack Jansen cf6369394e Better error messages wrt missing resources and preferences 1995-08-07 14:36:06 +00:00
Jack Jansen 292b0f96f3 Added code so you canset "command line options" if you
option-click/drag python. Needs a new dialog resource.
1995-07-29 13:52:37 +00:00
Jack Jansen cc456fbe82 Un-installing of AE handlers fixed (AE is very picky that you specify
the same UPP)
1995-07-29 13:50:59 +00:00
Jack Jansen f74f63a43f Initial port to CodeWarrior CFM68K support (mainly by disabling
unsupported features).
1995-06-27 13:18:14 +00:00
Jack Jansen 08305504f1 Added code to obtain sys.path from a resource
Removed code to update the preferences file, use EditPythonPrefs.py
in stead (actually, code is still there if you define USE_MAC_MODPREFS)
1995-06-18 20:03:40 +00:00
Jack Jansen 2a58638eae Ported to CW6 1995-06-14 14:44:17 +00:00
Jack Jansen 45ff77f43e - The prefs file wasn't updated correctly if it already existed.
- Guido's r1.23 fix wrt PyMac_DoYieldEnabled had somehow gotten lost.
1995-04-24 12:41:41 +00:00
Jack Jansen 16df2aa57b Under MW also be more conservative about events to request 1995-02-27 16:17:28 +00:00
Guido van Rossum e7134aa0f2 return old value of PyMac_DoYieldEnabled; -1 means do not even check for interrupts 1995-02-26 10:20:53 +00:00
Jack Jansen 76efd8e7a1 MAde a few things more orthogonal and did some cleanups:
- Applications now have their (minimal) main prrogram in
  macapplication.c and the rest of the init code in macglue.c.
- A new define, USE_MAC_APPLET_SUPPORT, independent of
  USE_MAC_SHARED_LIB
- chdir to script directory now done in PyMac_InitApplication.
1995-02-24 22:53:16 +00:00
Guido van Rossum 24a45e3c18 ported to MPW, moved main() here 1995-02-20 23:45:53 +00:00
Guido van Rossum 850f44b47c moved main() to macglue.c 1995-02-20 23:45:09 +00:00
Guido van Rossum 7c496ec629 ported to CFM-68K 1995-02-20 23:44:43 +00:00
Jack Jansen 3ec804af85 - Added PyMac_GetDirectory call which asks the user to select a
directory.
- No __main__ resource found message is now a dialog
- Fixes wrt stdio window handling in applets.

NB: these fixes require a new resource file.
1995-02-20 15:56:10 +00:00
Guido van Rossum 6fc5aecd53 ported back to Think C 1995-02-19 23:32:59 +00:00
Guido van Rossum 8c89a6fdc7 use PyMac_GetArgv (in macgetargv.c) for applet inits 1995-02-19 15:52:17 +00:00
Guido van Rossum dbfb282d2c get argc/argv from AppleEvents 1995-02-19 15:51:30 +00:00
Guido van Rossum c3d1c8e9fc added applet initialization;
fewer restrictions on loading modules from resources (+ fix!);
macstrerror -> MacOS_StrError
1995-02-18 15:01:31 +00:00
Guido van Rossum e5df962958 moved most of it to macglue.c 1995-02-18 14:56:09 +00:00
Guido van Rossum 930b36b349 main program for applets 1995-02-17 14:24:53 +00:00
Jack Jansen 74162f311f Added support for loading pyc code from a resource. 1995-02-15 22:58:33 +00:00
Guido van Rossum becdbec806 ported to Think C 1995-02-14 01:27:24 +00:00
Jack Jansen 6cfab2346c Changed PyMac_GetPythonDir to use a preferences file to store the
alias resource. Also added a few comments.
1995-02-13 22:46:00 +00:00
Jack Jansen fc0ff42034 Open library resource file read-only 1995-02-13 22:43:38 +00:00
Guido van Rossum cc9bc8f824 null-terminate the error string in macstrerror 1995-02-13 16:17:03 +00:00
Jack Jansen 2e4679db8e Glue for the python shared library: an init routine that remembers
where we're loaded from and PyMac_AddLibResources() which adds that
file to the resource file list.
1995-02-13 11:39:17 +00:00
Jack Jansen f950f8d414 Various changes wrt shared-library python:
- Moved fileargument to config.c
- Added PyMac_AddLibResources() call in case of shlib python
- Build argc/argv differently in case of applet template
1995-02-13 11:35:34 +00:00
Jack Jansen 8cd2b720f6 Added PyMac_GetPythonDir routine which obtains python home directory
from an alias resource (or from the user). Note: this uses a dialog
resource so there's an accompanying change in the resource file.
1995-02-13 11:33:28 +00:00
Jack Jansen b3642579fd Added getfiletype routine 1995-02-13 11:31:51 +00:00
Jack Jansen c76fd39587 Added stuff so CodeWarrior isn't so verbose about its stdio windows 1995-02-02 14:27:31 +00:00
Jack Jansen a76382a6ac Added HandleEvent method to macos, so python programs can hand back
events they don't want to handle to stdio
1995-02-02 14:25:56 +00:00
Guido van Rossum cc0d879069 added <OSEvents.h> for Think C 1995-01-30 08:57:13 +00:00
Jack Jansen ee23d6ec87 - Moved interrupt code to macglue.c
- Added possibility to turn off mainloop event handling
- Check interrupts even when not handling events
- Be more carefulabout which events we want
- Use different method to determine fg/bg
1995-01-27 14:43:25 +00:00
Guido van Rossum 5279ec683a reverse h/v in Point and Rect 1995-01-26 22:56:59 +00:00
Jack Jansen e8e8ae0f2c Added eventhandling in mainloop/busywait routine plus leaving some
cycles for background apps. MacOS has a new method to set the amount
of time for bg apps.
1995-01-26 16:36:45 +00:00
Guido van Rossum cf27c2d541 Some layout changes; added EventRecord Get/Build functions (as a tuple). 1995-01-25 23:06:44 +00:00
Guido van Rossum c2544b3788 fixed comment 1995-01-22 18:42:33 +00:00
Guido van Rossum c02311ba53 added printf -- hack for Think C to init stdwin and stdio 1995-01-22 18:38:12 +00:00
Guido van Rossum b340466af9 cosmetics: copyright, comments 1995-01-22 18:36:13 +00:00
Guido van Rossum 9aa3d1370e renamed Get routines to PyMac_Get; added macfs to config.c 1995-01-21 13:46:04 +00:00
Guido van Rossum 8f69179f97 modernized/rationalized, added PyMac_BuildOSType 1995-01-18 23:57:26 +00:00
Jack Jansen d50e4e1c54 More Pstring() stuff and some cosmetics 1995-01-18 13:58:04 +00:00
Jack Jansen 5f653091d1 - Moved some useful routines from macosmodule.c here
- Added GetFSSpec (tuple-style), BuildFSSpec and Pstring
  (platform-independent correct conversion of C to Pascal strings)
1995-01-18 13:53:49 +00:00
Guido van Rossum 5c83252be4 must include rename2.h 1995-01-17 15:57:48 +00:00
Guido van Rossum fffb8bb526 rename2 changes 1995-01-12 12:37:24 +00:00
Guido van Rossum 99546997f6 1995 copyright 1995-01-08 14:33:34 +00:00
Jack Jansen f93c72a4b0 New routines:
macstrerror - strerror which uses 'Estr' resource to convert numerical
	MacOS errors to strings.
PyErr_Mac - Raise exception with MacOS error in string form.
PyMac_Idle - better idle-loop routine, which allows the user to
	switch applications.
1994-12-14 14:07:50 +00:00
Jack Jansen bac428d2e0 Enlarged version buffer (nobody expects the spanish inquisition:-)
Support for new sys.path code in config.c
1994-12-14 13:47:30 +00:00
Guido van Rossum 950d47fd67 Make it work under MPW too. 1994-10-01 14:24:17 +00:00
Guido van Rossum 2d16703d65 gestaltmodule.c: interface to Gestalt Manager.
macosmodule.c: interface to random collection of Managers.
macsetfiletype.c: set file type, for import.c.
1994-09-16 10:54:21 +00:00
Guido van Rossum 739267b7c3 Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
versions -- they now share config.c and config.h, and statting is
always done through macstat.[ch] (THINK's <stat.h> defines funny
constants).  Also the configuration of stdwin is done differently: you
have to define USE_STDWIN to the compiler prefix.
1994-08-29 08:42:37 +00:00
Guido van Rossum e783444440 Intermediate version of changes after porting to MPW 3.2 1994-08-26 09:09:48 +00:00
Guido van Rossum b0f3c82a3b Added macmain.c (separate Mac specific main prog); bump version to 1.1 1994-08-23 13:34:25 +00:00
Guido van Rossum d4d7728440 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here. 1994-08-19 10:51:31 +00:00
Guido van Rossum c93e13d734 Replace <MacHeaders> by specific required header files 1994-06-27 15:25:12 +00:00
Guido van Rossum ce9739ba76 Initial revision 1994-01-05 16:17:15 +00:00