1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 03:20:39 -08:00
Commit graph

8002 commits

Author SHA1 Message Date
Richard M. Stallman
914894115d (Fcall_process): Set EOL conversion type to LF when
binary-process-output is non-nil.
(Fcall_process_region): binary-process-XXXput only determines EOL
conversion; if it is nil, convert LF <-> CRLF.  Don't bind
coding-system-for-read, it is done in Fcall_process.
1997-09-03 20:35:35 +00:00
Richard M. Stallman
d785cf9e4d (main): Call run_time_remap earlier, before any use of stdio. 1997-09-03 20:34:22 +00:00
Richard M. Stallman
6801b30063 (read_minibuf): Fix use of Ffboundp. 1997-09-03 16:20:47 +00:00
Geoff Voelker
f516a861b4 (my_endbss) [WINDOWSNT]: New variable. 1997-09-03 07:30:49 +00:00
Geoff Voelker
7f470effe9 (INTERRUPT_INPUT): Don't define.
(bcopy): Use memmove instead of memcpy.
(GAP_USE_BCOPY, BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE): Define.
Undef system calls before redefining.  Emulated calls redefined
to sys_*, real calls redefined to _*.
(DebPrint): Macro defined.

Use pragmas to place Emacs initialized data in
EMDATA segment, and Emacs uninitialized data in EMBSS segment.
1997-09-03 01:14:40 +00:00
Geoff Voelker
4a83117466 (have_menus_p): Move to w32fns.c. 1997-09-03 01:14:17 +00:00
Geoff Voelker
8694f11b54 (w32_output): New fields menubar_widget, menubar_active,
and pending_menu_activation.
(VERTICAL_SCROLL_BAR_*): Use proportional scroll bar variables.
(W32WindowPos): Delete definition.
(WM_EMACS_SETFOCUS, WND_*_INDEX): New macros.
(deferred_msg): New structure.

(WM_MOUSEWHEEL): Define if not already defined.
Necessary for pre VC5.0 distribution.
(WM_EMACS_TRACKPOPUPMENU): New Macro.
1997-09-03 01:13:25 +00:00
Geoff Voelker
689004fa09 (SIF_*): Win95 macros defined for NT.
(struct tagSCROLLINFO): Win95 struct defined for NT.
(vertical_scroll_bar_min_handle, vertical_scroll_bar_top_border,
vertical_scroll_bar_bottom_border, last_scroll_bar_drag_pos,
Vw32_gab_focus_on_raise, Vw32_capslock_is_shiftlock): New
variables.
(w32_frame_up_to_date): Block input.
(do_line_dance): Use DC while erasing, release at end.
(show_mouse_face): Use column and endcolumn calculated at start of
loop.
(my_create_scrollbar, my_show_window, my_set_window_pos,
my_set_focus) [! ATTACH_THREADS]: Send message to window instead
of invoking Windows procedure.
(x_scroll_bar_create, x_scroll_bar_move, x_scroll_bar_handle_click,
x_scroll_bar_report_motion): Use SCROLLINFO for proportional handle.
(x_scroll_bar_set_handle): Create proportional sized scroll handle.
(w32_set_vertical_scroll_bar): Size handle according to how much
is showing in window.
(x_scroll_bar_set_report_motion): Use top_range, calculated above.
(x_scroll_bar_clear): Hide scroll bar until ready to repaint.
(show_scroll_bars): Pass in frame to my_show_window.
(w32_read_socket): Distinguish between invisible and obscured frames
when handling PAINT messages.
Fixup off-by-one calculation for PAINT and SIZE.
Pass in new parameter to w32_kbd_mods_to_emacs.
Handle WM_DISPLAYCHANGE, WINDOWPOSCHANGED, ACTIVATE, SHOWWINDOW,
INITMENU, and ACTIVATEAPP messages.
Explicitly check for visibile and obscured frames, and to see if
any event should cause a redisplay.

