diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 138 | ||||
| -rw-r--r-- | src/dispextern.h | 12 | ||||
| -rw-r--r-- | src/doc.c | 32 | ||||
| -rw-r--r-- | src/emacs.c | 21 | ||||
| -rw-r--r-- | src/fileio.c | 31 | ||||
| -rw-r--r-- | src/image.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 7 | ||||
| -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 | 34 |
17 files changed, 382 insertions, 153 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 56833a341a4..dc48d647216 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,6 +1,115 @@ | |||
| 1 | 2005-03-05 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * emacs.c (USAGE1): Replace Info node name "command arguments" | ||
| 4 | with "emacs invocation". | ||
| 5 | (USAGE3): Fix usage of `--color=MODE' which actually doesn't | ||
| 6 | allow arguments `--color' and `MODE' to be separated by space. | ||
| 7 | Add --no-blinking-cursor, -nbc. | ||
| 8 | (standard_args): Add -nbc, --no-blinking-cursor. | ||
| 9 | |||
| 10 | 2005-03-04 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 11 | |||
| 12 | * s/vms.h: Define NO_HYPHENS_IN_FILENAMES. | ||
| 13 | * s/vms4-4.h, s/vms5-5.h: Undefine NO_HYPHENS_IN_FILENAMES. | ||
| 14 | * fileio.c (Fexpand_file_name) [VMS]: | ||
| 15 | Use NO_HYPHENS_IN_FILENAMES, not VMS4_4. | ||
| 16 | * doc.c (munge_doc_file_name) [VMS]: Likewise. | ||
| 17 | (Fsnarf_documentation): Call munge_doc_file_name. | ||
| 18 | |||
| 19 | 2005-03-04 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 20 | |||
| 21 | * s/vms.h (FILE_SYSTEM_CASE): New macro. | ||
| 22 | * fileio.c (Fexpand_file_name) [VMS]: Don't upcase the name | ||
| 23 | "manually"; this is now handled generally via FILE_SYSTEM_CASE. | ||
| 24 | |||
| 25 | 2005-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 26 | |||
| 27 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if | ||
| 28 | defined (MAC_OSX) && defined (HAVE_CARBON)'. | ||
| 29 | |||
| 30 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include | ||
| 31 | QuickTime.h. | ||
| 32 | |||
| 33 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | ||
| 34 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. | ||
| 35 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New | ||
| 36 | functions. | ||
| 37 | (mac_clear_font_name_table): Move extern to macterm.h. | ||
| 38 | |||
| 39 | * macfns.c (install_window_handler): Move extern to macterm.h. | ||
| 40 | (Fx_file_dialog): Check STRINGP (default_filename) to see it is | ||
| 41 | valid. Don't check !NILP (dir) because it is already checked with | ||
| 42 | CHECK_STRING. | ||
| 43 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for | ||
| 44 | specifying the default location and obtaining the selected | ||
| 45 | filename. | ||
| 46 | |||
| 47 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | ||
| 48 | |||
| 49 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that | ||
| 50 | are included via Carbon.h. | ||
| 51 | |||
| 52 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: Define | ||
| 53 | USE_CARBON_EVENTS to 1. | ||
| 54 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. | ||
| 55 | (x_free_frame_resources): Call remove_window_handler for | ||
| 56 | non-tooltip windows. | ||
| 57 | [TARGET_API_MAC_CARBON]: Don't include headers that are included | ||
| 58 | via Carbon.h. | ||
| 59 | [TARGET_API_MAC_CARBON] (mac_do_track_dragUPP) | ||
| 60 | (mac_do_receive_dragUPP): New variables. | ||
| 61 | (mac_handle_service_event, init_service_handler): Put declarations | ||
| 62 | and definitions in #ifdef MAC_OSX. | ||
| 63 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for | ||
| 64 | drag-and-drop handler functions and register them. | ||
| 65 | (remove_window_handler): New function. | ||
| 66 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use | ||
| 67 | fsspec_to_posix_pathname. | ||
| 68 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. | ||
| 69 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. | ||
| 70 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set | ||
| 71 | default cursors. | ||
| 72 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call | ||
| 73 | init_service_handler or init_quit_char_handler. | ||
| 74 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. | ||
| 75 | |||
| 76 | * macterm.h (install_window_handler, remove_window_handler) | ||
| 77 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname) | ||
| 78 | (mac_clear_font_name_table): New externs. | ||
| 79 | |||
| 80 | 2005-03-03 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 81 | |||
| 82 | * fileio.c (FILE_SYSTEM_CASE): Define macro if not already defined. | ||
| 83 | (Ffile_name_directory): Use FILE_SYSTEM_CASE unconditionally. | ||
| 84 | (Fexpand_file_name): Likewise. | ||
| 85 | |||
| 86 | 2005-03-03 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 87 | |||
| 88 | * emacs.c (Fkill_emacs): Use EXIT_SUCCESS; | ||
| 89 | no longer special-case VMS. Add bogus return value. | ||
| 90 | |||
| 91 | 2005-03-02 Kim F. Storm <storm@cua.dk> | ||
| 92 | |||
| 93 | * dispextern.h (XASSERTS): Define to 0 if not already defined. | ||
| 94 | (xassert) [!XASSERTS]: Define dummy version. | ||
| 95 | |||
| 96 | 2005-03-02 Kim F. Storm <storm@cua.dk> | ||
| 97 | |||
| 98 | * xdisp.c (redisplay_window): YABX (yet another bogus xassert). | ||
| 99 | Reported by David Kastrup. | ||
| 100 | |||
| 101 | 2005-03-01 Ehud Karni <ehud@unix.mvs.co.il> | ||
| 102 | |||
| 103 | * xdisp.c (get_next_display_element): Fix control and escape | ||
| 104 | glyph from display vector. | ||
| 105 | |||
| 106 | 2005-03-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 107 | |||
| 108 | * keyboard.c (Fposn_at_x_y): Check integerness of X and Y. | ||
| 109 | |||
| 1 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 110 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 111 | ||
| 3 | * gtkutil.c (xg_resize_outer_widget): Removed unneeded call to | 112 | * gtkutil.c (xg_resize_outer_widget): Remove unneeded call to |
| 4 | gtk_window_resize and x_wm_set_size_hint. | 113 | gtk_window_resize and x_wm_set_size_hint. |
| 5 | 114 | ||
| 6 | 2005-02-25 Kim F. Storm <storm@cua.dk> | 115 | 2005-02-25 Kim F. Storm <storm@cua.dk> |
| @@ -30,7 +139,7 @@ | |||
| 30 | * window.c (window_scroll_pixel_based): When scrolling backwards, | 139 | * window.c (window_scroll_pixel_based): When scrolling backwards, |
| 31 | handle partial visible line at end of window even when we hit PT. | 140 | handle partial visible line at end of window even when we hit PT. |
| 32 | 141 | ||
| 33 | 2005-02-21 Stefan <monnier@iro.umontreal.ca> | 142 | 2005-02-21 Stefan Monnier <monnier@iro.umontreal.ca> |
| 34 | 143 | ||
| 35 | * keymap.h: Declare Fcurrent_active_maps, used in doc.c. | 144 | * keymap.h: Declare Fcurrent_active_maps, used in doc.c. |
| 36 | 145 | ||
| @@ -88,8 +197,7 @@ | |||
| 88 | (Fx_window_property): Likewise. | 197 | (Fx_window_property): Likewise. |
| 89 | 198 | ||
| 90 | * xselect.c (Fx_disown_selection_internal): Use union of struct | 199 | * xselect.c (Fx_disown_selection_internal): Use union of struct |
| 91 | input_event and struct selection_input_event to avoid aliasing | 200 | input_event and struct selection_input_event to avoid aliasing issues. |
| 92 | issues. | ||
| 93 | 201 | ||
| 94 | * xterm.c (handle_one_xevent): Use union of struct input_event and | 202 | * xterm.c (handle_one_xevent): Use union of struct input_event and |
| 95 | struct selection_input_event to avoid aliasing issues. | 203 | struct selection_input_event to avoid aliasing issues. |
| @@ -118,21 +226,20 @@ | |||
| 118 | clipboard operations and delayed rendering. | 226 | clipboard operations and delayed rendering. |
| 119 | 227 | ||
| 120 | Drop last_clipboard_text and related code, keep track of | 228 | Drop last_clipboard_text and related code, keep track of |
| 121 | ownership via clipboard_owner instead. Drop old #if0 | 229 | ownership via clipboard_owner instead. Drop old #if0 sections. |
| 122 | sections. | ||
| 123 | 230 | ||
| 124 | (DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP) | 231 | (DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP) |
| 125 | (clipboard_owner, modifying_clipboard, cfg_coding_system) | 232 | (clipboard_owner, modifying_clipboard, cfg_coding_system) |
| 126 | (cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text) | 233 | (cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text) |
| 127 | (current_coding_system, current_requires_encoding) | 234 | (current_coding_system, current_requires_encoding) |
| 128 | (current_num_nls, current_clipboard_type, current_lcid): New | 235 | (current_num_nls, current_clipboard_type, current_lcid): |
| 129 | static variables. | 236 | New static variables. |
| 130 | 237 | ||
| 131 | (convert_to_handle_as_ascii, convert_to_handle_as_coded) | 238 | (convert_to_handle_as_ascii, convert_to_handle_as_coded) |
| 132 | (render, render_all, run_protected, lisp_error_handler) | 239 | (render, render_all, run_protected, lisp_error_handler) |
| 133 | (owner_callback, create_owner, setup_config) | 240 | (owner_callback, create_owner, setup_config) |
| 134 | (enum_locale_callback, cp_from_locale, coding_from_cp): New | 241 | (enum_locale_callback, cp_from_locale, coding_from_cp): |
| 135 | local functions. | 242 | New local functions. |
| 136 | 243 | ||
| 137 | (term_w32select, globals_of_w32select): New global functions. | 244 | (term_w32select, globals_of_w32select): New global functions. |
| 138 | 245 | ||
| @@ -332,8 +439,7 @@ | |||
| 332 | (casify_region): Fix loop condition, args to replace_range_2, and | 439 | (casify_region): Fix loop condition, args to replace_range_2, and |
| 333 | update opoint_byte. | 440 | update opoint_byte. |
| 334 | 441 | ||
| 335 | * insdel.c (replace_range_2): Fix bugs in adjusting markers and | 442 | * insdel.c (replace_range_2): Fix bugs in adjusting markers and point. |
| 336 | point. | ||
| 337 | 443 | ||
| 338 | 2005-02-01 Kim F. Storm <storm@cua.dk> | 444 | 2005-02-01 Kim F. Storm <storm@cua.dk> |
| 339 | 445 | ||
| @@ -761,7 +867,7 @@ | |||
| 761 | [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. | 867 | [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. |
| 762 | Reject only when there are no filename items. Set background color | 868 | Reject only when there are no filename items. Set background color |
| 763 | before (un)highlighting the window below the dragged items. | 869 | before (un)highlighting the window below the dragged items. |
| 764 | (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update. | 870 | (XTread_socket) [USE_CARBON_EVENTS]: Don't call do_window_update. |
| 765 | 871 | ||
| 766 | 2005-01-05 Romain Francoise <romain@orebokech.com> | 872 | 2005-01-05 Romain Francoise <romain@orebokech.com> |
| 767 | 873 | ||
| @@ -11015,9 +11121,9 @@ | |||
| 11015 | These changes were in part based upon suggestions made by Peter | 11121 | These changes were in part based upon suggestions made by Peter |
| 11016 | 'Luna' Runestig [peter@runestig.com]. | 11122 | 'Luna' Runestig [peter@runestig.com]. |
| 11017 | 11123 | ||
| 11018 | * w32.c (g_b_init_is_windows_9x, g_b_init_open_process_token, | 11124 | * w32.c (g_b_init_is_windows_9x, g_b_init_open_process_token) |
| 11019 | g_b_init_get_token_information, g_b_init_lookup_account_sid, | 11125 | (g_b_init_get_token_information, g_b_init_lookup_account_sid) |
| 11020 | g_b_init_get_sid_identifier_authority ): Add several static | 11126 | (g_b_init_get_sid_identifier_authority ): Add several static |
| 11021 | global variables. | 11127 | global variables. |
| 11022 | 11128 | ||
| 11023 | * w32.c (globals_of_w32): New function. Used to initialize those | 11129 | * w32.c (globals_of_w32): New function. Used to initialize those |
diff --git a/src/dispextern.h b/src/dispextern.h index 5401fecedd5..60f24feef5b 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -119,6 +119,13 @@ enum window_part | |||
| 119 | #define GLYPH_DEBUG 0 | 119 | #define GLYPH_DEBUG 0 |
| 120 | #endif | 120 | #endif |
| 121 | 121 | ||
| 122 | /* If XASSERTS is non-zero, additional consistency checks are activated. | ||
| 123 | Turn it off by defining the macro XASSERTS to zero. */ | ||
| 124 | |||
| 125 | #ifndef XASSERTS | ||
| 126 | #define XASSERTS 0 | ||
| 127 | #endif | ||
| 128 | |||
| 122 | /* Macros to include code only if GLYPH_DEBUG != 0. */ | 129 | /* Macros to include code only if GLYPH_DEBUG != 0. */ |
| 123 | 130 | ||
| 124 | #if GLYPH_DEBUG | 131 | #if GLYPH_DEBUG |
| @@ -127,8 +134,11 @@ enum window_part | |||
| 127 | #define IF_DEBUG(X) (void) 0 | 134 | #define IF_DEBUG(X) (void) 0 |
| 128 | #endif | 135 | #endif |
| 129 | 136 | ||
| 130 | /* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release. */ | 137 | #if XASSERTS |
| 131 | #define xassert(X) do {if (!(X)) abort ();} while (0) | 138 | #define xassert(X) do {if (!(X)) abort ();} while (0) |
| 139 | #else | ||
| 140 | #define xassert(X) (void) 0 | ||
| 141 | #endif | ||
| 132 | 142 | ||
| 133 | /* Macro for displaying traces of redisplay. If Emacs was compiled | 143 | /* Macro for displaying traces of redisplay. If Emacs was compiled |
| 134 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to | 144 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to |
| @@ -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 159a162d649..d83adc989eb 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -251,7 +251,7 @@ Run Emacs, the extensible, customizable, self-documenting real-time\n\ | |||
| 251 | display editor. The recommended way to start Emacs for normal editing\n\ | 251 | display editor. The recommended way to start Emacs for normal editing\n\ |
| 252 | is with no options at all.\n\ | 252 | is with no options at all.\n\ |
| 253 | \n\ | 253 | \n\ |
| 254 | Run M-x info RET m emacs RET m command arguments RET inside Emacs to\n\ | 254 | Run M-x info RET m emacs RET m emacs invocation RET inside Emacs to\n\ |
| 255 | read the main documentation for these command-line arguments.\n\ | 255 | read the main documentation for these command-line arguments.\n\ |
| 256 | \n\ | 256 | \n\ |
| 257 | Initialization options:\n\ | 257 | Initialization options:\n\ |
| @@ -297,7 +297,7 @@ Display options:\n\ | |||
| 297 | --background-color, -bg COLOR window background color\n\ | 297 | --background-color, -bg COLOR window background color\n\ |
| 298 | --border-color, -bd COLOR main border color\n\ | 298 | --border-color, -bd COLOR main border color\n\ |
| 299 | --border-width, -bw WIDTH width of main border\n\ | 299 | --border-width, -bw WIDTH width of main border\n\ |
| 300 | --color MODE color mode for character terminals;\n\ | 300 | --color, --color=MODE color mode for character terminals;\n\ |
| 301 | MODE defaults to `auto', and can also\n\ | 301 | MODE defaults to `auto', and can also\n\ |
| 302 | be `never', `auto', `always',\n\ | 302 | be `never', `auto', `always',\n\ |
| 303 | or a mode name like `ansi8'\n\ | 303 | or a mode name like `ansi8'\n\ |
| @@ -314,6 +314,7 @@ Display options:\n\ | |||
| 314 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ | 314 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ |
| 315 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ | 315 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ |
| 316 | --name NAME title for initial Emacs frame\n\ | 316 | --name NAME title for initial Emacs frame\n\ |
| 317 | --no-blinking-cursor, -nbc disable blinking cursor\n\ | ||
| 317 | --reverse-video, -r, -rv switch foreground and background\n\ | 318 | --reverse-video, -r, -rv switch foreground and background\n\ |
| 318 | --title, -T TITLE title for initial Emacs frame\n\ | 319 | --title, -T TITLE title for initial Emacs frame\n\ |
| 319 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ | 320 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ |
| @@ -1483,7 +1484,7 @@ main (argc, argv | |||
| 1483 | init_ntproc (); /* must precede init_editfns. */ | 1484 | init_ntproc (); /* must precede init_editfns. */ |
| 1484 | #endif | 1485 | #endif |
| 1485 | 1486 | ||
| 1486 | #ifdef HAVE_CARBON | 1487 | #if defined (MAC_OSX) && defined (HAVE_CARBON) |
| 1487 | if (initialized) | 1488 | if (initialized) |
| 1488 | init_mac_osx_environment (); | 1489 | init_mac_osx_environment (); |
| 1489 | #endif | 1490 | #endif |
| @@ -1627,12 +1628,12 @@ main (argc, argv | |||
| 1627 | syms_of_fontset (); | 1628 | syms_of_fontset (); |
| 1628 | #endif /* HAVE_NTGUI */ | 1629 | #endif /* HAVE_NTGUI */ |
| 1629 | 1630 | ||
| 1630 | #ifdef HAVE_CARBON | 1631 | #if defined (MAC_OSX) && defined (HAVE_CARBON) |
| 1631 | syms_of_macterm (); | 1632 | syms_of_macterm (); |
| 1632 | syms_of_macfns (); | 1633 | syms_of_macfns (); |
| 1633 | syms_of_macmenu (); | 1634 | syms_of_macmenu (); |
| 1634 | syms_of_fontset (); | 1635 | syms_of_fontset (); |
| 1635 | #endif /* HAVE_CARBON */ | 1636 | #endif /* MAC_OSX && HAVE_CARBON */ |
| 1636 | 1637 | ||
| 1637 | #ifdef SYMS_SYSTEM | 1638 | #ifdef SYMS_SYSTEM |
| 1638 | SYMS_SYSTEM; | 1639 | SYMS_SYSTEM; |
| @@ -1824,6 +1825,7 @@ struct standard_args standard_args[] = | |||
| 1824 | { "-ib", "--internal-border", 10, 1 }, | 1825 | { "-ib", "--internal-border", 10, 1 }, |
| 1825 | { "-ms", "--mouse-color", 10, 1 }, | 1826 | { "-ms", "--mouse-color", 10, 1 }, |
| 1826 | { "-cr", "--cursor-color", 10, 1 }, | 1827 | { "-cr", "--cursor-color", 10, 1 }, |
| 1828 | { "-nbc", "--no-blinking-cursor", 10, 0 }, | ||
| 1827 | { "-fn", "--font", 10, 1 }, | 1829 | { "-fn", "--font", 10, 1 }, |
| 1828 | { "-font", 0, 10, 1 }, | 1830 | { "-font", 0, 10, 1 }, |
| 1829 | { "-fs", "--fullscreen", 10, 0 }, | 1831 | { "-fs", "--fullscreen", 10, 0 }, |
| @@ -2052,14 +2054,9 @@ all of which are called before Emacs is actually killed. */) | |||
| 2052 | if (STRINGP (Vauto_save_list_file_name)) | 2054 | if (STRINGP (Vauto_save_list_file_name)) |
| 2053 | unlink (SDATA (Vauto_save_list_file_name)); | 2055 | unlink (SDATA (Vauto_save_list_file_name)); |
| 2054 | 2056 | ||
| 2055 | exit (INTEGERP (arg) ? XINT (arg) | 2057 | exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); |
| 2056 | #ifdef VMS | ||
| 2057 | : 1 | ||
| 2058 | #else | ||
| 2059 | : 0 | ||
| 2060 | #endif | ||
| 2061 | ); | ||
| 2062 | /* NOTREACHED */ | 2058 | /* NOTREACHED */ |
| 2059 | return 0; | ||
| 2063 | } | 2060 | } |
| 2064 | 2061 | ||
| 2065 | 2062 | ||
diff --git a/src/fileio.c b/src/fileio.c index 12360c677f8..3212c51d096 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -150,6 +150,10 @@ extern int use_file_dialog; | |||
| 150 | # define lstat stat | 150 | # define lstat stat |
| 151 | #endif | 151 | #endif |
| 152 | 152 | ||
| 153 | #ifndef FILE_SYSTEM_CASE | ||
| 154 | #define FILE_SYSTEM_CASE(filename) (filename) | ||
| 155 | #endif | ||
| 156 | |||
| 153 | /* Nonzero during writing of auto-save files */ | 157 | /* Nonzero during writing of auto-save files */ |
| 154 | int auto_saving; | 158 | int auto_saving; |
| 155 | 159 | ||
| @@ -415,9 +419,7 @@ on VMS, perhaps instead a string ending in `:', `]' or `>'. */) | |||
| 415 | if (!NILP (handler)) | 419 | if (!NILP (handler)) |
| 416 | return call2 (handler, Qfile_name_directory, filename); | 420 | return call2 (handler, Qfile_name_directory, filename); |
| 417 | 421 | ||
| 418 | #ifdef FILE_SYSTEM_CASE | ||
| 419 | filename = FILE_SYSTEM_CASE (filename); | 422 | filename = FILE_SYSTEM_CASE (filename); |
| 420 | #endif | ||
| 421 | beg = SDATA (filename); | 423 | beg = SDATA (filename); |
| 422 | #ifdef DOS_NT | 424 | #ifdef DOS_NT |
| 423 | beg = strcpy (alloca (strlen (beg) + 1), beg); | 425 | beg = strcpy (alloca (strlen (beg) + 1), beg); |
| @@ -1122,14 +1124,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1122 | UNGCPRO; | 1124 | UNGCPRO; |
| 1123 | } | 1125 | } |
| 1124 | 1126 | ||
| 1125 | #ifdef VMS | ||
| 1126 | /* Filenames on VMS are always upper case. */ | ||
| 1127 | name = Fupcase (name); | ||
| 1128 | #endif | ||
| 1129 | #ifdef FILE_SYSTEM_CASE | ||
| 1130 | name = FILE_SYSTEM_CASE (name); | 1127 | name = FILE_SYSTEM_CASE (name); |
| 1131 | #endif | ||
| 1132 | |||
| 1133 | nm = SDATA (name); | 1128 | nm = SDATA (name); |
| 1134 | 1129 | ||
| 1135 | #ifdef DOS_NT | 1130 | #ifdef DOS_NT |
| @@ -1229,23 +1224,23 @@ See also the function `substitute-in-file-name'. */) | |||
| 1229 | slash = p; | 1224 | slash = p; |
| 1230 | } | 1225 | } |
| 1231 | if (p[0] == '-') | 1226 | if (p[0] == '-') |
| 1232 | #ifndef VMS4_4 | 1227 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1233 | /* VMS pre V4.4,convert '-'s in filenames. */ | ||
| 1234 | if (lbrack == rbrack) | 1228 | if (lbrack == rbrack) |
| 1235 | { | 1229 | { |
| 1236 | if (dots < 2) /* this is to allow negative version numbers */ | 1230 | /* Avoid clobbering negative version numbers. */ |
| 1231 | if (dots < 2) | ||
| 1237 | p[0] = '_'; | 1232 | p[0] = '_'; |
| 1238 | } | 1233 | } |
| 1239 | else | 1234 | else |
| 1240 | #endif /* VMS4_4 */ | 1235 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1241 | if (lbrack > rbrack && | 1236 | if (lbrack > rbrack && |
| 1242 | ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && | 1237 | ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && |
| 1243 | (p[1] == '.' || p[1] == ']' || p[1] == '>'))) | 1238 | (p[1] == '.' || p[1] == ']' || p[1] == '>'))) |
| 1244 | lose = 1; | 1239 | lose = 1; |
| 1245 | #ifndef VMS4_4 | 1240 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1246 | else | 1241 | else |
| 1247 | p[0] = '_'; | 1242 | p[0] = '_'; |
| 1248 | #endif /* VMS4_4 */ | 1243 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1249 | /* count open brackets, reset close bracket pointer */ | 1244 | /* count open brackets, reset close bracket pointer */ |
| 1250 | if (p[0] == '[' || p[0] == '<') | 1245 | if (p[0] == '[' || p[0] == '<') |
| 1251 | lbrack++, brack = 0; | 1246 | lbrack++, brack = 0; |
| @@ -1625,12 +1620,12 @@ See also the function `substitute-in-file-name'. */) | |||
| 1625 | } | 1620 | } |
| 1626 | else | 1621 | else |
| 1627 | { | 1622 | { |
| 1628 | #ifndef VMS4_4 | 1623 | #ifdef NO_HYPHENS_IN_FILENAMES |
| 1629 | if (*p == '-' && | 1624 | if (*p == '-' && |
| 1630 | o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && | 1625 | o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && |
| 1631 | p[1] != ']' && p[1] != '>' && p[1] != '.') | 1626 | p[1] != ']' && p[1] != '>' && p[1] != '.') |
| 1632 | *p = '_'; | 1627 | *p = '_'; |
| 1633 | #endif /* VMS4_4 */ | 1628 | #endif /* NO_HYPHENS_IN_FILENAMES */ |
| 1634 | *o++ = *p++; | 1629 | *o++ = *p++; |
| 1635 | } | 1630 | } |
| 1636 | #else /* not VMS */ | 1631 | #else /* not VMS */ |
| @@ -6387,7 +6382,7 @@ and `read-file-name-function'. */) | |||
| 6387 | { | 6382 | { |
| 6388 | Lisp_Object val1 = double_dollars (val); | 6383 | Lisp_Object val1 = double_dollars (val); |
| 6389 | tem = Fsymbol_value (Qfile_name_history); | 6384 | tem = Fsymbol_value (Qfile_name_history); |
| 6390 | if (history_delete_duplicates) | 6385 | if (history_delete_duplicates) |
| 6391 | XSETCDR (tem, Fdelete (val1, XCDR(tem))); | 6386 | XSETCDR (tem, Fdelete (val1, XCDR(tem))); |
| 6392 | XSETCAR (tem, val1); | 6387 | XSETCAR (tem, val1); |
| 6393 | } | 6388 | } |
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 42255dfbd91..3da16b82271 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Keyboard and mouse input; editor command loop. | 1 | /* Keyboard and mouse input; editor command loop. |
| 2 | Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03,04 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, |
| 3 | Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -10660,6 +10660,9 @@ The `posn-' functions access elements of such lists. */) | |||
| 10660 | (x, y, frame_or_window, whole) | 10660 | (x, y, frame_or_window, whole) |
| 10661 | Lisp_Object x, y, frame_or_window, whole; | 10661 | Lisp_Object x, y, frame_or_window, whole; |
| 10662 | { | 10662 | { |
| 10663 | CHECK_NATNUM (x); | ||
| 10664 | CHECK_NATNUM (y); | ||
| 10665 | |||
| 10663 | if (NILP (frame_or_window)) | 10666 | if (NILP (frame_or_window)) |
| 10664 | frame_or_window = selected_window; | 10667 | frame_or_window = selected_window; |
| 10665 | 10668 | ||
| @@ -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 26d63ec99af..d90344dc1d0 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 21effb23cfa..a98d4ae5eb4 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" |
| @@ -245,7 +245,7 @@ extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *)); | |||
| 245 | 245 | ||
| 246 | extern int inhibit_window_system; | 246 | extern int inhibit_window_system; |
| 247 | 247 | ||
| 248 | #if __MRC__ | 248 | #if __MRC__ && !TARGET_API_MAC_CARBON |
| 249 | QDGlobals qd; /* QuickDraw global information structure. */ | 249 | QDGlobals qd; /* QuickDraw global information structure. */ |
| 250 | #endif | 250 | #endif |
| 251 | 251 | ||
| @@ -5574,6 +5574,9 @@ x_free_frame_resources (f) | |||
| 5574 | 5574 | ||
| 5575 | BLOCK_INPUT; | 5575 | BLOCK_INPUT; |
| 5576 | 5576 | ||
| 5577 | if (wp != tip_window) | ||
| 5578 | remove_window_handler (wp); | ||
| 5579 | |||
| 5577 | DisposeWindow (wp); | 5580 | DisposeWindow (wp); |
| 5578 | if (wp == tip_window) | 5581 | if (wp == tip_window) |
| 5579 | /* Neither WaitNextEvent nor ReceiveNextEvent receives `window | 5582 | /* Neither WaitNextEvent nor ReceiveNextEvent receives `window |
| @@ -7078,7 +7081,7 @@ x_find_ccl_program (fontp) | |||
| 7078 | 7081 | ||
| 7079 | /* The Mac Event loop code */ | 7082 | /* The Mac Event loop code */ |
| 7080 | 7083 | ||
| 7081 | #ifndef MAC_OSX | 7084 | #if !TARGET_API_MAC_CARBON |
| 7082 | #include <Events.h> | 7085 | #include <Events.h> |
| 7083 | #include <Quickdraw.h> | 7086 | #include <Quickdraw.h> |
| 7084 | #include <Balloons.h> | 7087 | #include <Balloons.h> |
| @@ -7099,7 +7102,7 @@ x_find_ccl_program (fontp) | |||
| 7099 | #if __MWERKS__ | 7102 | #if __MWERKS__ |
| 7100 | #include <unix.h> | 7103 | #include <unix.h> |
| 7101 | #endif | 7104 | #endif |
| 7102 | #endif /* ! MAC_OSX */ | 7105 | #endif /* ! TARGET_API_MAC_CARBON */ |
| 7103 | 7106 | ||
| 7104 | #define M_APPLE 128 | 7107 | #define M_APPLE 128 |
| 7105 | #define I_ABOUT 1 | 7108 | #define I_ABOUT 1 |
| @@ -7200,12 +7203,16 @@ static pascal OSErr do_ae_quit_application (AppleEvent *, AppleEvent *, long); | |||
| 7200 | /* Drag and Drop */ | 7203 | /* Drag and Drop */ |
| 7201 | static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference); | 7204 | static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference); |
| 7202 | static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference); | 7205 | static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference); |
| 7206 | static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL; | ||
| 7207 | static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL; | ||
| 7203 | #endif | 7208 | #endif |
| 7204 | 7209 | ||
| 7205 | #if USE_CARBON_EVENTS | 7210 | #if USE_CARBON_EVENTS |
| 7211 | #ifdef MAC_OSX | ||
| 7206 | /* Preliminary Support for the OSX Services Menu */ | 7212 | /* Preliminary Support for the OSX Services Menu */ |
| 7207 | static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*); | 7213 | static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*); |
| 7208 | static void init_service_handler (); | 7214 | static void init_service_handler (); |
| 7215 | #endif | ||
| 7209 | /* Window Event Handler */ | 7216 | /* Window Event Handler */ |
| 7210 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, | 7217 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, |
| 7211 | EventRef, void *); | 7218 | EventRef, void *); |
| @@ -7844,7 +7851,7 @@ init_required_apple_events () | |||
| 7844 | } | 7851 | } |
| 7845 | 7852 | ||
| 7846 | #if USE_CARBON_EVENTS | 7853 | #if USE_CARBON_EVENTS |
| 7847 | 7854 | #ifdef MAC_OSX | |
| 7848 | void | 7855 | void |
| 7849 | init_service_handler () | 7856 | init_service_handler () |
| 7850 | { | 7857 | { |
| @@ -7940,7 +7947,7 @@ mac_handle_service_event (EventHandlerCallRef callRef, | |||
| 7940 | } | 7947 | } |
| 7941 | return err; | 7948 | return err; |
| 7942 | } | 7949 | } |
| 7943 | 7950 | #endif | |
| 7944 | 7951 | ||
| 7945 | static pascal OSStatus | 7952 | static pascal OSStatus |
| 7946 | mac_handle_window_event (next_handler, event, data) | 7953 | mac_handle_window_event (next_handler, event, data) |
| @@ -8037,14 +8044,30 @@ install_window_handler (window) | |||
| 8037 | NULL, NULL); | 8044 | NULL, NULL); |
| 8038 | #endif | 8045 | #endif |
| 8039 | #if TARGET_API_MAC_CARBON | 8046 | #if TARGET_API_MAC_CARBON |
| 8047 | if (mac_do_track_dragUPP == NULL) | ||
| 8048 | mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag); | ||
| 8049 | if (mac_do_receive_dragUPP == NULL) | ||
| 8050 | mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag); | ||
| 8051 | |||
| 8040 | if (err == noErr) | 8052 | if (err == noErr) |
| 8041 | err = InstallTrackingHandler (mac_do_track_drag, window, NULL); | 8053 | err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL); |
| 8042 | if (err == noErr) | 8054 | if (err == noErr) |
| 8043 | err = InstallReceiveHandler (mac_do_receive_drag, window, NULL); | 8055 | err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL); |
| 8044 | #endif | 8056 | #endif |
| 8045 | return err; | 8057 | return err; |
| 8046 | } | 8058 | } |
| 8047 | 8059 | ||
| 8060 | void | ||
| 8061 | remove_window_handler (window) | ||
| 8062 | WindowPtr window; | ||
| 8063 | { | ||
| 8064 | #if TARGET_API_MAC_CARBON | ||
| 8065 | if (mac_do_track_dragUPP) | ||
| 8066 | RemoveTrackingHandler (mac_do_track_dragUPP, window); | ||
| 8067 | if (mac_do_receive_dragUPP) | ||
| 8068 | RemoveReceiveHandler (mac_do_receive_dragUPP, window); | ||
| 8069 | #endif | ||
| 8070 | } | ||
| 8048 | 8071 | ||
| 8049 | /* Open Application Apple Event */ | 8072 | /* Open Application Apple Event */ |
| 8050 | static pascal OSErr | 8073 | static pascal OSErr |
| @@ -8123,9 +8146,9 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) | |||
| 8123 | /* AE file list is one based so just use that for indexing here. */ | 8146 | /* AE file list is one based so just use that for indexing here. */ |
| 8124 | for (i = 1; i <= num_files_to_open; i++) | 8147 | for (i = 1; i <= num_files_to_open; i++) |
| 8125 | { | 8148 | { |
| 8149 | char unix_path_name[MAXPATHLEN]; | ||
| 8126 | #ifdef MAC_OSX | 8150 | #ifdef MAC_OSX |
| 8127 | FSRef fref; | 8151 | FSRef fref; |
| 8128 | char unix_path_name[MAXPATHLEN]; | ||
| 8129 | 8152 | ||
| 8130 | err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword, | 8153 | err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword, |
| 8131 | &actual_type, &fref, sizeof (FSRef), | 8154 | &actual_type, &fref, sizeof (FSRef), |
| @@ -8137,15 +8160,13 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) | |||
| 8137 | == noErr) | 8160 | == noErr) |
| 8138 | #else | 8161 | #else |
| 8139 | FSSpec fs; | 8162 | FSSpec fs; |
| 8140 | Str255 path_name, unix_path_name; | ||
| 8141 | 8163 | ||
| 8142 | err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type, | 8164 | err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type, |
| 8143 | (Ptr) &fs, sizeof (fs), &actual_size); | 8165 | (Ptr) &fs, sizeof (fs), &actual_size); |
| 8144 | if (err != noErr) continue; | 8166 | if (err != noErr) continue; |
| 8145 | 8167 | ||
| 8146 | if (path_from_vol_dir_name (path_name, 255, fs.vRefNum, fs.parID, | 8168 | if (fsspec_to_posix_pathname (&fs, unix_path_name, |
| 8147 | fs.name) && | 8169 | sizeof (unix_path_name) - 1) == noErr) |
| 8148 | mac_to_posix_pathname (path_name, unix_path_name, 255)) | ||
| 8149 | #endif | 8170 | #endif |
| 8150 | /* x-dnd functions expect undecoded filenames. */ | 8171 | /* x-dnd functions expect undecoded filenames. */ |
| 8151 | drag_and_drop_file_list = | 8172 | drag_and_drop_file_list = |
| @@ -8264,10 +8285,9 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, | |||
| 8264 | { | 8285 | { |
| 8265 | #ifdef MAC_OSX | 8286 | #ifdef MAC_OSX |
| 8266 | FSRef fref; | 8287 | FSRef fref; |
| 8267 | char unix_path_name[MAXPATHLEN]; | ||
| 8268 | #else | ||
| 8269 | Str255 path_name, unix_path_name; | ||
| 8270 | #endif | 8288 | #endif |
| 8289 | char unix_path_name[MAXPATHLEN]; | ||
| 8290 | |||
| 8271 | GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L); | 8291 | GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L); |
| 8272 | #ifdef MAC_OSX | 8292 | #ifdef MAC_OSX |
| 8273 | /* Use Carbon routines, otherwise it converts the file name | 8293 | /* Use Carbon routines, otherwise it converts the file name |
| @@ -8275,9 +8295,8 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, | |||
| 8275 | FSpMakeFSRef (&data.fileSpec, &fref); | 8295 | FSpMakeFSRef (&data.fileSpec, &fref); |
| 8276 | if (! FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name))); | 8296 | if (! FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name))); |
| 8277 | #else | 8297 | #else |
| 8278 | if (path_from_vol_dir_name (path_name, 255, data.fileSpec.vRefNum, | 8298 | if (fsspec_to_posix_pathname (&data.fileSpec, unix_path_name, |
| 8279 | data.fileSpec.parID, data.fileSpec.name) && | 8299 | sizeof (unix_path_name) - 1) == noErr) |
| 8280 | mac_to_posix_pathname (path_name, unix_path_name, 255)) | ||
| 8281 | #endif | 8300 | #endif |
| 8282 | /* x-dnd functions expect undecoded filenames. */ | 8301 | /* x-dnd functions expect undecoded filenames. */ |
| 8283 | drag_and_drop_file_list = | 8302 | drag_and_drop_file_list = |
| @@ -8374,7 +8393,7 @@ profiler_exit_proc () | |||
| 8374 | hints and prompts in the minibuffer after the user stops typing for | 8393 | hints and prompts in the minibuffer after the user stops typing for |
| 8375 | a wait, etc. */ | 8394 | a wait, etc. */ |
| 8376 | 8395 | ||
| 8377 | #if !TARGET_API_MAC_CARBON | 8396 | #ifdef MAC_OS8 |
| 8378 | #undef main | 8397 | #undef main |
| 8379 | int | 8398 | int |
| 8380 | main (void) | 8399 | main (void) |
| @@ -8956,7 +8975,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8956 | int keycode = (er.message & keyCodeMask) >> 8; | 8975 | int keycode = (er.message & keyCodeMask) >> 8; |
| 8957 | int xkeysym; | 8976 | int xkeysym; |
| 8958 | 8977 | ||
| 8959 | #if USE_CARBON_EVENTS | 8978 | #if USE_CARBON_EVENTS && defined (MAC_OSX) |
| 8960 | /* When using Carbon Events, we need to pass raw keyboard | 8979 | /* When using Carbon Events, we need to pass raw keyboard |
| 8961 | events to the TSM ourselves. If TSM handles it, it | 8980 | events to the TSM ourselves. If TSM handles it, it |
| 8962 | will pass back noErr, otherwise it will pass back | 8981 | will pass back noErr, otherwise it will pass back |
| @@ -9265,12 +9284,21 @@ make_mac_terminal_frame (struct frame *f) | |||
| 9265 | f->output_data.mac->mouse_pixel = 0xff00ff; | 9284 | f->output_data.mac->mouse_pixel = 0xff00ff; |
| 9266 | f->output_data.mac->cursor_foreground_pixel = 0x0000ff; | 9285 | f->output_data.mac->cursor_foreground_pixel = 0x0000ff; |
| 9267 | 9286 | ||
| 9287 | #if TARGET_API_MAC_CARBON | ||
| 9288 | f->output_data.mac->text_cursor = kThemeIBeamCursor; | ||
| 9289 | f->output_data.mac->nontext_cursor = kThemeArrowCursor; | ||
| 9290 | f->output_data.mac->modeline_cursor = kThemeArrowCursor; | ||
| 9291 | f->output_data.mac->hand_cursor = kThemePointingHandCursor; | ||
| 9292 | f->output_data.mac->hourglass_cursor = kThemeWatchCursor; | ||
| 9293 | f->output_data.mac->horizontal_drag_cursor = kThemeResizeLeftRightCursor; | ||
| 9294 | #else | ||
| 9268 | f->output_data.mac->text_cursor = GetCursor (iBeamCursor); | 9295 | f->output_data.mac->text_cursor = GetCursor (iBeamCursor); |
| 9269 | f->output_data.mac->nontext_cursor = &arrow_cursor; | 9296 | f->output_data.mac->nontext_cursor = &arrow_cursor; |
| 9270 | f->output_data.mac->modeline_cursor = &arrow_cursor; | 9297 | f->output_data.mac->modeline_cursor = &arrow_cursor; |
| 9271 | f->output_data.mac->hand_cursor = &arrow_cursor; | 9298 | f->output_data.mac->hand_cursor = &arrow_cursor; |
| 9272 | f->output_data.mac->hourglass_cursor = GetCursor (watchCursor); | 9299 | f->output_data.mac->hourglass_cursor = GetCursor (watchCursor); |
| 9273 | f->output_data.mac->horizontal_drag_cursor = &arrow_cursor; | 9300 | f->output_data.mac->horizontal_drag_cursor = &arrow_cursor; |
| 9301 | #endif | ||
| 9274 | 9302 | ||
| 9275 | FRAME_FONTSET (f) = -1; | 9303 | FRAME_FONTSET (f) = -1; |
| 9276 | f->output_data.mac->explicit_parent = 0; | 9304 | f->output_data.mac->explicit_parent = 0; |
| @@ -9806,7 +9834,7 @@ mac_initialize () | |||
| 9806 | #if TARGET_API_MAC_CARBON | 9834 | #if TARGET_API_MAC_CARBON |
| 9807 | init_required_apple_events (); | 9835 | init_required_apple_events (); |
| 9808 | 9836 | ||
| 9809 | #if USE_CARBON_EVENTS | 9837 | #if USE_CARBON_EVENTS && defined (MAC_OSX) |
| 9810 | init_service_handler (); | 9838 | init_service_handler (); |
| 9811 | 9839 | ||
| 9812 | init_quit_char_handler (); | 9840 | init_quit_char_handler (); |
| @@ -9814,9 +9842,11 @@ mac_initialize () | |||
| 9814 | 9842 | ||
| 9815 | DisableMenuCommand (NULL, kHICommandQuit); | 9843 | DisableMenuCommand (NULL, kHICommandQuit); |
| 9816 | 9844 | ||
| 9845 | #ifdef MAC_OSX | ||
| 9817 | if (!inhibit_window_system) | 9846 | if (!inhibit_window_system) |
| 9818 | MakeMeTheFrontProcess (); | 9847 | MakeMeTheFrontProcess (); |
| 9819 | #endif | 9848 | #endif |
| 9849 | #endif | ||
| 9820 | UNBLOCK_INPUT; | 9850 | UNBLOCK_INPUT; |
| 9821 | } | 9851 | } |
| 9822 | 9852 | ||
diff --git a/src/macterm.h b/src/macterm.h index c1aa61e962b..42d79eb3577 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -604,10 +604,17 @@ extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); | |||
| 604 | extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, | 604 | extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, |
| 605 | int, int)); | 605 | int, int)); |
| 606 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); | 606 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); |
| 607 | extern OSErr install_window_handler P_ ((WindowPtr)); | ||
| 608 | extern void remove_window_handler P_ ((WindowPtr)); | ||
| 607 | 609 | ||
| 608 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 | 610 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 |
| 609 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 | 611 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 |
| 610 | 612 | ||
| 613 | /* Defined in mac.c. */ | ||
| 614 | |||
| 615 | extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); | ||
| 616 | extern OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); | ||
| 617 | extern void mac_clear_font_name_table P_ ((void)); | ||
| 611 | #if TARGET_API_MAC_CARBON | 618 | #if TARGET_API_MAC_CARBON |
| 612 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); | 619 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); |
| 613 | #endif | 620 | #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 5e17a7e3ca5..2b69e885954 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5083,11 +5083,12 @@ get_next_display_element (it) | |||
| 5083 | display. Then, set IT->dpvec to these glyphs. */ | 5083 | display. Then, set IT->dpvec to these glyphs. */ |
| 5084 | GLYPH g; | 5084 | GLYPH g; |
| 5085 | int ctl_len; | 5085 | int ctl_len; |
| 5086 | int face_id, lface_id; | 5086 | int face_id, lface_id = 0 ; |
| 5087 | GLYPH escape_glyph; | 5087 | GLYPH escape_glyph; |
| 5088 | 5088 | ||
| 5089 | if (it->c < 128 && it->ctl_arrow_p) | 5089 | if (it->c < 128 && it->ctl_arrow_p) |
| 5090 | { | 5090 | { |
| 5091 | g = '^'; /* default glyph for Control */ | ||
| 5091 | /* Set IT->ctl_chars[0] to the glyph for `^'. */ | 5092 | /* Set IT->ctl_chars[0] to the glyph for `^'. */ |
| 5092 | if (it->dp | 5093 | if (it->dp |
| 5093 | && INTEGERP (DISP_CTRL_GLYPH (it->dp)) | 5094 | && INTEGERP (DISP_CTRL_GLYPH (it->dp)) |
| @@ -5095,19 +5096,18 @@ get_next_display_element (it) | |||
| 5095 | { | 5096 | { |
| 5096 | g = XINT (DISP_CTRL_GLYPH (it->dp)); | 5097 | g = XINT (DISP_CTRL_GLYPH (it->dp)); |
| 5097 | lface_id = FAST_GLYPH_FACE (g); | 5098 | lface_id = FAST_GLYPH_FACE (g); |
| 5098 | if (lface_id) | 5099 | } |
| 5099 | { | 5100 | if (lface_id) |
| 5100 | g = FAST_GLYPH_CHAR (g); | 5101 | { |
| 5101 | face_id = merge_faces (it->f, Qt, lface_id, | 5102 | g = FAST_GLYPH_CHAR (g); |
| 5102 | it->face_id); | 5103 | face_id = merge_faces (it->f, Qt, lface_id, |
| 5103 | } | 5104 | it->face_id); |
| 5104 | } | 5105 | } |
| 5105 | else | 5106 | else |
| 5106 | { | 5107 | { |
| 5107 | /* Merge the escape-glyph face into the current face. */ | 5108 | /* Merge the escape-glyph face into the current face. */ |
| 5108 | face_id = merge_faces (it->f, Qescape_glyph, 0, | 5109 | face_id = merge_faces (it->f, Qescape_glyph, 0, |
| 5109 | it->face_id); | 5110 | it->face_id); |
| 5110 | g = '^'; | ||
| 5111 | } | 5111 | } |
| 5112 | 5112 | ||
| 5113 | XSETINT (it->ctl_chars[0], g); | 5113 | XSETINT (it->ctl_chars[0], g); |
| @@ -5117,25 +5117,25 @@ get_next_display_element (it) | |||
| 5117 | goto display_control; | 5117 | goto display_control; |
| 5118 | } | 5118 | } |
| 5119 | 5119 | ||
| 5120 | escape_glyph = '\\'; /* default for Octal display */ | ||
| 5120 | if (it->dp | 5121 | if (it->dp |
| 5121 | && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) | 5122 | && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) |
| 5122 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) | 5123 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) |
| 5123 | { | 5124 | { |
| 5124 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); | 5125 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); |
| 5125 | lface_id = FAST_GLYPH_FACE (escape_glyph); | 5126 | lface_id = FAST_GLYPH_FACE (escape_glyph); |
| 5126 | if (lface_id) | 5127 | } |
| 5127 | { | 5128 | if (lface_id) |
| 5128 | escape_glyph = FAST_GLYPH_CHAR (escape_glyph); | 5129 | { |
| 5129 | face_id = merge_faces (it->f, Qt, lface_id, | 5130 | escape_glyph = FAST_GLYPH_CHAR (escape_glyph); |
| 5130 | it->face_id); | 5131 | face_id = merge_faces (it->f, Qt, lface_id, |
| 5131 | } | 5132 | it->face_id); |
| 5132 | } | 5133 | } |
| 5133 | else | 5134 | else |
| 5134 | { | 5135 | { |
| 5135 | /* Merge the escape-glyph face into the current face. */ | 5136 | /* Merge the escape-glyph face into the current face. */ |
| 5136 | face_id = merge_faces (it->f, Qescape_glyph, 0, | 5137 | face_id = merge_faces (it->f, Qescape_glyph, 0, |
| 5137 | it->face_id); | 5138 | it->face_id); |
| 5138 | escape_glyph = '\\'; | ||
| 5139 | } | 5139 | } |
| 5140 | 5140 | ||
| 5141 | if (it->c == 0x8a0 || it->c == 0x8ad) | 5141 | if (it->c == 0x8a0 || it->c == 0x8ad) |
| @@ -12284,7 +12284,11 @@ redisplay_window (window, just_this_one_p) | |||
| 12284 | { | 12284 | { |
| 12285 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); | 12285 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); |
| 12286 | move_it_vertically_backward (&it, 0); | 12286 | move_it_vertically_backward (&it, 0); |
| 12287 | #if 0 | ||
| 12288 | /* I think this assert is bogus if buffer contains | ||
| 12289 | invisible text or images. KFS. */ | ||
| 12287 | xassert (IT_CHARPOS (it) <= PT); | 12290 | xassert (IT_CHARPOS (it) <= PT); |
| 12291 | #endif | ||
| 12288 | it.current_y = 0; | 12292 | it.current_y = 0; |
| 12289 | } | 12293 | } |
| 12290 | 12294 | ||