diff options
| author | Miles Bader | 2005-03-09 00:09:34 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-03-09 00:09:34 +0000 |
| commit | 2cdd4f8845ab5519a15f3c603d9ab48f7e1a91bd (patch) | |
| tree | 61823da8e4c3589c2c30ffaea3353cb92def7b1f /src | |
| parent | bcd98ae6b3b5ed8f38618b3a52acdbcd944c8095 (diff) | |
| parent | ec3c4a4cf2b336d2ca507e30877115a3e37e4df4 (diff) | |
| download | emacs-2cdd4f8845ab5519a15f3c603d9ab48f7e1a91bd.tar.gz emacs-2cdd4f8845ab5519a15f3c603d9ab48f7e1a91bd.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-23
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 150-165)
- Update from CVS
- Merge from gnus--rel--5.10
- Add info/dir to arch branch
* miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 34-37)
- Merge from emacs--cvs-trunk--0
- Update from CVS
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 136 | ||||
| -rw-r--r-- | src/blockinput.h | 23 | ||||
| -rw-r--r-- | src/doc.c | 32 | ||||
| -rw-r--r-- | src/emacs.c | 21 | ||||
| -rw-r--r-- | src/eval.c | 9 | ||||
| -rw-r--r-- | src/fileio.c | 31 | ||||
| -rw-r--r-- | src/fontset.c | 32 | ||||
| -rw-r--r-- | src/fontset.h | 1 | ||||
| -rw-r--r-- | src/frame.c | 1 | ||||
| -rw-r--r-- | src/image.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 5 | ||||
| -rw-r--r-- | src/lisp.h | 5 | ||||
| -rw-r--r-- | src/mac.c | 98 | ||||
| -rw-r--r-- | src/macfns.c | 34 | ||||
| -rw-r--r-- | src/macgui.h | 18 | ||||
| -rw-r--r-- | src/macmenu.c | 4 | ||||
| -rw-r--r-- | src/macterm.c | 78 | ||||
| -rw-r--r-- | src/macterm.h | 7 | ||||
| -rw-r--r-- | src/s/vms.h | 9 | ||||
| -rw-r--r-- | src/s/vms4-4.h | 2 | ||||
| -rw-r--r-- | src/s/vms5-5.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 53 |
22 files changed, 451 insertions, 158 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index eb0a3d0cf3b..34ef6c228bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,132 @@ | |||
| 1 | 2005-03-08 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * frame.c (x_set_font): Call set_default_ascii_font if an | ||
| 4 | available font is found. | ||
| 5 | |||
| 6 | * fontset.c (set_default_ascii_font): New function. | ||
| 7 | (syms_of_fontset): Don't set FONTSET_ASCII (Vdefault_fontset) | ||
| 8 | here. | ||
| 9 | |||
| 10 | * fontset.h (set_default_ascii_font): Extern it. | ||
| 11 | |||
| 12 | 2005-03-07 Kim F. Storm <storm@cua.dk> | ||
| 13 | |||
| 14 | * xdisp.c (CLEAR_IMAGE_CACHE_COUNT): New const. | ||
| 15 | (clear_image_cache_count): New var. | ||
| 16 | (redisplay_internal): Don't clear face and image caches in the | ||
| 17 | middle of redisplay; do it afterwards. | ||
| 18 | |||
| 19 | * blockinput.h (TOTALLY_UNBLOCK_INPUT): Avoid dangling else. | ||
| 20 | |||
| 21 | * xdisp.c (notice_overwritten_cursor): Check that phys_cursor.vpos | ||
| 22 | is valid. If not, clear phys_cursor_on_p and return. | ||
| 23 | |||
| 24 | 2005-03-07 Andreas Schwab <schwab@suse.de> | ||
| 25 | |||
| 26 | * blockinput.h (UNBLOCK_INPUT_TO): Always call UNBLOCK_INPUT. | ||
| 27 | |||
| 28 | 2005-03-06 Richard M. Stallman <rms@gnu.org> | ||
| 29 | |||
| 30 | * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT. | ||
| 31 | |||
| 32 | * eval.c (unwind_to_catch): Use UNBLOCK_INPUT_TO. | ||
| 33 | (Feval, Ffuncall): Use CHECK_CONS_LIST. | ||
| 34 | |||
| 35 | * lisp.h (CHECK_CONS_LIST): New macro (two definitions). | ||
| 36 | |||
| 37 | * blockinput.h (UNBLOCK_INPUT_TO): New macro. | ||
| 38 | (TOTALLY_UNBLOCK_INPUT): Handle a pending signal if any. | ||
| 39 | |||
| 40 | 2005-03-05 Juri Linkov <juri@jurta.org> | ||
| 41 | |||
| 42 | * emacs.c (USAGE1): Replace Info node name "command arguments" | ||
| 43 | with "emacs invocation". | ||
| 44 | (USAGE3): Fix usage of `--color=MODE' which actually doesn't | ||
| 45 | allow arguments `--color' and `MODE' to be separated by space. | ||
| 46 | Add --no-blinking-cursor, -nbc. | ||
| 47 | (standard_args): Add -nbc, --no-blinking-cursor. | ||
| 48 | |||
| 49 | 2005-03-04 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 50 | |||
| 51 | * s/vms.h: Define NO_HYPHENS_IN_FILENAMES. | ||
| 52 | * s/vms4-4.h, s/vms5-5.h: Undefine NO_HYPHENS_IN_FILENAMES. | ||
| 53 | * fileio.c (Fexpand_file_name) [VMS]: | ||
| 54 | Use NO_HYPHENS_IN_FILENAMES, not VMS4_4. | ||
| 55 | * doc.c (munge_doc_file_name) [VMS]: Likewise. | ||
| 56 | (Fsnarf_documentation): Call munge_doc_file_name. | ||
| 57 | |||
| 58 | 2005-03-04 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 59 | |||
| 60 | * s/vms.h (FILE_SYSTEM_CASE): New macro. | ||
| 61 | * fileio.c (Fexpand_file_name) [VMS]: Don't upcase the name | ||
| 62 | "manually"; this is now handled generally via FILE_SYSTEM_CASE. | ||
| 63 | |||
| 64 | 2005-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 65 | |||
| 66 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if | ||
| 67 | defined (MAC_OSX) && defined (HAVE_CARBON)'. | ||
| 68 | |||
| 69 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include | ||
| 70 | QuickTime.h. | ||
| 71 | |||
| 72 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | ||
| 73 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. | ||
| 74 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New | ||
| 75 | functions. | ||
| 76 | (mac_clear_font_name_table): Move extern to macterm.h. | ||
| 77 | |||
| 78 | * macfns.c (install_window_handler): Move extern to macterm.h. | ||
| 79 | (Fx_file_dialog): Check STRINGP (default_filename) to see it is | ||
| 80 | valid. Don't check !NILP (dir) because it is already checked with | ||
| 81 | CHECK_STRING. | ||
| 82 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for | ||
| 83 | specifying the default location and obtaining the selected | ||
| 84 | filename. | ||
| 85 | |||
| 86 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | ||
| 87 | |||
| 88 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that | ||
| 89 | are included via Carbon.h. | ||
| 90 | |||
| 91 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: Define | ||
| 92 | USE_CARBON_EVENTS to 1. | ||
| 93 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. | ||
| 94 | (x_free_frame_resources): Call remove_window_handler for | ||
| 95 | non-tooltip windows. | ||
| 96 | [TARGET_API_MAC_CARBON]: Don't include headers that are included | ||
| 97 | via Carbon.h. | ||
| 98 | [TARGET_API_MAC_CARBON] (mac_do_track_dragUPP) | ||
| 99 | (mac_do_receive_dragUPP): New variables. | ||
| 100 | (mac_handle_service_event, init_service_handler): Put declarations | ||
| 101 | and definitions in #ifdef MAC_OSX. | ||
| 102 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for | ||
| 103 | drag-and-drop handler functions and register them. | ||
| 104 | (remove_window_handler): New function. | ||
| 105 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use | ||
| 106 | fsspec_to_posix_pathname. | ||
| 107 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. | ||
| 108 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. | ||
| 109 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set | ||
| 110 | default cursors. | ||
| 111 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call | ||
| 112 | init_service_handler or init_quit_char_handler. | ||
| 113 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. | ||
| 114 | |||
| 115 | * macterm.h (install_window_handler, remove_window_handler) | ||
| 116 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname) | ||
| 117 | (mac_clear_font_name_table): New externs. | ||
| 118 | |||
| 119 | 2005-03-03 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 120 | |||
| 121 | * fileio.c (FILE_SYSTEM_CASE): Define macro if not already defined. | ||
| 122 | (Ffile_name_directory): Use FILE_SYSTEM_CASE unconditionally. | ||
| 123 | (Fexpand_file_name): Likewise. | ||
| 124 | |||
| 125 | 2005-03-03 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 126 | |||
| 127 | * emacs.c (Fkill_emacs): Use EXIT_SUCCESS; | ||
| 128 | no longer special-case VMS. Add bogus return value. | ||
| 129 | |||
| 1 | 2005-03-02 Kim F. Storm <storm@cua.dk> | 130 | 2005-03-02 Kim F. Storm <storm@cua.dk> |
| 2 | 131 | ||
| 3 | * dispextern.h (XASSERTS): Define to 0 if not already defined. | 132 | * dispextern.h (XASSERTS): Define to 0 if not already defined. |
| @@ -17,6 +146,11 @@ | |||
| 17 | 146 | ||
| 18 | * keyboard.c (Fposn_at_x_y): Check integerness of X and Y. | 147 | * keyboard.c (Fposn_at_x_y): Check integerness of X and Y. |
| 19 | 148 | ||
| 149 | 2005-02-27 Richard M. Stallman <rms@gnu.org> | ||
| 150 | |||
| 151 | * xdisp.c (fast_find_position): Rename END to BEG. | ||
| 152 | (syms_of_xdisp) <menu-bar-update-hook>: Doc fix. | ||
| 153 | |||
| 20 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 154 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 21 | 155 | ||
| 22 | * gtkutil.c (xg_resize_outer_widget): Remove unneeded call to | 156 | * gtkutil.c (xg_resize_outer_widget): Remove unneeded call to |
| @@ -777,7 +911,7 @@ | |||
| 777 | [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. | 911 | [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. |
| 778 | Reject only when there are no filename items. Set background color | 912 | Reject only when there are no filename items. Set background color |
| 779 | before (un)highlighting the window below the dragged items. | 913 | before (un)highlighting the window below the dragged items. |
| 780 | (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update. | 914 | (XTread_socket) [USE_CARBON_EVENTS]: Don't call do_window_update. |
| 781 | 915 | ||
| 782 | 2005-01-05 Romain Francoise <romain@orebokech.com> | 916 | 2005-01-05 Romain Francoise <romain@orebokech.com> |
| 783 | 917 | ||
diff --git a/src/blockinput.h b/src/blockinput.h index a4c8a9b9c22..6aa865ea9be 100644 --- a/src/blockinput.h +++ b/src/blockinput.h | |||
| @@ -94,7 +94,28 @@ extern int pending_atimers; | |||
| 94 | } \ | 94 | } \ |
| 95 | while (0) | 95 | while (0) |
| 96 | 96 | ||
| 97 | #define TOTALLY_UNBLOCK_INPUT (interrupt_input_blocked = 0) | 97 | /* Undo any number of BLOCK_INPUT calls, |
| 98 | and also reinvoke any pending signal. */ | ||
| 99 | |||
| 100 | #define TOTALLY_UNBLOCK_INPUT \ | ||
| 101 | do if (interrupt_input_blocked != 0) \ | ||
| 102 | { \ | ||
| 103 | interrupt_input_blocked = 1; \ | ||
| 104 | UNBLOCK_INPUT; \ | ||
| 105 | } \ | ||
| 106 | while (0) | ||
| 107 | |||
| 108 | /* Undo any number of BLOCK_INPUT calls down to level LEVEL, | ||
| 109 | and also (if the level is now 0) reinvoke any pending signal. */ | ||
| 110 | |||
| 111 | #define UNBLOCK_INPUT_TO(LEVEL) \ | ||
| 112 | do \ | ||
| 113 | { \ | ||
| 114 | interrupt_input_blocked = (LEVEL) + 1; \ | ||
| 115 | UNBLOCK_INPUT; \ | ||
| 116 | } \ | ||
| 117 | while (0) | ||
| 118 | |||
| 98 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT | 119 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT |
| 99 | 120 | ||
| 100 | /* In critical section ? */ | 121 | /* In critical section ? */ |
| @@ -58,26 +58,24 @@ static Lisp_Object Vbuild_files; | |||
| 58 | extern Lisp_Object Voverriding_local_map; | 58 | extern Lisp_Object Voverriding_local_map; |
| 59 | 59 | ||
| 60 | /* For VMS versions with limited file name syntax, | 60 | /* For VMS versions with limited file name syntax, |
| 61 | convert the name to something VMS will allow. */ | 61 | convert the name to something VMS will allow. */ |
| 62 | static void | 62 | static void |
| 63 | munge_doc_file_name (name) | 63 | munge_doc_file_name (name) |
| 64 | char *name; | 64 | char *name; |
| 65 | { | 65 | { |
| 66 | #ifdef VMS | 66 | #ifdef VMS |
| 67 | #ifndef VMS4_4 | 67 | #ifndef NO_HYPHENS_IN_FILENAMES |
| 68 | /* For VMS versions with limited file name syntax, | 68 | extern char * sys_translate_unix (char *ufile); |
| 69 | convert the name to something VMS will allow. */ | 69 | strcpy (name, sys_translate_unix (name)); |
| 70 | p = name; | 70 | #else /* NO_HYPHENS_IN_FILENAMES */ |
| 71 | char *p = name; | ||
| 71 | while (*p) | 72 | while (*p) |
| 72 | { | 73 | { |
| 73 | if (*p == '-') | 74 | if (*p == '-') |
| 74 | *p = '_'; | 75 | *p = '_'; |
| 75 | p++; | 76 | p++; |
| 76 | } | 77 | } |
| 77 | #endif /* not VMS4_4 */ | 78 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 78 | #ifdef VMS4_4 | ||
| 79 | strcpy (name, sys_translate_unix (name)); | ||
| 80 | #endif /* VMS4_4 */ | ||
| 81 | #endif /* VMS */ | 79 | #endif /* VMS */ |
| 82 | } | 80 | } |
| 83 | 81 | ||
| @@ -607,21 +605,7 @@ the same file name is found in the `doc-directory'. */) | |||
| 607 | strcpy (name, SDATA (Vdoc_directory)); | 605 | strcpy (name, SDATA (Vdoc_directory)); |
| 608 | } | 606 | } |
| 609 | strcat (name, SDATA (filename)); /*** Add this line ***/ | 607 | strcat (name, SDATA (filename)); /*** Add this line ***/ |
| 610 | #ifdef VMS | 608 | munge_doc_file_name (name); |
| 611 | #ifndef VMS4_4 | ||
| 612 | /* For VMS versions with limited file name syntax, | ||
| 613 | convert the name to something VMS will allow. */ | ||
| 614 | p = name; | ||
| 615 | while (*p) | ||
| 616 | { | ||
| 617 | if (*p == '-') | ||
| 618 | *p = '_'; | ||
| 619 | p++; | ||
| 620 | } | ||
| 621 | #else /* VMS4_4 */ | ||
| 622 | strcpy (name, sys_translate_unix (name)); | ||
| 623 | #endif /* VMS4_4 */ | ||
| 624 | #endif /* VMS */ | ||
| 625 | 609 | ||
| 626 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ | 610 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ |
| 627 | if (NILP (Vbuild_files)) | 611 | if (NILP (Vbuild_files)) |
diff --git a/src/emacs.c b/src/emacs.c index 300f8ef6858..50c95896b4f 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -250,7 +250,7 @@ Run Emacs, the extensible, customizable, self-documenting real-time\n\ | |||
| 250 | display editor. The recommended way to start Emacs for normal editing\n\ | 250 | display editor. The recommended way to start Emacs for normal editing\n\ |
| 251 | is with no options at all.\n\ | 251 | is with no options at all.\n\ |
| 252 | \n\ | 252 | \n\ |
| 253 | Run M-x info RET m emacs RET m command arguments RET inside Emacs to\n\ | 253 | Run M-x info RET m emacs RET m emacs invocation RET inside Emacs to\n\ |
| 254 | read the main documentation for these command-line arguments.\n\ | 254 | read the main documentation for these command-line arguments.\n\ |
| 255 | \n\ | 255 | \n\ |
| 256 | Initialization options:\n\ | 256 | Initialization options:\n\ |
| @@ -296,7 +296,7 @@ Display options:\n\ | |||
| 296 | --background-color, -bg COLOR window background color\n\ | 296 | --background-color, -bg COLOR window background color\n\ |
| 297 | --border-color, -bd COLOR main border color\n\ | 297 | --border-color, -bd COLOR main border color\n\ |
| 298 | --border-width, -bw WIDTH width of main border\n\ | 298 | --border-width, -bw WIDTH width of main border\n\ |
| 299 | --color MODE color mode for character terminals;\n\ | 299 | --color, --color=MODE color mode for character terminals;\n\ |
| 300 | MODE defaults to `auto', and can also\n\ | 300 | MODE defaults to `auto', and can also\n\ |
| 301 | be `never', `auto', `always',\n\ | 301 | be `never', `auto', `always',\n\ |
| 302 | or a mode name like `ansi8'\n\ | 302 | or a mode name like `ansi8'\n\ |
| @@ -313,6 +313,7 @@ Display options:\n\ | |||
| 313 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ | 313 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ |
| 314 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ | 314 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ |
| 315 | --name NAME title for initial Emacs frame\n\ | 315 | --name NAME title for initial Emacs frame\n\ |
| 316 | --no-blinking-cursor, -nbc disable blinking cursor\n\ | ||
| 316 | --reverse-video, -r, -rv switch foreground and background\n\ | 317 | --reverse-video, -r, -rv switch foreground and background\n\ |
| 317 | --title, -T TITLE title for initial Emacs frame\n\ | 318 | --title, -T TITLE title for initial Emacs frame\n\ |
| 318 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ | 319 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ |
| @@ -1486,7 +1487,7 @@ main (argc, argv | |||
| 1486 | init_ntproc (); /* must precede init_editfns. */ | 1487 | init_ntproc (); /* must precede init_editfns. */ |
| 1487 | #endif | 1488 | #endif |
| 1488 | 1489 | ||
| 1489 | #ifdef HAVE_CARBON | 1490 | #if defined (MAC_OSX) && defined (HAVE_CARBON) |
| 1490 | if (initialized) | 1491 | if (initialized) |
| 1491 | init_mac_osx_environment (); | 1492 | init_mac_osx_environment (); |
| 1492 | #endif | 1493 | #endif |
| @@ -1632,12 +1633,12 @@ main (argc, argv | |||
| 1632 | syms_of_fontset (); | 1633 | syms_of_fontset (); |
| 1633 | #endif /* HAVE_NTGUI */ | 1634 | #endif /* HAVE_NTGUI */ |
| 1634 | 1635 | ||
| 1635 | #ifdef HAVE_CARBON | 1636 | #if defined (MAC_OSX) && defined (HAVE_CARBON) |
| 1636 | syms_of_macterm (); | 1637 | syms_of_macterm (); |
| 1637 | syms_of_macfns (); | 1638 | syms_of_macfns (); |
| 1638 | syms_of_macmenu (); | 1639 | syms_of_macmenu (); |
| 1639 | syms_of_fontset (); | 1640 | syms_of_fontset (); |
| 1640 | #endif /* HAVE_CARBON */ | 1641 | #endif /* MAC_OSX && HAVE_CARBON */ |
| 1641 | 1642 | ||
| 1642 | #ifdef SYMS_SYSTEM | 1643 | #ifdef SYMS_SYSTEM |
| 1643 | SYMS_SYSTEM; | 1644 | SYMS_SYSTEM; |
| @@ -1832,6 +1833,7 @@ struct standard_args standard_args[] = | |||
| 1832 | { "-ib", "--internal-border", 10, 1 }, | 1833 | { "-ib", "--internal-border", 10, 1 }, |
| 1833 | { "-ms", "--mouse-color", 10, 1 }, | 1834 | { "-ms", "--mouse-color", 10, 1 }, |
| 1834 | { "-cr", "--cursor-color", 10, 1 }, | 1835 | { "-cr", "--cursor-color", 10, 1 }, |
| 1836 | { "-nbc", "--no-blinking-cursor", 10, 0 }, | ||
| 1835 | { "-fn", "--font", 10, 1 }, | 1837 | { "-fn", "--font", 10, 1 }, |
| 1836 | { "-font", 0, 10, 1 }, | 1838 | { "-font", 0, 10, 1 }, |
| 1837 | { "-fs", "--fullscreen", 10, 0 }, | 1839 | { "-fs", "--fullscreen", 10, 0 }, |
| @@ -2060,14 +2062,9 @@ all of which are called before Emacs is actually killed. */) | |||
| 2060 | if (STRINGP (Vauto_save_list_file_name)) | 2062 | if (STRINGP (Vauto_save_list_file_name)) |
| 2061 | unlink (SDATA (Vauto_save_list_file_name)); | 2063 | unlink (SDATA (Vauto_save_list_file_name)); |
| 2062 | 2064 | ||
| 2063 | exit (INTEGERP (arg) ? XINT (arg) | 2065 | exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); |
| 2064 | #ifdef VMS | ||
| 2065 | : 1 | ||
| 2066 | #else | ||
| 2067 | : 0 | ||
| 2068 | #endif | ||
| 2069 | ); | ||
| 2070 | /* NOTREACHED */ | 2066 | /* NOTREACHED */ |
| 2067 | return 0; | ||
| 2071 | } | 2068 | } |
| 2072 | 2069 | ||
| 2073 | 2070 | ||
diff --git a/src/eval.c b/src/eval.c index 83e16360473..bf4fec4f8a1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1176,7 +1176,7 @@ unwind_to_catch (catch, value) | |||
| 1176 | 1176 | ||
| 1177 | /* Restore certain special C variables. */ | 1177 | /* Restore certain special C variables. */ |
| 1178 | set_poll_suppress_count (catch->poll_suppress_count); | 1178 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1179 | interrupt_input_blocked = catch->interrupt_input_blocked; | 1179 | UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); |
| 1180 | handling_signal = 0; | 1180 | handling_signal = 0; |
| 1181 | immediate_quit = 0; | 1181 | immediate_quit = 0; |
| 1182 | 1182 | ||
| @@ -2067,6 +2067,8 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2067 | args_left = original_args; | 2067 | args_left = original_args; |
| 2068 | numargs = Flength (args_left); | 2068 | numargs = Flength (args_left); |
| 2069 | 2069 | ||
| 2070 | CHECK_CONS_LIST (); | ||
| 2071 | |||
| 2070 | if (XINT (numargs) < XSUBR (fun)->min_args || | 2072 | if (XINT (numargs) < XSUBR (fun)->min_args || |
| 2071 | (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) | 2073 | (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) |
| 2072 | return Fsignal (Qwrong_number_of_arguments, Fcons (fun, Fcons (numargs, Qnil))); | 2074 | return Fsignal (Qwrong_number_of_arguments, Fcons (fun, Fcons (numargs, Qnil))); |
| @@ -2190,6 +2192,8 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2190 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); | 2192 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); |
| 2191 | } | 2193 | } |
| 2192 | done: | 2194 | done: |
| 2195 | CHECK_CONS_LIST (); | ||
| 2196 | |||
| 2193 | lisp_eval_depth--; | 2197 | lisp_eval_depth--; |
| 2194 | if (backtrace.debug_on_exit) | 2198 | if (backtrace.debug_on_exit) |
| 2195 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2199 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); |
| @@ -2746,6 +2750,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2746 | 2750 | ||
| 2747 | if (SUBRP (fun)) | 2751 | if (SUBRP (fun)) |
| 2748 | { | 2752 | { |
| 2753 | CHECK_CONS_LIST (); | ||
| 2754 | |||
| 2749 | if (numargs < XSUBR (fun)->min_args | 2755 | if (numargs < XSUBR (fun)->min_args |
| 2750 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) | 2756 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) |
| 2751 | { | 2757 | { |
| @@ -2844,6 +2850,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2844 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); | 2850 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); |
| 2845 | } | 2851 | } |
| 2846 | done: | 2852 | done: |
| 2853 | CHECK_CONS_LIST (); | ||
| 2847 | lisp_eval_depth--; | 2854 | lisp_eval_depth--; |
| 2848 | if (backtrace.debug_on_exit) | 2855 | if (backtrace.debug_on_exit) |
| 2849 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2856 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); |
diff --git a/src/fileio.c b/src/fileio.c index c21cdcec675..db511aad887 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -148,6 +148,10 @@ extern int use_file_dialog; | |||
| 148 | # define lstat stat | 148 | # define lstat stat |
| 149 | #endif | 149 | #endif |
| 150 | 150 | ||
| 151 | #ifndef FILE_SYSTEM_CASE | ||
| 152 | #define FILE_SYSTEM_CASE(filename) (filename) | ||
| 153 | #endif | ||
| 154 | |||
| 151 | /* Nonzero during writing of auto-save files */ | 155 | /* Nonzero during writing of auto-save files */ |
| 152 | int auto_saving; | 156 | int auto_saving; |
| 153 | 157 | ||
| @@ -417,9 +421,7 @@ on VMS, perhaps instead a string ending in `:', `]' or `>'. */) | |||
| 417 | if (!NILP (handler)) | 421 | if (!NILP (handler)) |
| 418 | return call2 (handler, Qfile_name_directory, filename); | 422 | return call2 (handler, Qfile_name_directory, filename); |
| 419 | 423 | ||
| 420 | #ifdef FILE_SYSTEM_CASE | ||
| 421 | filename = FILE_SYSTEM_CASE (filename); | 424 | filename = FILE_SYSTEM_CASE (filename); |
| 422 | #endif | ||
| 423 | beg = SDATA (filename); | 425 | beg = SDATA (filename); |
| 424 | #ifdef DOS_NT | 426 | #ifdef DOS_NT |
| 425 | beg = strcpy (alloca (strlen (beg) + 1), beg); | 427 | beg = strcpy (alloca (strlen (beg) + 1), beg); |
| @@ -1124,14 +1126,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1124 | UNGCPRO; | 1126 | UNGCPRO; |
| 1125 | } | 1127 | } |
| 1126 | 1128 | ||
| 1127 | #ifdef VMS | ||
| 1128 | /* Filenames on VMS are always upper case. */ | ||
| 1129 | name = Fupcase (name); | ||
| 1130 | #endif | ||
| 1131 | #ifdef FILE_SYSTEM_CASE | ||
| 1132 | name = FILE_SYSTEM_CASE (name); | 1129 | name = FILE_SYSTEM_CASE (name); |
| 1133 | #endif | ||
| 1134 | |||
| 1135 | nm = SDATA (name); | 1130 | nm = SDATA (name); |
| 1136 | 1131 | ||
| 1137 | #ifdef DOS_NT | 1132 | #ifdef DOS_NT |
| @@ -1231,23 +1226,23 @@ See also the function `substitute-in-file-name'. */) | |||
| 1231 | slash = p; | 1226 | slash = p; |
| 1232 | } | 1227 | } |
| 1233 | if (p[0] == '-') | 1228 | if (p[0] == '-') |
| 1234 | #ifndef VMS4_4 | 1229 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1235 | /* VMS pre V4.4,convert '-'s in filenames. */ | ||
| 1236 | if (lbrack == rbrack) | 1230 | if (lbrack == rbrack) |
| 1237 | { | 1231 | { |
| 1238 | if (dots < 2) /* this is to allow negative version numbers */ | 1232 | /* Avoid clobbering negative version numbers. */ |
| 1233 | if (dots < 2) | ||
| 1239 | p[0] = '_'; | 1234 | p[0] = '_'; |
| 1240 | } | 1235 | } |
| 1241 | else | 1236 | else |
| 1242 | #endif /* VMS4_4 */ | 1237 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1243 | if (lbrack > rbrack && | 1238 | if (lbrack > rbrack && |
| 1244 | ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && | 1239 | ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && |
| 1245 | (p[1] == '.' || p[1] == ']' || p[1] == '>'))) | 1240 | (p[1] == '.' || p[1] == ']' || p[1] == '>'))) |
| 1246 | lose = 1; | 1241 | lose = 1; |
| 1247 | #ifndef VMS4_4 | 1242 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1248 | else | 1243 | else |
| 1249 | p[0] = '_'; | 1244 | p[0] = '_'; |
| 1250 | #endif /* VMS4_4 */ | 1245 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1251 | /* count open brackets, reset close bracket pointer */ | 1246 | /* count open brackets, reset close bracket pointer */ |
| 1252 | if (p[0] == '[' || p[0] == '<') | 1247 | if (p[0] == '[' || p[0] == '<') |
| 1253 | lbrack++, brack = 0; | 1248 | lbrack++, brack = 0; |
| @@ -1627,12 +1622,12 @@ See also the function `substitute-in-file-name'. */) | |||
| 1627 | } | 1622 | } |
| 1628 | else | 1623 | else |
| 1629 | { | 1624 | { |
| 1630 | #ifndef VMS4_4 | 1625 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1631 | if (*p == '-' && | 1626 | if (*p == '-' && |
| 1632 | o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && | 1627 | o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && |
| 1633 | p[1] != ']' && p[1] != '>' && p[1] != '.') | 1628 | p[1] != ']' && p[1] != '>' && p[1] != '.') |
| 1634 | *p = '_'; | 1629 | *p = '_'; |
| 1635 | #endif /* VMS4_4 */ | 1630 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1636 | *o++ = *p++; | 1631 | *o++ = *p++; |
| 1637 | } | 1632 | } |
| 1638 | #else /* not VMS */ | 1633 | #else /* not VMS */ |
| @@ -6301,7 +6296,7 @@ and `read-file-name-function'. */) | |||
| 6301 | { | 6296 | { |
| 6302 | Lisp_Object val1 = double_dollars (val); | 6297 | Lisp_Object val1 = double_dollars (val); |
| 6303 | tem = Fsymbol_value (Qfile_name_history); | 6298 | tem = Fsymbol_value (Qfile_name_history); |
| 6304 | if (history_delete_duplicates) | 6299 | if (history_delete_duplicates) |
| 6305 | XSETCDR (tem, Fdelete (val1, XCDR(tem))); | 6300 | XSETCDR (tem, Fdelete (val1, XCDR(tem))); |
| 6306 | XSETCAR (tem, val1); | 6301 | XSETCAR (tem, val1); |
| 6307 | } | 6302 | } |
diff --git a/src/fontset.c b/src/fontset.c index 4a1e3be2b61..4c54d636398 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -774,6 +774,23 @@ make_fontset (frame, name, base) | |||
| 774 | } | 774 | } |
| 775 | 775 | ||
| 776 | 776 | ||
| 777 | /* Set the ASCII font of the default fontset to FONTNAME if that is | ||
| 778 | not yet set. */ | ||
| 779 | void | ||
| 780 | set_default_ascii_font (fontname) | ||
| 781 | Lisp_Object fontname; | ||
| 782 | { | ||
| 783 | if (! CONSP (FONTSET_ASCII (Vdefault_fontset))) | ||
| 784 | { | ||
| 785 | int id = fs_query_fontset (fontname, 2); | ||
| 786 | |||
| 787 | if (id >= 0) | ||
| 788 | fontname = XCDR (FONTSET_ASCII (FONTSET_FROM_ID (id))); | ||
| 789 | FONTSET_ASCII (Vdefault_fontset) | ||
| 790 | = Fcons (make_number (0), fontname); | ||
| 791 | } | ||
| 792 | } | ||
| 793 | |||
| 777 | 794 | ||
| 778 | /********** INTERFACES TO xfaces.c, xfns.c, and dispextern.h **********/ | 795 | /********** INTERFACES TO xfaces.c, xfns.c, and dispextern.h **********/ |
| 779 | 796 | ||
| @@ -2129,21 +2146,6 @@ syms_of_fontset () | |||
| 2129 | FONTSET_ID (Vdefault_fontset) = make_number (0); | 2146 | FONTSET_ID (Vdefault_fontset) = make_number (0); |
| 2130 | FONTSET_NAME (Vdefault_fontset) | 2147 | FONTSET_NAME (Vdefault_fontset) |
| 2131 | = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); | 2148 | = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); |
| 2132 | { | ||
| 2133 | Lisp_Object default_ascii_font; | ||
| 2134 | |||
| 2135 | #if defined (macintosh) | ||
| 2136 | default_ascii_font | ||
| 2137 | = build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman"); | ||
| 2138 | #elif defined (WINDOWSNT) | ||
| 2139 | default_ascii_font | ||
| 2140 | = build_string ("-*-courier new-normal-r-*-*-*-100-*-*-*-*-iso8859-1"); | ||
| 2141 | #else | ||
| 2142 | default_ascii_font | ||
| 2143 | = build_string ("-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"); | ||
| 2144 | #endif | ||
| 2145 | FONTSET_ASCII (Vdefault_fontset) = default_ascii_font; | ||
| 2146 | } | ||
| 2147 | AREF (Vfontset_table, 0) = Vdefault_fontset; | 2149 | AREF (Vfontset_table, 0) = Vdefault_fontset; |
| 2148 | next_fontset_id = 1; | 2150 | next_fontset_id = 1; |
| 2149 | 2151 | ||
diff --git a/src/fontset.h b/src/fontset.h index 3de42977a67..2270d6aa7da 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -204,6 +204,7 @@ extern int face_for_char P_ ((FRAME_PTR, struct face *, int, | |||
| 204 | int, Lisp_Object)); | 204 | int, Lisp_Object)); |
| 205 | extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int, struct face *)); | 205 | extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int, struct face *)); |
| 206 | extern int new_fontset_from_font_name P_ ((Lisp_Object)); | 206 | extern int new_fontset_from_font_name P_ ((Lisp_Object)); |
| 207 | extern void set_default_ascii_font P_ ((Lisp_Object)); | ||
| 207 | extern struct font_info *fs_load_font P_ ((struct frame *, char *, int)); | 208 | extern struct font_info *fs_load_font P_ ((struct frame *, char *, int)); |
| 208 | extern int fs_query_fontset P_ ((Lisp_Object, int)); | 209 | extern int fs_query_fontset P_ ((Lisp_Object, int)); |
| 209 | EXFUN (Fquery_fontset, 2); | 210 | EXFUN (Fquery_fontset, 2); |
diff --git a/src/frame.c b/src/frame.c index 893708b02fc..f719fb935d8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3084,6 +3084,7 @@ x_set_font (f, arg, oldval) | |||
| 3084 | error ("The default fontset can't be used for a frame font"); | 3084 | error ("The default fontset can't be used for a frame font"); |
| 3085 | else if (STRINGP (result)) | 3085 | else if (STRINGP (result)) |
| 3086 | { | 3086 | { |
| 3087 | set_default_ascii_font (result); | ||
| 3087 | if (STRINGP (fontset_name)) | 3088 | if (STRINGP (fontset_name)) |
| 3088 | { | 3089 | { |
| 3089 | /* Fontset names are built from ASCII font names, so the | 3090 | /* Fontset names are built from ASCII font names, so the |
diff --git a/src/image.c b/src/image.c index 9c2f6962b6e..0e48b1d2bcb 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -88,15 +88,19 @@ typedef struct w32_bitmap_record Bitmap_Record; | |||
| 88 | #include <alloca.h> | 88 | #include <alloca.h> |
| 89 | #include <sys/param.h> | 89 | #include <sys/param.h> |
| 90 | #endif | 90 | #endif |
| 91 | #if TARGET_API_MAC_CARBON | ||
| 91 | #ifdef MAC_OSX | 92 | #ifdef MAC_OSX |
| 92 | #include <QuickTime/QuickTime.h> | 93 | #include <QuickTime/QuickTime.h> |
| 93 | #else /* not MAC_OSX */ | 94 | #else /* not MAC_OSX */ |
| 95 | #include <QuickTime.h> | ||
| 96 | #endif /* not MAC_OSX */ | ||
| 97 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 94 | #include <Windows.h> | 98 | #include <Windows.h> |
| 95 | #include <Gestalt.h> | 99 | #include <Gestalt.h> |
| 96 | #include <TextUtils.h> | 100 | #include <TextUtils.h> |
| 97 | #include <ImageCompression.h> | 101 | #include <ImageCompression.h> |
| 98 | #include <QuickTimeComponents.h> | 102 | #include <QuickTimeComponents.h> |
| 99 | #endif /* not MAC_OSX */ | 103 | #endif /* not TARGET_API_MAC_CARBON */ |
| 100 | 104 | ||
| 101 | /* MAC_TODO : Color tables on Mac. */ | 105 | /* MAC_TODO : Color tables on Mac. */ |
| 102 | #undef COLOR_TABLE_SUPPORT | 106 | #undef COLOR_TABLE_SUPPORT |
diff --git a/src/keyboard.c b/src/keyboard.c index fbdd768dd3a..525958020af 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1350,11 +1350,6 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", | |||
| 1350 | cancel_hourglass (); | 1350 | cancel_hourglass (); |
| 1351 | #endif | 1351 | #endif |
| 1352 | 1352 | ||
| 1353 | /* Unblock input if we enter with input blocked. This may happen if | ||
| 1354 | redisplay traps e.g. during tool-bar update with input blocked. */ | ||
| 1355 | while (INPUT_BLOCKED_P) | ||
| 1356 | UNBLOCK_INPUT; | ||
| 1357 | |||
| 1358 | return Fthrow (Qtop_level, Qnil); | 1353 | return Fthrow (Qtop_level, Qnil); |
| 1359 | } | 1354 | } |
| 1360 | 1355 | ||
diff --git a/src/lisp.h b/src/lisp.h index 2e82a336a66..2da2fe6c7dd 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -53,6 +53,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 53 | 53 | ||
| 54 | #endif /* 0 */ | 54 | #endif /* 0 */ |
| 55 | 55 | ||
| 56 | #ifdef GC_CHECK_CONS_LIST | ||
| 57 | #define CHECK_CONS_LIST() check_cons_list() | ||
| 58 | #else | ||
| 59 | #define CHECK_CONS_LIST() 0 | ||
| 60 | #endif | ||
| 56 | 61 | ||
| 57 | /* These are default choices for the types to use. */ | 62 | /* These are default choices for the types to use. */ |
| 58 | #ifdef _LP64 | 63 | #ifdef _LP64 |
| @@ -25,20 +25,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | #include <time.h> | 27 | #include <time.h> |
| 28 | #include <utime.h> | ||
| 29 | #include <dirent.h> | ||
| 30 | #include <sys/types.h> | ||
| 31 | #include <sys/stat.h> | ||
| 32 | #include <string.h> | ||
| 33 | #include <pwd.h> | ||
| 34 | #include <grp.h> | ||
| 35 | #include <sys/param.h> | ||
| 36 | #include <stdlib.h> | ||
| 37 | #include <fcntl.h> | ||
| 38 | #if __MWERKS__ | ||
| 39 | #include <unistd.h> | ||
| 40 | #endif | ||
| 41 | 28 | ||
| 29 | #ifdef HAVE_CARBON | ||
| 42 | #ifdef MAC_OSX | 30 | #ifdef MAC_OSX |
| 43 | #undef mktime | 31 | #undef mktime |
| 44 | #undef DEBUG | 32 | #undef DEBUG |
| @@ -57,7 +45,12 @@ Boston, MA 02111-1307, USA. */ | |||
| 57 | #define realloc unexec_realloc | 45 | #define realloc unexec_realloc |
| 58 | #undef init_process | 46 | #undef init_process |
| 59 | #define init_process emacs_init_process | 47 | #define init_process emacs_init_process |
| 60 | #else /* not MAC_OSX */ | 48 | #else /* not MAC_OSX */ |
| 49 | #undef SIGHUP | ||
| 50 | #define OLDP2C 1 | ||
| 51 | #include <Carbon.h> | ||
| 52 | #endif /* not MAC_OSX */ | ||
| 53 | #else /* not HAVE_CARBON */ | ||
| 61 | #include <Files.h> | 54 | #include <Files.h> |
| 62 | #include <MacTypes.h> | 55 | #include <MacTypes.h> |
| 63 | #include <TextUtils.h> | 56 | #include <TextUtils.h> |
| @@ -69,7 +62,24 @@ Boston, MA 02111-1307, USA. */ | |||
| 69 | #include <OSA.h> | 62 | #include <OSA.h> |
| 70 | #include <AppleScript.h> | 63 | #include <AppleScript.h> |
| 71 | #include <Scrap.h> | 64 | #include <Scrap.h> |
| 72 | #endif /* not MAC_OSX */ | 65 | #include <Events.h> |
| 66 | #include <Processes.h> | ||
| 67 | #include <EPPC.h> | ||
| 68 | #endif /* not HAVE_CARBON */ | ||
| 69 | |||
| 70 | #include <utime.h> | ||
| 71 | #include <dirent.h> | ||
| 72 | #include <sys/types.h> | ||
| 73 | #include <sys/stat.h> | ||
| 74 | #include <string.h> | ||
| 75 | #include <pwd.h> | ||
| 76 | #include <grp.h> | ||
| 77 | #include <sys/param.h> | ||
| 78 | #include <stdlib.h> | ||
| 79 | #include <fcntl.h> | ||
| 80 | #if __MWERKS__ | ||
| 81 | #include <unistd.h> | ||
| 82 | #endif | ||
| 73 | 83 | ||
| 74 | #include "lisp.h" | 84 | #include "lisp.h" |
| 75 | #include "process.h" | 85 | #include "process.h" |
| @@ -812,8 +822,6 @@ sys_fopen (const char *name, const char *mode) | |||
| 812 | } | 822 | } |
| 813 | 823 | ||
| 814 | 824 | ||
| 815 | #include <Events.h> | ||
| 816 | |||
| 817 | long target_ticks = 0; | 825 | long target_ticks = 0; |
| 818 | 826 | ||
| 819 | #ifdef __MRC__ | 827 | #ifdef __MRC__ |
| @@ -856,7 +864,24 @@ select (n, rfds, wfds, efds, timeout) | |||
| 856 | struct timeval *timeout; | 864 | struct timeval *timeout; |
| 857 | { | 865 | { |
| 858 | #if TARGET_API_MAC_CARBON | 866 | #if TARGET_API_MAC_CARBON |
| 859 | return 1; | 867 | OSErr err; |
| 868 | EventTimeout timeout_sec = | ||
| 869 | (timeout | ||
| 870 | ? (EMACS_SECS (*timeout) * kEventDurationSecond | ||
| 871 | + EMACS_USECS (*timeout) * kEventDurationMicrosecond) | ||
| 872 | : kEventDurationForever); | ||
| 873 | |||
| 874 | if (FD_ISSET (0, rfds)) | ||
| 875 | { | ||
| 876 | BLOCK_INPUT; | ||
| 877 | err = ReceiveNextEvent (0, NULL, timeout_sec, kEventLeaveInQueue, NULL); | ||
| 878 | UNBLOCK_INPUT; | ||
| 879 | if (err == noErr) | ||
| 880 | return 1; | ||
| 881 | else | ||
| 882 | FD_ZERO (rfds); | ||
| 883 | } | ||
| 884 | return 0; | ||
| 860 | #else /* not TARGET_API_MAC_CARBON */ | 885 | #else /* not TARGET_API_MAC_CARBON */ |
| 861 | EventRecord e; | 886 | EventRecord e; |
| 862 | UInt32 sleep_time = EMACS_SECS (*timeout) * 60 + | 887 | UInt32 sleep_time = EMACS_SECS (*timeout) * 60 + |
| @@ -1421,6 +1446,39 @@ path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num, | |||
| 1421 | return 1; /* success */ | 1446 | return 1; /* success */ |
| 1422 | } | 1447 | } |
| 1423 | 1448 | ||
| 1449 | |||
| 1450 | OSErr | ||
| 1451 | posix_pathname_to_fsspec (ufn, fs) | ||
| 1452 | const char *ufn; | ||
| 1453 | FSSpec *fs; | ||
| 1454 | { | ||
| 1455 | Str255 mac_pathname; | ||
| 1456 | |||
| 1457 | if (posix_to_mac_pathname (ufn, mac_pathname, sizeof (mac_pathname)) == 0) | ||
| 1458 | return fnfErr; | ||
| 1459 | else | ||
| 1460 | { | ||
| 1461 | c2pstr (mac_pathname); | ||
| 1462 | return FSMakeFSSpec (0, 0, mac_pathname, fs); | ||
| 1463 | } | ||
| 1464 | } | ||
| 1465 | |||
| 1466 | OSErr | ||
| 1467 | fsspec_to_posix_pathname (fs, ufn, ufnbuflen) | ||
| 1468 | const FSSpec *fs; | ||
| 1469 | char *ufn; | ||
| 1470 | int ufnbuflen; | ||
| 1471 | { | ||
| 1472 | char mac_pathname[MAXPATHLEN]; | ||
| 1473 | |||
| 1474 | if (path_from_vol_dir_name (mac_pathname, sizeof (mac_pathname) - 1, | ||
| 1475 | fs->vRefNum, fs->parID, fs->name) | ||
| 1476 | && mac_to_posix_pathname (mac_pathname, ufn, ufnbuflen)) | ||
| 1477 | return noErr; | ||
| 1478 | else | ||
| 1479 | return fnfErr; | ||
| 1480 | } | ||
| 1481 | |||
| 1424 | #ifndef MAC_OSX | 1482 | #ifndef MAC_OSX |
| 1425 | 1483 | ||
| 1426 | int | 1484 | int |
| @@ -1899,9 +1957,6 @@ uname (struct utsname *name) | |||
| 1899 | } | 1957 | } |
| 1900 | 1958 | ||
| 1901 | 1959 | ||
| 1902 | #include <Processes.h> | ||
| 1903 | #include <EPPC.h> | ||
| 1904 | |||
| 1905 | /* Event class of HLE sent to subprocess. */ | 1960 | /* Event class of HLE sent to subprocess. */ |
| 1906 | const OSType kEmacsSubprocessSend = 'ESND'; | 1961 | const OSType kEmacsSubprocessSend = 'ESND'; |
| 1907 | 1962 | ||
| @@ -2770,7 +2825,6 @@ and t is the same as `SECONDARY'. */) | |||
| 2770 | return Qnil; | 2825 | return Qnil; |
| 2771 | } | 2826 | } |
| 2772 | 2827 | ||
| 2773 | extern void mac_clear_font_name_table P_ ((void)); | ||
| 2774 | 2828 | ||
| 2775 | DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, Smac_clear_font_name_table, 0, 0, 0, | 2829 | DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, Smac_clear_font_name_table, 0, 0, 0, |
| 2776 | doc: /* Clear the font name table. */) | 2830 | doc: /* Clear the font name table. */) |
diff --git a/src/macfns.c b/src/macfns.c index e46b8469fe2..1269803153a 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -2294,8 +2294,6 @@ XParseGeometry (string, x, y, width, height) | |||
| 2294 | 2294 | ||
| 2295 | /* Create and set up the Mac window for frame F. */ | 2295 | /* Create and set up the Mac window for frame F. */ |
| 2296 | 2296 | ||
| 2297 | extern OSErr install_window_handler (WindowPtr); | ||
| 2298 | |||
| 2299 | static void | 2297 | static void |
| 2300 | mac_window (f) | 2298 | mac_window (f) |
| 2301 | struct frame *f; | 2299 | struct frame *f; |
| @@ -4356,7 +4354,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4356 | options.actionButtonLabel = CFSTR ("Ok"); | 4354 | options.actionButtonLabel = CFSTR ("Ok"); |
| 4357 | options.windowTitle = CFSTR ("Enter name"); | 4355 | options.windowTitle = CFSTR ("Enter name"); |
| 4358 | 4356 | ||
| 4359 | if (!NILP(default_filename)) | 4357 | if (STRINGP (default_filename)) |
| 4360 | { | 4358 | { |
| 4361 | Lisp_Object utf8 = ENCODE_UTF_8 (default_filename); | 4359 | Lisp_Object utf8 = ENCODE_UTF_8 (default_filename); |
| 4362 | char *begPtr = SDATA(utf8); | 4360 | char *begPtr = SDATA(utf8); |
| @@ -4381,22 +4379,29 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4381 | } | 4379 | } |
| 4382 | 4380 | ||
| 4383 | /* Set the default location and continue*/ | 4381 | /* Set the default location and continue*/ |
| 4384 | if (status == noErr) { | 4382 | if (status == noErr) |
| 4385 | if (!NILP(dir)) { | 4383 | { |
| 4386 | FSRef defLoc; | ||
| 4387 | AEDesc defLocAed; | 4384 | AEDesc defLocAed; |
| 4385 | #ifdef MAC_OSX | ||
| 4386 | FSRef defLoc; | ||
| 4388 | status = FSPathMakeRef(SDATA(ENCODE_FILE(dir)), &defLoc, NULL); | 4387 | status = FSPathMakeRef(SDATA(ENCODE_FILE(dir)), &defLoc, NULL); |
| 4388 | #else | ||
| 4389 | FSSpec defLoc; | ||
| 4390 | status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc); | ||
| 4391 | #endif | ||
| 4389 | if (status == noErr) | 4392 | if (status == noErr) |
| 4390 | { | 4393 | { |
| 4394 | #ifdef MAC_OSX | ||
| 4391 | AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed); | 4395 | AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed); |
| 4396 | #else | ||
| 4397 | AECreateDesc(typeFSS, &defLoc, sizeof(FSSpec), &defLocAed); | ||
| 4398 | #endif | ||
| 4392 | NavCustomControl(dialogRef, kNavCtlSetLocation, (void*) &defLocAed); | 4399 | NavCustomControl(dialogRef, kNavCtlSetLocation, (void*) &defLocAed); |
| 4393 | AEDisposeDesc(&defLocAed); | 4400 | AEDisposeDesc(&defLocAed); |
| 4394 | } | 4401 | } |
| 4402 | status = NavDialogRun(dialogRef); | ||
| 4395 | } | 4403 | } |
| 4396 | 4404 | ||
| 4397 | status = NavDialogRun(dialogRef); | ||
| 4398 | } | ||
| 4399 | |||
| 4400 | if (saveName) CFRelease(saveName); | 4405 | if (saveName) CFRelease(saveName); |
| 4401 | if (message) CFRelease(message); | 4406 | if (message) CFRelease(message); |
| 4402 | 4407 | ||
| @@ -4413,11 +4418,22 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4413 | { | 4418 | { |
| 4414 | NavReplyRecord reply; | 4419 | NavReplyRecord reply; |
| 4415 | AEDesc aed; | 4420 | AEDesc aed; |
| 4421 | #ifdef MAC_OSX | ||
| 4416 | FSRef fsRef; | 4422 | FSRef fsRef; |
| 4423 | #else | ||
| 4424 | FSSpec fs; | ||
| 4425 | #endif | ||
| 4417 | status = NavDialogGetReply(dialogRef, &reply); | 4426 | status = NavDialogGetReply(dialogRef, &reply); |
| 4427 | |||
| 4428 | #ifdef MAC_OSX | ||
| 4418 | AECoerceDesc(&reply.selection, typeFSRef, &aed); | 4429 | AECoerceDesc(&reply.selection, typeFSRef, &aed); |
| 4419 | AEGetDescData(&aed, (void *) &fsRef, sizeof (FSRef)); | 4430 | AEGetDescData(&aed, (void *) &fsRef, sizeof (FSRef)); |
| 4420 | FSRefMakePath(&fsRef, (UInt8 *) filename, sizeof (filename)); | 4431 | FSRefMakePath(&fsRef, (UInt8 *) filename, sizeof (filename)); |
| 4432 | #else | ||
| 4433 | AECoerceDesc (&reply.selection, typeFSS, &aed); | ||
| 4434 | AEGetDescData (&aed, (void *) &fs, sizeof (FSSpec)); | ||
| 4435 | fsspec_to_posix_pathname (&fs, filename, sizeof (filename) - 1); | ||
| 4436 | #endif | ||
| 4421 | AEDisposeDesc(&aed); | 4437 | AEDisposeDesc(&aed); |
| 4422 | if (reply.saveFileName) | 4438 | if (reply.saveFileName) |
| 4423 | { | 4439 | { |
diff --git a/src/macgui.h b/src/macgui.h index cb157bb8c25..6a961318b76 100644 --- a/src/macgui.h +++ b/src/macgui.h | |||
| @@ -29,10 +29,11 @@ typedef char * XrmDatabase; /* fix later */ | |||
| 29 | 29 | ||
| 30 | typedef unsigned long Time; | 30 | typedef unsigned long Time; |
| 31 | 31 | ||
| 32 | #if MAC_OSX | 32 | #ifdef HAVE_CARBON |
| 33 | #undef Z | ||
| 34 | #ifdef MAC_OSX | ||
| 33 | #undef mktime | 35 | #undef mktime |
| 34 | #undef DEBUG | 36 | #undef DEBUG |
| 35 | #undef Z | ||
| 36 | #undef free | 37 | #undef free |
| 37 | #undef malloc | 38 | #undef malloc |
| 38 | #undef realloc | 39 | #undef realloc |
| @@ -44,8 +45,6 @@ typedef unsigned long Time; | |||
| 44 | #include <Carbon/Carbon.h> | 45 | #include <Carbon/Carbon.h> |
| 45 | #undef mktime | 46 | #undef mktime |
| 46 | #define mktime emacs_mktime | 47 | #define mktime emacs_mktime |
| 47 | #undef Z | ||
| 48 | #define Z (current_buffer->text->z) | ||
| 49 | #undef free | 48 | #undef free |
| 50 | #define free unexec_free | 49 | #define free unexec_free |
| 51 | #undef malloc | 50 | #undef malloc |
| @@ -59,12 +58,19 @@ typedef unsigned long Time; | |||
| 59 | #undef init_process | 58 | #undef init_process |
| 60 | #define init_process emacs_init_process | 59 | #define init_process emacs_init_process |
| 61 | #undef INFINITY | 60 | #undef INFINITY |
| 62 | #else | 61 | #else /* not MAC_OSX */ |
| 62 | #undef SIGHUP | ||
| 63 | #define OLDP2C 1 | ||
| 64 | #include <Carbon.h> | ||
| 65 | #endif /* not MAC_OSX */ | ||
| 66 | #undef Z | ||
| 67 | #define Z (current_buffer->text->z) | ||
| 68 | #else /* not HAVE_CARBON */ | ||
| 63 | #include <QuickDraw.h> /* for WindowPtr */ | 69 | #include <QuickDraw.h> /* for WindowPtr */ |
| 64 | #include <QDOffscreen.h> /* for GWorldPtr */ | 70 | #include <QDOffscreen.h> /* for GWorldPtr */ |
| 65 | #include <Windows.h> | 71 | #include <Windows.h> |
| 66 | #include <Gestalt.h> | 72 | #include <Gestalt.h> |
| 67 | #endif | 73 | #endif /* not HAVE_CARBON */ |
| 68 | 74 | ||
| 69 | typedef WindowPtr Window; | 75 | typedef WindowPtr Window; |
| 70 | typedef GWorldPtr Pixmap; | 76 | typedef GWorldPtr Pixmap; |
diff --git a/src/macmenu.c b/src/macmenu.c index f0696a49774..35615cc3796 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 35 | #include "charset.h" | 35 | #include "charset.h" |
| 36 | #include "coding.h" | 36 | #include "coding.h" |
| 37 | 37 | ||
| 38 | #ifndef MAC_OSX | 38 | #if !TARGET_API_MAC_CARBON |
| 39 | #include <MacTypes.h> | 39 | #include <MacTypes.h> |
| 40 | #include <Menus.h> | 40 | #include <Menus.h> |
| 41 | #include <QuickDraw.h> | 41 | #include <QuickDraw.h> |
| @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 47 | #if defined (__MRC__) || (__MSL__ >= 0x6000) | 47 | #if defined (__MRC__) || (__MSL__ >= 0x6000) |
| 48 | #include <ControlDefinitions.h> | 48 | #include <ControlDefinitions.h> |
| 49 | #endif | 49 | #endif |
| 50 | #endif /* not MAC_OSX */ | 50 | #endif /* not TARGET_API_MAC_CARBON */ |
| 51 | 51 | ||
| 52 | /* This may include sys/types.h, and that somehow loses | 52 | /* This may include sys/types.h, and that somehow loses |
| 53 | if this is not done before the other system files. */ | 53 | if this is not done before the other system files. */ |
diff --git a/src/macterm.c b/src/macterm.c index 2ee881e8d49..43e1999d11d 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -34,12 +34,12 @@ Boston, MA 02111-1307, USA. */ | |||
| 34 | #include <alloca.h> | 34 | #include <alloca.h> |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #ifdef MAC_OSX | 37 | #if TARGET_API_MAC_CARBON |
| 38 | /* USE_CARBON_EVENTS determines if the Carbon Event Manager is used to | 38 | /* USE_CARBON_EVENTS determines if the Carbon Event Manager is used to |
| 39 | obtain events from the event queue. If set to 0, WaitNextEvent is | 39 | obtain events from the event queue. If set to 0, WaitNextEvent is |
| 40 | used instead. */ | 40 | used instead. */ |
| 41 | #define USE_CARBON_EVENTS 1 | 41 | #define USE_CARBON_EVENTS 1 |
| 42 | #else /* not MAC_OSX */ | 42 | #else /* not TARGET_API_MAC_CARBON */ |
| 43 | #include <Quickdraw.h> | 43 | #include <Quickdraw.h> |
| 44 | #include <ToolUtils.h> | 44 | #include <ToolUtils.h> |
| 45 | #include <Sound.h> | 45 | #include <Sound.h> |
| @@ -58,7 +58,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 58 | #if __profile__ | 58 | #if __profile__ |
| 59 | #include <profiler.h> | 59 | #include <profiler.h> |
| 60 | #endif | 60 | #endif |
| 61 | #endif /* not MAC_OSX */ | 61 | #endif /* not TARGET_API_MAC_CARBON */ |
| 62 | 62 | ||
| 63 | #include "systty.h" | 63 | #include "systty.h" |
| 64 | #include "systime.h" | 64 | #include "systime.h" |
| @@ -247,7 +247,7 @@ extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *)); | |||
| 247 | 247 | ||
| 248 | extern int inhibit_window_system; | 248 | extern int inhibit_window_system; |
| 249 | 249 | ||
| 250 | #if __MRC__ | 250 | #if __MRC__ && !TARGET_API_MAC_CARBON |
| 251 | QDGlobals qd; /* QuickDraw global information structure. */ | 251 | QDGlobals qd; /* QuickDraw global information structure. */ |
| 252 | #endif | 252 | #endif |
| 253 | 253 | ||
| @@ -5591,6 +5591,9 @@ x_free_frame_resources (f) | |||
| 5591 | 5591 | ||
| 5592 | BLOCK_INPUT; | 5592 | BLOCK_INPUT; |
| 5593 | 5593 | ||
| 5594 | if (wp != tip_window) | ||
| 5595 | remove_window_handler (wp); | ||
| 5596 | |||
| 5594 | DisposeWindow (wp); | 5597 | DisposeWindow (wp); |
| 5595 | if (wp == tip_window) | 5598 | if (wp == tip_window) |
| 5596 | /* Neither WaitNextEvent nor ReceiveNextEvent receives `window | 5599 | /* Neither WaitNextEvent nor ReceiveNextEvent receives `window |
| @@ -7104,7 +7107,7 @@ x_find_ccl_program (fontp) | |||
| 7104 | 7107 | ||
| 7105 | /* The Mac Event loop code */ | 7108 | /* The Mac Event loop code */ |
| 7106 | 7109 | ||
| 7107 | #ifndef MAC_OSX | 7110 | #if !TARGET_API_MAC_CARBON |
| 7108 | #include <Events.h> | 7111 | #include <Events.h> |
| 7109 | #include <Quickdraw.h> | 7112 | #include <Quickdraw.h> |
| 7110 | #include <Balloons.h> | 7113 | #include <Balloons.h> |
| @@ -7125,7 +7128,7 @@ x_find_ccl_program (fontp) | |||
| 7125 | #if __MWERKS__ | 7128 | #if __MWERKS__ |
| 7126 | #include <unix.h> | 7129 | #include <unix.h> |
| 7127 | #endif | 7130 | #endif |
| 7128 | #endif /* ! MAC_OSX */ | 7131 | #endif /* ! TARGET_API_MAC_CARBON */ |
| 7129 | 7132 | ||
| 7130 | #define M_APPLE 128 | 7133 | #define M_APPLE 128 |
| 7131 | #define I_ABOUT 1 | 7134 | #define I_ABOUT 1 |
| @@ -7226,12 +7229,16 @@ static pascal OSErr do_ae_quit_application (AppleEvent *, AppleEvent *, long); | |||
| 7226 | /* Drag and Drop */ | 7229 | /* Drag and Drop */ |
| 7227 | static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference); | 7230 | static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference); |
| 7228 | static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference); | 7231 | static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference); |
| 7232 | static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL; | ||
| 7233 | static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL; | ||
| 7229 | #endif | 7234 | #endif |
| 7230 | 7235 | ||
| 7231 | #if USE_CARBON_EVENTS | 7236 | #if USE_CARBON_EVENTS |
| 7237 | #ifdef MAC_OSX | ||
| 7232 | /* Preliminary Support for the OSX Services Menu */ | 7238 | /* Preliminary Support for the OSX Services Menu */ |
| 7233 | static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*); | 7239 | static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*); |
| 7234 | static void init_service_handler (); | 7240 | static void init_service_handler (); |
| 7241 | #endif | ||
| 7235 | /* Window Event Handler */ | 7242 | /* Window Event Handler */ |
| 7236 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, | 7243 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, |
| 7237 | EventRef, void *); | 7244 | EventRef, void *); |
| @@ -7870,7 +7877,7 @@ init_required_apple_events () | |||
| 7870 | } | 7877 | } |
| 7871 | 7878 | ||
| 7872 | #if USE_CARBON_EVENTS | 7879 | #if USE_CARBON_EVENTS |
| 7873 | 7880 | #ifdef MAC_OSX | |
| 7874 | void | 7881 | void |
| 7875 | init_service_handler () | 7882 | init_service_handler () |
| 7876 | { | 7883 | { |
| @@ -7966,7 +7973,7 @@ mac_handle_service_event (EventHandlerCallRef callRef, | |||
| 7966 | } | 7973 | } |
| 7967 | return err; | 7974 | return err; |
| 7968 | } | 7975 | } |
| 7969 | 7976 | #endif | |
| 7970 | 7977 | ||
| 7971 | static pascal OSStatus | 7978 | static pascal OSStatus |
| 7972 | mac_handle_window_event (next_handler, event, data) | 7979 | mac_handle_window_event (next_handler, event, data) |
| @@ -8063,14 +8070,30 @@ install_window_handler (window) | |||
| 8063 | NULL, NULL); | 8070 | NULL, NULL); |
| 8064 | #endif | 8071 | #endif |
| 8065 | #if TARGET_API_MAC_CARBON | 8072 | #if TARGET_API_MAC_CARBON |
| 8073 | if (mac_do_track_dragUPP == NULL) | ||
| 8074 | mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag); | ||
| 8075 | if (mac_do_receive_dragUPP == NULL) | ||
| 8076 | mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag); | ||
| 8077 | |||
| 8066 | if (err == noErr) | 8078 | if (err == noErr) |
| 8067 | err = InstallTrackingHandler (mac_do_track_drag, window, NULL); | 8079 | err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL); |
| 8068 | if (err == noErr) | 8080 | if (err == noErr) |
| 8069 | err = InstallReceiveHandler (mac_do_receive_drag, window, NULL); | 8081 | err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL); |
| 8070 | #endif | 8082 | #endif |
| 8071 | return err; | 8083 | return err; |
| 8072 | } | 8084 | } |
| 8073 | 8085 | ||
| 8086 | void | ||
| 8087 | remove_window_handler (window) | ||
| 8088 | WindowPtr window; | ||
| 8089 | { | ||
| 8090 | #if TARGET_API_MAC_CARBON | ||
| 8091 | if (mac_do_track_dragUPP) | ||
| 8092 | RemoveTrackingHandler (mac_do_track_dragUPP, window); | ||
| 8093 | if (mac_do_receive_dragUPP) | ||
| 8094 | RemoveReceiveHandler (mac_do_receive_dragUPP, window); | ||
| 8095 | #endif | ||
| 8096 | } | ||
| 8074 | 8097 | ||
| 8075 | /* Open Application Apple Event */ | 8098 | /* Open Application Apple Event */ |
| 8076 | static pascal OSErr | 8099 | static pascal OSErr |
| @@ -8149,9 +8172,9 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) | |||
| 8149 | /* AE file list is one based so just use that for indexing here. */ | 8172 | /* AE file list is one based so just use that for indexing here. */ |
| 8150 | for (i = 1; i <= num_files_to_open; i++) | 8173 | for (i = 1; i <= num_files_to_open; i++) |
| 8151 | { | 8174 | { |
| 8175 | char unix_path_name[MAXPATHLEN]; | ||
| 8152 | #ifdef MAC_OSX | 8176 | #ifdef MAC_OSX |
| 8153 | FSRef fref; | 8177 | FSRef fref; |
| 8154 | char unix_path_name[MAXPATHLEN]; | ||
| 8155 | 8178 | ||
| 8156 | err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword, | 8179 | err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword, |
| 8157 | &actual_type, &fref, sizeof (FSRef), | 8180 | &actual_type, &fref, sizeof (FSRef), |
| @@ -8163,15 +8186,13 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) | |||
| 8163 | == noErr) | 8186 | == noErr) |
| 8164 | #else | 8187 | #else |
| 8165 | FSSpec fs; | 8188 | FSSpec fs; |
| 8166 | Str255 path_name, unix_path_name; | ||
| 8167 | 8189 | ||
| 8168 | err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type, | 8190 | err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type, |
| 8169 | (Ptr) &fs, sizeof (fs), &actual_size); | 8191 | (Ptr) &fs, sizeof (fs), &actual_size); |
| 8170 | if (err != noErr) continue; | 8192 | if (err != noErr) continue; |
| 8171 | 8193 | ||
| 8172 | if (path_from_vol_dir_name (path_name, 255, fs.vRefNum, fs.parID, | 8194 | if (fsspec_to_posix_pathname (&fs, unix_path_name, |
| 8173 | fs.name) && | 8195 | sizeof (unix_path_name) - 1) == noErr) |
| 8174 | mac_to_posix_pathname (path_name, unix_path_name, 255)) | ||
| 8175 | #endif | 8196 | #endif |
| 8176 | /* x-dnd functions expect undecoded filenames. */ | 8197 | /* x-dnd functions expect undecoded filenames. */ |
| 8177 | drag_and_drop_file_list = | 8198 | drag_and_drop_file_list = |
| @@ -8290,10 +8311,9 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, | |||
| 8290 | { | 8311 | { |
| 8291 | #ifdef MAC_OSX | 8312 | #ifdef MAC_OSX |
| 8292 | FSRef fref; | 8313 | FSRef fref; |
| 8293 | char unix_path_name[MAXPATHLEN]; | ||
| 8294 | #else | ||
| 8295 | Str255 path_name, unix_path_name; | ||
| 8296 | #endif | 8314 | #endif |
| 8315 | char unix_path_name[MAXPATHLEN]; | ||
| 8316 | |||
| 8297 | GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L); | 8317 | GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L); |
| 8298 | #ifdef MAC_OSX | 8318 | #ifdef MAC_OSX |
| 8299 | /* Use Carbon routines, otherwise it converts the file name | 8319 | /* Use Carbon routines, otherwise it converts the file name |
| @@ -8301,9 +8321,8 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, | |||
| 8301 | FSpMakeFSRef (&data.fileSpec, &fref); | 8321 | FSpMakeFSRef (&data.fileSpec, &fref); |
| 8302 | if (! FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name))); | 8322 | if (! FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name))); |
| 8303 | #else | 8323 | #else |
| 8304 | if (path_from_vol_dir_name (path_name, 255, data.fileSpec.vRefNum, | 8324 | if (fsspec_to_posix_pathname (&data.fileSpec, unix_path_name, |
| 8305 | data.fileSpec.parID, data.fileSpec.name) && | 8325 | sizeof (unix_path_name) - 1) == noErr) |
| 8306 | mac_to_posix_pathname (path_name, unix_path_name, 255)) | ||
| 8307 | #endif | 8326 | #endif |
| 8308 | /* x-dnd functions expect undecoded filenames. */ | 8327 | /* x-dnd functions expect undecoded filenames. */ |
| 8309 | drag_and_drop_file_list = | 8328 | drag_and_drop_file_list = |
| @@ -8400,7 +8419,7 @@ profiler_exit_proc () | |||
| 8400 | hints and prompts in the minibuffer after the user stops typing for | 8419 | hints and prompts in the minibuffer after the user stops typing for |
| 8401 | a wait, etc. */ | 8420 | a wait, etc. */ |
| 8402 | 8421 | ||
| 8403 | #if !TARGET_API_MAC_CARBON | 8422 | #ifdef MAC_OS8 |
| 8404 | #undef main | 8423 | #undef main |
| 8405 | int | 8424 | int |
| 8406 | main (void) | 8425 | main (void) |
| @@ -8982,7 +9001,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8982 | int keycode = (er.message & keyCodeMask) >> 8; | 9001 | int keycode = (er.message & keyCodeMask) >> 8; |
| 8983 | int xkeysym; | 9002 | int xkeysym; |
| 8984 | 9003 | ||
| 8985 | #if USE_CARBON_EVENTS | 9004 | #if USE_CARBON_EVENTS && defined (MAC_OSX) |
| 8986 | /* When using Carbon Events, we need to pass raw keyboard | 9005 | /* When using Carbon Events, we need to pass raw keyboard |
| 8987 | events to the TSM ourselves. If TSM handles it, it | 9006 | events to the TSM ourselves. If TSM handles it, it |
| 8988 | will pass back noErr, otherwise it will pass back | 9007 | will pass back noErr, otherwise it will pass back |
| @@ -9291,12 +9310,21 @@ make_mac_terminal_frame (struct frame *f) | |||
| 9291 | f->output_data.mac->mouse_pixel = 0xff00ff; | 9310 | f->output_data.mac->mouse_pixel = 0xff00ff; |
| 9292 | f->output_data.mac->cursor_foreground_pixel = 0x0000ff; | 9311 | f->output_data.mac->cursor_foreground_pixel = 0x0000ff; |
| 9293 | 9312 | ||
| 9313 | #if TARGET_API_MAC_CARBON | ||
| 9314 | f->output_data.mac->text_cursor = kThemeIBeamCursor; | ||
| 9315 | f->output_data.mac->nontext_cursor = kThemeArrowCursor; | ||
| 9316 | f->output_data.mac->modeline_cursor = kThemeArrowCursor; | ||
| 9317 | f->output_data.mac->hand_cursor = kThemePointingHandCursor; | ||
| 9318 | f->output_data.mac->hourglass_cursor = kThemeWatchCursor; | ||
| 9319 | f->output_data.mac->horizontal_drag_cursor = kThemeResizeLeftRightCursor; | ||
| 9320 | #else | ||
| 9294 | f->output_data.mac->text_cursor = GetCursor (iBeamCursor); | 9321 | f->output_data.mac->text_cursor = GetCursor (iBeamCursor); |
| 9295 | f->output_data.mac->nontext_cursor = &arrow_cursor; | 9322 | f->output_data.mac->nontext_cursor = &arrow_cursor; |
| 9296 | f->output_data.mac->modeline_cursor = &arrow_cursor; | 9323 | f->output_data.mac->modeline_cursor = &arrow_cursor; |
| 9297 | f->output_data.mac->hand_cursor = &arrow_cursor; | 9324 | f->output_data.mac->hand_cursor = &arrow_cursor; |
| 9298 | f->output_data.mac->hourglass_cursor = GetCursor (watchCursor); | 9325 | f->output_data.mac->hourglass_cursor = GetCursor (watchCursor); |
| 9299 | f->output_data.mac->horizontal_drag_cursor = &arrow_cursor; | 9326 | f->output_data.mac->horizontal_drag_cursor = &arrow_cursor; |
| 9327 | #endif | ||
| 9300 | 9328 | ||
| 9301 | FRAME_FONTSET (f) = -1; | 9329 | FRAME_FONTSET (f) = -1; |
| 9302 | f->output_data.mac->explicit_parent = 0; | 9330 | f->output_data.mac->explicit_parent = 0; |
| @@ -9831,7 +9859,7 @@ mac_initialize () | |||
| 9831 | #if TARGET_API_MAC_CARBON | 9859 | #if TARGET_API_MAC_CARBON |
| 9832 | init_required_apple_events (); | 9860 | init_required_apple_events (); |
| 9833 | 9861 | ||
| 9834 | #if USE_CARBON_EVENTS | 9862 | #if USE_CARBON_EVENTS && defined (MAC_OSX) |
| 9835 | init_service_handler (); | 9863 | init_service_handler (); |
| 9836 | 9864 | ||
| 9837 | init_quit_char_handler (); | 9865 | init_quit_char_handler (); |
| @@ -9839,9 +9867,11 @@ mac_initialize () | |||
| 9839 | 9867 | ||
| 9840 | DisableMenuCommand (NULL, kHICommandQuit); | 9868 | DisableMenuCommand (NULL, kHICommandQuit); |
| 9841 | 9869 | ||
| 9870 | #ifdef MAC_OSX | ||
| 9842 | if (!inhibit_window_system) | 9871 | if (!inhibit_window_system) |
| 9843 | MakeMeTheFrontProcess (); | 9872 | MakeMeTheFrontProcess (); |
| 9844 | #endif | 9873 | #endif |
| 9874 | #endif | ||
| 9845 | UNBLOCK_INPUT; | 9875 | UNBLOCK_INPUT; |
| 9846 | } | 9876 | } |
| 9847 | 9877 | ||
diff --git a/src/macterm.h b/src/macterm.h index f32b13000e6..27cd1f49646 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -607,10 +607,17 @@ extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); | |||
| 607 | extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, | 607 | extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, |
| 608 | int, int)); | 608 | int, int)); |
| 609 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); | 609 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); |
| 610 | extern OSErr install_window_handler P_ ((WindowPtr)); | ||
| 611 | extern void remove_window_handler P_ ((WindowPtr)); | ||
| 610 | 612 | ||
| 611 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 | 613 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 |
| 612 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 | 614 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 |
| 613 | 615 | ||
| 616 | /* Defined in mac.c. */ | ||
| 617 | |||
| 618 | extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); | ||
| 619 | extern OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); | ||
| 620 | extern void mac_clear_font_name_table P_ ((void)); | ||
| 614 | #if TARGET_API_MAC_CARBON | 621 | #if TARGET_API_MAC_CARBON |
| 615 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); | 622 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); |
| 616 | #endif | 623 | #endif |
diff --git a/src/s/vms.h b/src/s/vms.h index dc7877eaa67..1338cdb5718 100644 --- a/src/s/vms.h +++ b/src/s/vms.h | |||
| @@ -109,6 +109,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 109 | your system and must be used only through an encapsulation | 109 | your system and must be used only through an encapsulation |
| 110 | (Which you should place, by convention, in sysdep.c). */ | 110 | (Which you should place, by convention, in sysdep.c). */ |
| 111 | 111 | ||
| 112 | /* In olden days, VMS filenames did not support hyphen (i.e., the "-" | ||
| 113 | character). You can #undef this in vmsX-Y.h for newer versions. */ | ||
| 114 | |||
| 115 | #define NO_HYPHENS_IN_FILENAMES | ||
| 116 | |||
| 112 | /* Do you have the sharable library bug? If you link with a sharable | 117 | /* Do you have the sharable library bug? If you link with a sharable |
| 113 | library that contains psects with the NOSHR attribute and also refer to | 118 | library that contains psects with the NOSHR attribute and also refer to |
| 114 | those psects in your program, the linker give you a private version of | 119 | those psects in your program, the linker give you a private version of |
| @@ -135,6 +140,10 @@ Boston, MA 02111-1307, USA. */ | |||
| 135 | 140 | ||
| 136 | /* #define READ_SYSUAF */ | 141 | /* #define READ_SYSUAF */ |
| 137 | 142 | ||
| 143 | /* Traditionally, filenames on VMS are always upper case. */ | ||
| 144 | |||
| 145 | #define FILE_SYSTEM_CASE Fupcase | ||
| 146 | |||
| 138 | /* On VMS these have a different name */ | 147 | /* On VMS these have a different name */ |
| 139 | 148 | ||
| 140 | #define index strchr | 149 | #define index strchr |
diff --git a/src/s/vms4-4.h b/src/s/vms4-4.h index 0abd8259143..7491f5c8f80 100644 --- a/src/s/vms4-4.h +++ b/src/s/vms4-4.h | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include "vms.h" | 1 | #include "vms.h" |
| 2 | #define VMS4_4 | 2 | #define VMS4_4 |
| 3 | 3 | ||
| 4 | #undef NO_HYPHENS_IN_FILENAMES | ||
| 5 | |||
| 4 | /* arch-tag: 2e65c7ad-0d17-45a0-b4cb-3e76c72ea9d5 | 6 | /* arch-tag: 2e65c7ad-0d17-45a0-b4cb-3e76c72ea9d5 |
| 5 | (do not change this comment) */ | 7 | (do not change this comment) */ |
diff --git a/src/s/vms5-5.h b/src/s/vms5-5.h index ac0ba9461a2..83b08b42813 100644 --- a/src/s/vms5-5.h +++ b/src/s/vms5-5.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | #define VMS5_5 | 2 | #define VMS5_5 |
| 3 | #define VMS4_4 | 3 | #define VMS4_4 |
| 4 | 4 | ||
| 5 | #undef NO_HYPHENS_IN_FILENAMES | ||
| 6 | |||
| 5 | /* The bug that SHARABLE_LIB_BUG fixes is gone in version 5.5 of VMS. | 7 | /* The bug that SHARABLE_LIB_BUG fixes is gone in version 5.5 of VMS. |
| 6 | And defining it causes lossage because sys_errlist has a different | 8 | And defining it causes lossage because sys_errlist has a different |
| 7 | number of elements. */ | 9 | number of elements. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 463d016381c..3499e95d383 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -784,6 +784,13 @@ enum move_it_result | |||
| 784 | #define CLEAR_FACE_CACHE_COUNT 500 | 784 | #define CLEAR_FACE_CACHE_COUNT 500 |
| 785 | static int clear_face_cache_count; | 785 | static int clear_face_cache_count; |
| 786 | 786 | ||
| 787 | /* Similarly for the image cache. */ | ||
| 788 | |||
| 789 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 790 | #define CLEAR_IMAGE_CACHE_COUNT 101 | ||
| 791 | static int clear_image_cache_count; | ||
| 792 | #endif | ||
| 793 | |||
| 787 | /* Record the previous terminal frame we displayed. */ | 794 | /* Record the previous terminal frame we displayed. */ |
| 788 | 795 | ||
| 789 | static struct frame *previous_terminal_frame; | 796 | static struct frame *previous_terminal_frame; |
| @@ -10479,7 +10486,9 @@ redisplay_internal (preserve_echo_area) | |||
| 10479 | CHARPOS (this_line_start_pos) = 0; | 10486 | CHARPOS (this_line_start_pos) = 0; |
| 10480 | consider_all_windows_p |= buffer_shared > 1; | 10487 | consider_all_windows_p |= buffer_shared > 1; |
| 10481 | ++clear_face_cache_count; | 10488 | ++clear_face_cache_count; |
| 10482 | 10489 | #ifdef HAVE_WINDOW_SYSTEM | |
| 10490 | ++clear_image_cache_count; | ||
| 10491 | #endif | ||
| 10483 | 10492 | ||
| 10484 | /* Build desired matrices, and update the display. If | 10493 | /* Build desired matrices, and update the display. If |
| 10485 | consider_all_windows_p is non-zero, do it for all windows on all | 10494 | consider_all_windows_p is non-zero, do it for all windows on all |
| @@ -10492,13 +10501,6 @@ redisplay_internal (preserve_echo_area) | |||
| 10492 | struct frame **updated | 10501 | struct frame **updated |
| 10493 | = (struct frame **) alloca (size * sizeof *updated); | 10502 | = (struct frame **) alloca (size * sizeof *updated); |
| 10494 | 10503 | ||
| 10495 | /* Clear the face cache eventually. */ | ||
| 10496 | if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT) | ||
| 10497 | { | ||
| 10498 | clear_face_cache (0); | ||
| 10499 | clear_face_cache_count = 0; | ||
| 10500 | } | ||
| 10501 | |||
| 10502 | /* Recompute # windows showing selected buffer. This will be | 10504 | /* Recompute # windows showing selected buffer. This will be |
| 10503 | incremented each time such a window is displayed. */ | 10505 | incremented each time such a window is displayed. */ |
| 10504 | buffer_shared = 0; | 10506 | buffer_shared = 0; |
| @@ -10514,12 +10516,6 @@ redisplay_internal (preserve_echo_area) | |||
| 10514 | variables. */ | 10516 | variables. */ |
| 10515 | select_frame_for_redisplay (frame); | 10517 | select_frame_for_redisplay (frame); |
| 10516 | 10518 | ||
| 10517 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 10518 | if (clear_face_cache_count % 50 == 0 | ||
| 10519 | && FRAME_WINDOW_P (f)) | ||
| 10520 | clear_image_cache (f, 0); | ||
| 10521 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 10522 | |||
| 10523 | /* Mark all the scroll bars to be removed; we'll redeem | 10519 | /* Mark all the scroll bars to be removed; we'll redeem |
| 10524 | the ones we want when we redisplay their windows. */ | 10520 | the ones we want when we redisplay their windows. */ |
| 10525 | if (condemn_scroll_bars_hook) | 10521 | if (condemn_scroll_bars_hook) |
| @@ -10723,6 +10719,29 @@ redisplay_internal (preserve_echo_area) | |||
| 10723 | if (windows_or_buffers_changed && !pause) | 10719 | if (windows_or_buffers_changed && !pause) |
| 10724 | goto retry; | 10720 | goto retry; |
| 10725 | 10721 | ||
| 10722 | /* Clear the face cache eventually. */ | ||
| 10723 | if (consider_all_windows_p) | ||
| 10724 | { | ||
| 10725 | if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT) | ||
| 10726 | { | ||
| 10727 | clear_face_cache (0); | ||
| 10728 | clear_face_cache_count = 0; | ||
| 10729 | } | ||
| 10730 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 10731 | if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT) | ||
| 10732 | { | ||
| 10733 | Lisp_Object tail, frame; | ||
| 10734 | FOR_EACH_FRAME (tail, frame) | ||
| 10735 | { | ||
| 10736 | struct frame *f = XFRAME (frame); | ||
| 10737 | if (FRAME_WINDOW_P (f)) | ||
| 10738 | clear_image_cache (f, 0); | ||
| 10739 | } | ||
| 10740 | clear_image_cache_count = 0; | ||
| 10741 | } | ||
| 10742 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 10743 | } | ||
| 10744 | |||
| 10726 | end_of_redisplay: | 10745 | end_of_redisplay: |
| 10727 | unbind_to (count, Qnil); | 10746 | unbind_to (count, Qnil); |
| 10728 | RESUME_POLLING; | 10747 | RESUME_POLLING; |
| @@ -20350,8 +20369,10 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1) | |||
| 20350 | if (area != TEXT_AREA) | 20369 | if (area != TEXT_AREA) |
| 20351 | return; | 20370 | return; |
| 20352 | 20371 | ||
| 20353 | row = w->current_matrix->rows + w->phys_cursor.vpos; | 20372 | if (w->phys_cursor.vpos < 0 |
| 20354 | if (!row->displays_text_p) | 20373 | || w->phys_cursor.vpos >= w->current_matrix->nrows |
| 20374 | || (row = w->current_matrix->rows + w->phys_cursor.vpos, | ||
| 20375 | !(row->enabled_p && row->displays_text_p))) | ||
| 20355 | return; | 20376 | return; |
| 20356 | 20377 | ||
| 20357 | if (row->cursor_in_fringe_p) | 20378 | if (row->cursor_in_fringe_p) |