(x_display_bar_cursor): Don't check whether frame is updating here.
(x_display_cursor): Check it here instead.
(x_set_offset) [HAVE_NTGUI]: Don't add border widths.
Set NOACTIVATE when setting window position.
(x_set_window_size): Fixup off-by-one calculation when setting
window position.  Mark frame garbaged earlier.  Clear mouse
highlighting state.
(x_focus_on_frame): Set focus by making frame the foreground window.
(x_raise_frame): Support frames to be raised without grabbing focus.
(x_lower_frame): Set NOACTIVATE flag when setting window position.
(x_make_frame_visible, x_make_frame_invisible): Pass in frame
to my_show_window.
to my_show_window.
(x_iconify_frame): Send a MINIMIZE message to the window.
(x_wm_set_size_hint): Set font width, line height, border,
and scroll bar indexes instead of X and Y unit indexes.

(w32_initialize): Set input mode.  Use w32_msg_worker instead
of windows_msg_worker.  Dynamically link proportional scroll bar
functions and intialize proportional scroll bar variables.
(syms_of_w32term): DEFVAR new variables.

(construct_mouse_wheel): New function.  Constructs an
input event from a WM_MOUSEWHEEL message.
(w32_read_socket): Handle WM_MOUSEWHEEL.

(w32_read_socket): Pass in new parameter to key_event.
Let key_event determine whether key is dead.
For MOVE, use x_real_positions to map to client coords.
(x_set_mouse_pixel_position): Offset to use client area as origin.
1997-09-03 01:07:37 +00:00
Geoff Voelker
b2fc9f3d6b Include w32heap.h.
(Vw32_start_process_share_console, Vw32_generate_fake_inodes,
Vw32_get_true_file_attributes, Qhigh, Qlow, process_dir):
New variables.
(find_child_console, set_process_dir, Fw32_short_file_name,
Fw32_long_file_name, Fw32_set_process_priority, Fw32_get_locale_info,
Fw32_get_current_locale_id, Fw32_get_default_local_id,
Fw32_set_current_locale): New functions.
(CORRECT_DIR_SEPS): New macro.
(create_child): Create a new console if subprocs don't share parent's.
(reap_subprocess): Don't check for dos subprocesses.
Add debug support.
(sys_wait): Ignore socket child_procs.
Check for quit while waiting.
(w32_executable_type): Renamed from w32_is_dos_binary.
Check for dos and Cygnus executables.
(sys_spawnve): Always use cmdproxy if spawning a dos app.
Use quotes to quote arguments for Cygnus apps, backslashes otherwise.
Handle escape characters.  Escape quotes at start and end, too.
(sys_select): Treat null timeout as infinite.
Add handles of child processes.
Loop over handles round robin to ensure fairness.
(sys_kill): Send ctrl-break and ctrl-c keystrokes to subprocesses
on SIGINT if not sharing consoles, otherwise generate ctrl-break event.
On other termination signals, send WM_QUIT message to Win95 apps
and WM_CLOSE to NT apps.
(syms_of_ntproc): Intern new symbols.  defsubr new functions.
DEFVAR new variables.
1997-09-03 01:05:33 +00:00
Geoff Voelker
014510b01f (init_menu_items): Disable code.
(x_activate_menubar): New function.
(initialize_frame_menubar): Pass in new param to set_frame_menubar.

(get_frame_menubar_event): Check for the possibility
of a menu-bar button.  A menu-bar button is a caption on the menu
bar with no submenu.

(set_frame_menubar): Correctly handle menu-bar buttons.
(add_menu_item): Equiv parameter send and paid attention to.
(keymap_panes, list_of_panes): Use CreatePopupMenu.
(single_keymap_panes): Use CreatePopupMenu.  Send key descriptions
to add_menu_item.
(list_of_items): Use CreatePopupMenu.  Send nil description to
add_menu_item.
(get_menu_event): Send keymap instead of menu to get_keymap_event.
(Fx_popup_menu): Extra parameter to mouse_position_hook.  Don't
send address of menu to win32menu_show.
(win32menu_show): Send message to call popup menu rather than
trying directly.  get_menu_event should take an address.
Call eat_mouse_events in order to get rid of any extraneous
mouse events.
(list_of_panes): Only bring up one pane if the length of the list
of panes is one.

(single_keymap_panes): Fixed problem with 'descrip'
lisp object not being protected properly (GCPRO).
(get_single_keymap_event): Fixed problem with 'descrip' lisp
object not being protected properly (GCPRO).
(name_is_separator): New function.
(list_of_panes): If a pane's name is empty ("") items are now
placed in the main popup instead of a blank-named submenu.  This
seems to be an undocumented feature of x-popup-menu.
(list_of_items): New argument HMENU.
Use 1 and 0 instead of Qt and Qnil for enable in add_menu_item
1997-09-03 00:53:34 +00:00
Geoff Voelker
59131421e9 Declare externs from other files.
(w32_kbd_mods_to_emacs): New parameter KEY.
Use w32-capslock-is-shiftlock for old behavior.
(key_event): Pass in new parameter to w32_kbd_mods_to_emacs.
(key_event): New parameter isdead. Set isdead if the
key press was done using a dead key.
1997-09-03 00:52:40 +00:00
Geoff Voelker
3443b04a09 Enumerate operating system types.
Declare extern data and functions.
Move file_data struct definition here.
(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_PTR): New macros.
1997-09-03 00:52:12 +00:00
Geoff Voelker
801f68b995 (os_subtype): New variable.
(cache_system_info): Set os_subtype.
(recreate_heap): Update system information after loading heap.
Don't use data_seg pragma here.
(_heap_init, _heap_term) [_MSC_VER >= 1000]: New functions that
override CRT routines.
1997-09-03 00:51:32 +00:00
Geoff Voelker
1edf84e751 Include limits.h and errno.h.
Declare externs from other files.
(w32_in_use): New variable.
(check_w32, have_menus_p, x_set_title, w32_msg_worker,
find_deferred_msg, send_deferred_msg, complete_deferred_msg,
Fw32_focus_frame, W32-send-sys-command): New functions.
(last_mouse_movement_time): Delete variable.

(x_frame_parms): Alphabetize.  Add title parm.
(x_set_icon_name): Use title if set.
(x_set_menu_bar_lines): Ensure client area remains the same.
(x_set_name): Don't update if the name is the same.
Use title for name if available.
(x_icon): Initial support for creating window iconified.
(x_display_info_for_name): Set w32_in_use.
(Fx_open_connection): Validate Vwindow_system.  Set w32_in_use.

(w32_create_window): Set window size to frame dimensions.
Set font width, line height, border, scrollbar indexes.
Don't set X and Y units indexes.
(w32_msg_pump): Renamed from windows_msg_worker.
Make static.  Don't post done message. No longer handle
create scrollbar message.  Don't abort on anomalous messages.
Return when completion detected.
(w32_wnd_proc): Keep track of button state.
For WINDOWPOSCHANGING, force window dimensions to be multiples
of character dimensions.
Handle CREATESCROLLBAR.
Use correct arguments for SHOWWINDOW.
For SETWINDOWPOS, use WINDOWPOS structure.

(my_create_window): Abort if message post fails.
(Fx_create_frame): Use title instead of name.
GC protect frame before make_frame_without_minibuffer.
Set icon name.
Use courier new as default font (has bold and italic).
Set BufferPredicate and Title default parameters.

(x_to_w32_weight): Support semibold weight.
(x_to_w32_charset): Map # to numeric charset identifier.
(w32_to_x_charset): Encode unknown charsets as a number.
(enum_font_cb2): Don't restrict to ANSI and OEM charsets.

(Fx_color_values): Set high and low words of color values.

(syms_of_w32fns): Zero w32_in_use.  defsubr new functions.

(w32_wnd_proc): Pass on WM_DISPLAYCHANGE messages.

(win32_wnd_proc): Capture and handle WM_MOUSEWHEEL events.
Capture and handle WM_EMACS_TRACKPOPUPMENU events.
Allow a dragged selection from a popup menu started up
by a mouse down event.
(x_to_win32_color): Support for X Windows RGB string specifications.
1997-09-03 00:47:47 +00:00
Geoff Voelker
3e671d90ba (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
(keyboard_init_hook): Delete variable.
(prev_console_cursor) [! USE_SEPARATE_SCREEN]: New variable.
(reset_terminal_modes) [! USE_SEPARATE_SCREEN]: Reset cursor info.
(initialize_w32_display) [USE_SEPARATE_SCREEN]: Create separate
screen buffer.
(ctrl_c_handler): Only ignore interrupts when interactive.
(set_terminal_modes): Set input mode.
(initialize_w32_display): Record original settings.
Don't reset cursor or clear frame.
1997-09-03 00:46:41 +00:00
Geoff Voelker
bb06745dc7 Remove debugging macros.
(child_process): Remove is_dos_process field, add hwnd handle field.
(FILE_LAST_CR): New macro.
(w32_get_long_filename): Declare extern.
1997-09-03 00:46:21 +00:00
Geoff Voelker
76b3903d85 Include stddef.h.
(getwd): Delete macro.
(startup_dir): New variable.
(getwd): Return directory in which Emacs started.
(init_user_info): Set SHELL environment variable if not set.
(parse_root, get_long_basename, w32_get_long_filename): New functions.
(init_environment): Look for CMDPROXY.
Make sure that PATH and COMSPEC are capitalized in the environment.
Record startup directory.
(get_emacs_configuration, sys_rename): Use OS_WIN95.
(map_w32_filename): Calculate returned string correctly.

(sys_fopen): Use _fdopen.
(sys_link): Support NTFS links.
(sys_rename): Use a long file name for temporary name.
(sys_pipe): Make pipes binary and non-inheritable.
(sys_read, sys_write): Spoof text mode translation for pipes
and sockets.

(hashval): Simplify.
(generate_inode_val): Use long file name version of file.

(stat): Optimize by using active readdir info.
Set fake_inode to 0 for directories.
Set fake_inode to xor of file indexes for files.
Don't use generate_inode_val to set inode value.

(volume_info_data): Renamed from volume_info.
(volume_info, fixed_drives, volume_cache): New variables.
(DRIVE_INDEX, VOLINFO_STILL_VALID): New macros.
(lookup_volume_info, add_volume_info, GetCachedVolumeInformation):
New functions.
(get_volume_info): Use volume_info_data.
Use GetCachedVolumeInformation.

(init_ntproc): No longer restrict to one DOS subprocess.
Use CRT _open and _fdopen.
Cache fixed drive information.
1997-09-03 00:43:20 +00:00
Geoff Voelker
43640c4dfe Include config.h and time.h.
Declare extern data and functions.
(file_data): Move definition from w32heap.c.
(_start): Add debug hook for when profiling.
Spoof executable name when using profilers.
Invoke sbrk immediately when undumped.
(unexec): Print error messages when input and output dump files
cannot be opened.
Reset header checksum.
(open_input_file, open_output_file): Return status instead of aborting.
(get_section_size): Handle different linkers.
(find_section, rva_to_section): New functions.
(get_section_info) [SEPARATE_BSS_SECTION]: Make code for using
a separate .bss section conditional.
Use my_begbss and my_endbss to determine .bss size by default.
Look for Emacs data in EMDATA section.
1997-09-03 00:42:10 +00:00
Geoff Voelker
17fa2f54c0 makefile.nt (TLIB0, TOBJ, OBJ0): New macro.
(LINK_FLAGS): Separate debugging info from the executable.
(LIBS): Include TLIB0.
(TEMACS): Link with TLIB0.
(EMACS): Copy temacs map file to emacs map file.
Update file dependencies.
1997-09-03 00:41:32 +00:00
Geoff Voelker
f21ef775e2 (redisplay_internal): Check to see if frame is not obscured
as well as visible.
1997-09-03 00:37:40 +00:00
Geoff Voelker
ab8f100801 (event_kind) [WINDOWSNT]: New event type: mouse_wheel. 1997-09-03 00:37:29 +00:00
Geoff Voelker
ad00c243fd (sys_subshell) [DOS_NT]: Save and restore parent's
working directory.
(sys_subshell) [WINDOWSNT]: Share MSDOS code. Don't take console.
(init_sys_modes, reset_sys_modes) [WINDOWSNT]: Do it even with
a read_socket_hook.
1997-09-03 00:37:00 +00:00
Geoff Voelker
084cd81029 Declare discard_mouse_events. 1997-09-03 00:36:38 +00:00
Geoff Voelker
07de30b9de (kbd_buffer_get_event) [WINDOWSNT]: Support
menu_bar_activate_event.
(set-input-mode) [DOS_NT]: Do not invoke reset and init sys modes.
(Qmouse_wheel) [WINDOWSNT]: New variable.
(discard_mouse_events): New function.
(mouse_wheel_syms) [WINDOWSNT]: New variable.
(lispy_mouse_wheel_names) [WINDOWSNT]: New variable.
(make_lispy_event) [WINDOWSNT]: Make mouse-wheel events.
(syms_of_keyboard) [WINDOWSNT]: Define Qmouse_wheel and
mouse_wheel_syms.
1997-09-03 00:31:17 +00:00
Geoff Voelker
0969b893b0 (FRAME_OBSCURED_P): New macro.
(FRAME_SAMPLE_VISIBILITY): Distinguish between invisible and obscured.
1997-09-03 00:30:51 +00:00
Geoff Voelker
bb1ff1f449 (Fexpand_file_name) [WINDOWSNT]: When stripping
drive letter, be careful not to create a UNC filename.
(Fadd_name_to_file) [WINDOWSNT]: Remove conditional.
1997-09-03 00:30:24 +00:00
Richard M. Stallman
f1651811d8 Minor reordering of macros. 1997-09-02 20:56:22 +00:00
Richard M. Stallman
5d648571be (detect_coding_mask): Add in CODING_CATEGORY_MASK_RAW_TEXT
in the detect_coding_iso2022 case.
1997-09-02 20:56:02 +00:00
Richard M. Stallman
c8c1552149 (Fread_from_minibuffer, Fread_string): Doc fixes.
(Fread_no_blanks_input, Fcompleting_read): Doc fixes.
1997-09-02 05:22:07 +00:00
Richard M. Stallman
e6bab6e43c Comment change. 1997-09-02 05:05:37 +00:00
Richard M. Stallman
3e4a18035d Include unistd.h instead of libc.h. 1997-09-02 04:59:45 +00:00
Richard M. Stallman
4caa74487c (syms_of_window): Doc fix. 1997-09-02 00:15:04 +00:00
Richard M. Stallman
1cd5fe6a3a (free_float, free_cons): Don't use the same field for chaining as for marking.
(make_float, Fcons, gc_sweep): Corresponding changes.
1997-09-01 23:37:14 +00:00
Richard M. Stallman
d062cf3305 (Finsert_file_contents): Fix previous change--don't
call Fboundp on Vset_auto_coding_function, just check non-nil.
1997-09-01 22:43:29 +00:00
Richard M. Stallman
cfcbf459e1 (describe_category): Handle a sub-chartable. 1997-09-01 17:54:37 +00:00
Richard M. Stallman
37c0ed09e7 (internal_self_insert): Only set TARGET_CLM when C2 is tab.
When multibyte characters are disabled,
use 1 as the width of the inserted character.
1997-09-01 17:54:25 +00:00
Kenichi Handa
5c6257e54f (LEADING_CODE_PRIVATE_22): Comment fixed. 1997-09-01 07:15:46 +00:00
Kenichi Handa
e9c509cd76 (read_process_output): Index for
proc_encode_coding_system should be p->outfd (not `channel' which
is p->infd).
1997-09-01 07:15:46 +00:00
Kenichi Handa
0414b39470 (Vset_auto_coding_function): Name changed from
Vauto_file_coding_system.
(syms_of_fileio): Adjusted for the above change.  Doc-string
modified.
(Finsert_file_contents): The argument for Vset_auto_coding is a
concatination of the heading 1K-byte and the tailing 3K-byte.
1997-09-01 07:15:46 +00:00
Richard M. Stallman
0b93aa5389 (init_system_name): Don't try to use getdomainname. 1997-08-31 18:03:03 +00:00
Richard M. Stallman
e523f7e526 (change_frame_size_1): Save current buffer
around calling Fset_window_buffer.
1997-08-30 17:51:22 +00:00
Richard M. Stallman
7b88a4cfec (Fload): Fix doc syntax. 1997-08-30 16:20:02 +00:00
Richard M. Stallman
48de5f13b5 (HAVE_ALLOCA): Do define this, if SOLARIS2. 1997-08-30 07:18:39 +00:00
Richard M. Stallman
a45bad2a88 (free_frame_menubar): Clear menubar_height field. 1997-08-30 07:15:19 +00:00
Richard M. Stallman
211f7dcdee (Fload): If FILE arg ends in .el or .elc, don't insist on adding a suffix. 1997-08-29 19:53:25 +00:00
Richard M. Stallman
5c5631cf9b (free_marker): Call unchain_marker. 1997-08-29 19:52:57 +00:00
Kenichi Handa
992f23f203 (detect_eol): Do not select no-conversion even if EOL
format of raw-text file is inconsistent.  Just read it by
raw-text-unix.
(Fdetect_coding_region): Do not select no-conversion even if EOL
format of raw-text file is inconsistent.
1997-08-28 10:54:13 +00:00
Kenichi Handa
27901516b6 (Qno_conversion, Qundecided): New variables.
(syms_of_coding): Initialize and staticpro them.
(coding_category_name): Include "coding-category-raw-test".
(setup_coding_system): Handle coding_type_raw_text.
(detect_coding_mask): Include CODING_CATEGORY_MASK_RAW_TEXT in the
return value instead of CODING_CATEGORY_MASK_BINARY.
(detect_coding): Do not check the case that `mask' is 0, which
never happens now.
(detect_eol_type): If EOL format is inconsistent, return
CODING_EOL_INCONSISTENT.
(detect_eol): If EOL format of raw-text file is inconsistent,
detect it as no-conversion.
(decode_coding): Handle coding_type_raw_text.
(encode_coding): Likewise.
(Fdetect_coding_region): Ajusted for the above changes.
(shrink_conversion_area): Handle coding_type_raw_text.
1997-08-28 10:51:12 +00:00
Kenichi Handa
e80de6b18f (coding_type): New member coding_type_raw_text.
(CODING_EOL_INCONSISTENT): New macro.
(CODING_REQUIRE_NO_CONVERSION): Check also coding_type_raw_text.
(CODING_MAY_REQUIRE_NO_CONVERSION): Likewise.
(CODING_CATEGORY_IDX_RAW_TEXT): New macro.
(CODING_CATEGORY_MASK_RAW_TEXT): New macro.
1997-08-28 10:51:12 +00:00
Eli Zaretskii
0e5c5ac0f8 Add coding: tag, to prevent Emacs from interpreting binary strings. 1997-08-28 09:30:01 +00:00