1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

119 Commits

Author SHA1 Message Date
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Paul Eggert
fee0bd5f32 Use URLs, not Boston addresses, in copyright notices. 2012-12-31 07:34:32 -08:00
Paul Eggert
620f13b061 Use ASCII tests for character types.
* admin/merge-gnulib (GNULIB_MODULES): Add c-ctype.
* lwlib/lwlib-Xaw.c, lwlib/lwlib.c, lwlib/xlwmenu.c:
Don't include <ctype.h>; no longer needed.
* lwlib/lwlib-Xaw.c (openFont):
* lwlib/xlwmenu.c (openXftFont): Test just for ASCII digits.
* src/category.c, src/dispnew.c, src/doprnt.c, src/editfns.c, src/syntax.c
* src/term.c, src/xfns.c, src/xterm.c:
Don't include <ctype.h>; was not needed.
* src/charset.c, src/doc.c, src/fileio.c, src/font.c, src/frame.c:
* src/gtkutil.c, src/image.c, src/sysdep.c, src/xfaces.c:
Include <c-ctype.h> instead of <ctype.h>.
* src/nsterm.m: Include <c-ctype.h>.
* src/charset.c (read_hex):
* src/doc.c (Fsnarf_documentation):
* src/fileio.c (IS_DRIVE) [WINDOWSNT]:
(DRIVE_LETTER) [DOS_NT]:
(Ffile_name_directory, Fexpand_file_name)
(Fsubstitute_in_file_name):
* src/font.c (font_parse_xlfd, font_parse_fcname):
* src/frame.c (x_set_font_backend):
* src/gtkutil.c (xg_get_font):
* src/image.c (xbm_scan, xpm_scan, pbm_scan_number):
* src/nsimage.m (hexchar):
* src/nsterm.m (ns_xlfd_to_fontname):
* src/sysdep.c (system_process_attributes):
* src/xfaces.c (hash_string_case_insensitive):
Use C-locale tests instead of locale-specific tests for character
types, since we want the ASCII interpretation here, not the
interpretation suitable for whatever happens to be the current locale.
2012-08-16 14:58:44 -07:00
Paul Eggert
cf38a720e8 Clean out last vestiges of the old HAVE_CONFIG_H stuff. 2012-06-25 18:05:39 -07:00
Paul Eggert
845ca89390 Switch from NO_RETURN to C11's _Noreturn.
Fixes: debbugs:11750
2012-06-24 10:39:14 -07:00
Paul Eggert
ba93a18774 Remove obsolete '#define static' cruft.
* etc/PROBLEMS: Remove obsolete '#define static' cruft.
* lwlib/xlwmenu.c [emacs]: Include "bitmaps/gray.xbm".
(gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]:
Remove; all uses replaced with definiens.
* src/s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
This #undef was "temporary" in 2000; it is no longer needed
now that '#define static' has gone away.
* src/xfns.c, src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits): Remove; no longer needed.
All uses replaced with definiens.
* src/xterm.c: Include "bitmaps/gray.xbm".
2012-05-30 22:08:37 -07:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
40ba43b4b7 Spelling fixes. 2011-11-19 23:30:16 -08:00
Paul Eggert
3ed8598c49 Spelling fixes. 2011-11-18 00:31:02 -08:00
Dmitry Antipov
81d40c9208 Use xfree, not free, to avoid crash with --enable-checking=xmallocoverrun. 2011-10-13 07:55:46 -07:00
Paul Eggert
1fbb460913 * xlwmenu.c (MINL): Define only if not emacs. 2011-04-15 18:38:14 -07:00
Paul Eggert
5b7d36d143 * xlwmenu.c (XlwMenuSetValues): Rename/ move locals to avoid shadowing. 2011-04-15 18:36:46 -07:00
Jan Djärv
3928f2b67e Use *font for Xft font names for Lucid menus and dialogs.
* doc/emacs/xresources.texi (X Resources): Remove *faceName and replace it with
*font for Lucid.

* lwlib/lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts.  Try
XLoadQueryFont first and then Xft fonts.

* lwlib/xlwmenu.c (xlwmenu_default_font): Remove, does not work for
multi-display.
(xlwMenuResources): Remove XtNfaceName and XtNdefaultFace.
Make XtNFont a String resource.
(make_windows_if_needed): Call XFlush so later changes are seen by the
X server.
(remap_menubar): Use XtMoveWidget and then
XtResizeWidget/XtResizeWindow after XtPopup.  Works better with
Compiz.
(make_drawing_gcs): Check if mw->menu.font is set.
(getDefaultXftFont): New function.
(openXftFont): faceName is now fontName.  Try XLoadQueryFont first
and then XftFontOpenName.
(XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont.
(XlwMenuClassInitialize): Remove initialization of
xlwmenu_default_font.
(fontname_changed): Renamed from facename_changed.
(XlwMenuSetValues): Use facename_changed.

* lwlib/xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace.

* lwlib/xlwmenuP.h (_XlwMenu_part): Remove faceName.  Add fontName.

* src/xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font.
(apply_systemfont_to_menu): Set resources *menubar*font and
*popup*font.  Remove defflt.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu before lw_create_widget.

* src/xrdb.c (x_load_resources): For LUCID and XFT, don't put a
resource that specifies helvetica for menus and dialogs.
2011-02-14 18:21:10 +01:00
Glenn Morris
67f02b82f4 lwlib/ trivia.
* lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c, xlwmenu.c:
Standardize on <> for includes from the ../src directory.
2011-02-09 21:03:29 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Dan Nicolaescu
b27f3b2f52 * lwlib/xlwmenu.c (abort_gracefully): Mark as NO_RETURN. 2010-07-28 21:16:23 -07:00
Jan D
c825c0b647 Change function definition from K&R to prototype. Fix prototype warnings.
* lwlib-Xaw.c (xaw_generic_callback, command_reset)
(xaw_update_one_value): Reformat.
(xaw_update_one_widget): Reformat and remove dead code.
(xaw_scrollbar_scroll, xaw_scrollbar_jump, xaw_create_scrollbar)
(xaw_update_scrollbar): Remove (not used).
(make_dialog): Change from K&R to prototype. Remove dead code.
(xaw_creation_table): Remove scrollbar entry.

* lwlib-Xlw.c (x_print_complete_resource_name): Change from K&R to
prototype.
(xlw_update_one_value): Reformat.

* lwlib-Xm.c (x_print_complete_resource_name)
(make_destroyed_instance, free_destroyed_instance, first_child)
(lw_motif_widget_p, resource_motif_string, destroy_all_children)
(xm_arm_callback, xm_update_label, xm_update_list)
(xm_update_pushbutton, xm_update_cascadebutton)
(xm_update_toggle, xm_update_radiobox, make_menu_in_widget)
(update_one_menu_entry, xm_update_menu, xm_update_text)
(xm_update_text_field, xm_update_one_widget)
(xm_update_one_value, activate_button, dialog_key_cb)
(make_dialog, mark_dead_instance_destroyed)
(find_matching_instance, recenter_widget, recycle_instance)
(xm_create_dialog, make_menubar, remove_grabs, make_popup_menu)
(make_main, xm_destroy_instance, xm_popup_menu)
(set_min_dialog_size, xm_pop_instance, do_call)
(xm_internal_update_other_instances, xm_generic_callback)
(xm_nosel_callback, xm_pull_down_callback, xm_pop_down_callback)
(xm_set_keyboard_focus, xm_set_main_areas, xm_manage_resizing): Change
from K&R to prototype.

* lwlib-int.h (widget_creation_function): Fix prototype.

* lwlib.c (allocate_widget_info, lw_register_widget): Change from K&R
to prototype.
(lw_internal_update_other_instances, merge_widget_value): Reformat.

* xlwmenu.c (size_menu_item): Change from K&R to prototype.
Change label_width and height to int.
(draw_arrow, draw_shadow_rectangle, draw_shadow_rhombus)
(draw_separator, display_menu, fit_to_screen, motion_event_is_in_menu)
(map_event_to_widget_value): Reformat.
(display_menu_item): Change from K&R to prototype.
2010-07-08 12:29:51 +02:00
Andreas Schwab
72af86bd8c Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.

* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.

* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.

* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.

* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.

* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.

* configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
Jan D
e4c8d29a32 Fix some bad prototypes and formatting after conversion from K&R declaration.
* lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit.
(fill_xft_data, set_text): Remove unused variable screen.
(draw_text): Cast bp to FcChar8*.
(find_xft_data): Return 0 if inst or xft_data is not set.
(wm_delete_window): Correct prototype.  Initialize widget to 0
and return if widget is still 0 after loop.

* lwlib/xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
(display_menu_item): Remove unused variable gi.
(make_windows_if_needed): Remove unused variable screen.
(XlwMenuRedisplay): Remove unused variable i.

* src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
(xg_get_image_for_pixmap, create_dialog)
(xg_get_file_with_selection, xg_get_file_name, update_cl_data)
(menuitem_highlight_callback, make_menu_item)
(xg_create_one_menuitem, create_menus, xg_update_menu_item)
(xg_create_scroll_bar, xg_update_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
(xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
(xg_tool_bar_item_expose_callback): Reformat prototype.
(xg_update_menubar): GList *group => GSList *group.
(xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
before use.
(update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
to GTK_IMAGE (wimage).

* src/xsettings.c (something_changedCB, parse_settings)
(apply_xft_settings): Reformat prototype.
(something_changedCB, init_gconf): Remove unused variable i.
(read_settings): Remove unused variable long_len.

* src/xsmfns.c (SSDATA): New macro.
(smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
passed to strlen/strcpy/strcat.
(create_client_leader_window): Surround with #ifndef USE_GTK.  Cast
7:th arg to XChangeProperty to (unsigned char *)
2010-07-05 11:17:12 +02:00
Dan Nicolaescu
c3174d16e2 Convert function definitions in lwlib files to standard C.
* lwlib/lwlib-Xaw.c: Convert function definitions to standard C.
* lwlib/lwlib-Xlw.c:
* lwlib/lwlib-utils.c:
* lwlib/lwlib.c:
* lwlib/lwlib.h:
* lwlib/xlwmenu.c: Likewise.
2010-07-03 22:47:55 -07:00
Jan D
f57e2426f0 Remove __P and P_ from .c and .m files and definition of P_
* lisp.h:
* atimer.h: Remove define for P_.

* alloc.c: Remove __P and P_ from .c and .m files.
* atimer.c:
* buffer.c:
* callint.c:
* category.c:
* charset.c:
* chartab.c:
* cm.c:
* coding.c:
* composite.c:
* data.c:
* dired.c:
* dispnew.c:
* doc.c:
* editfns.c:
* emacs.c:
* eval.c:
* fileio.c:
* filelock.c:
* fns.c:
* font.c:
* fontset.c:
* frame.c:
* ftfont.c:
* ftxfont.c:
* gmalloc.c:
* gtkutil.c:
* image.c:
* indent.c:
* intervals.c:
* keyboard.c:
* keymap.c:
* lread.c:
* marker.c:
* menu.c:
* minibuf.c:
* print.c:
* process.c:
* scroll.c:
* search.c:
* sound.c:
* strftime.c:
* syntax.c:
* sysdep.c:
* term.c:
* terminal.c:
* textprop.c:
* unexalpha.c:
* w32console.c:
* w32fns.c:
* w32font.c:
* w32menu.c:
* w32term.c:
* w32uniscribe.c:
* window.c:
* xdisp.c:
* xfaces.c:
* xfns.c:
* xfont.c:
* xftfont.c:
* xmenu.c:
* xselect.c:
* xterm.c: Likewise.

* ebrowse.c: Remove P_ and __P.
* etags.c:
* movemail.c:
* pop.c:
* update-game-score.c: Likewise.
2010-07-02 14:19:53 +02:00
Jan D
3c9a9730ea xlwmenu.c (XlwMenuDestroy): Remove XtDestroyWidget on subwidgets (Bug #6127). 2010-05-08 17:32:51 +02:00
Jan Djärv
c632dfda11 Declarations before code (Bug#5993).
* data.c (make_blv): Declarations before code (Bug#5993).

* xlwmenu.c (expose_cb):
* lwlib-Xaw.c (fill_xft_data): Declarations before code (Bug#5993).
2010-04-21 18:13:55 +02:00
Jan Djärv
7aad87e884 Set _NET_WM_WINDOW_TYPE in menus. Looks bad with compiz otherwise.
xlwmenu.c (set_window_type): New function.
(make_windows_if_needed, XlwMenuRealize): Call set_window_type.
2010-04-17 20:18:12 +02:00
Jan D
f0bd159891 Don't redraw lucid menus more than needed. Use double buffer to reduce flicker.
* xlwmenu.c: Include Shell.h, remove duplicate declaration of
XlwMenuRedisplay.
(display_menu_item): Replace ws->window with ws->pixmap, remove
call to XftDrawRect.
(display_menu): Remove this and that argument.  Remove
just_compute_this_one_p. Fill pixmap at start and copy it to window
at end.
(expose_cb): New function.
(make_windows_if_needed): Replace XCreateWindow with XtCreatePopup.
Add eventhandler for expose to expose_cb.  Remove creation of
xft_draw.
(create_pixmap_for_menu): New function.
(remap_menubar): Pop down menus that aren't the same as in old_stack.
Set width, heigh, x, y on widget with XtVaSetValues.  Call
create_pixmap_for_menu.
Replace XUnmapWindow with XtPopdown.
Remowe two last parameters to display_menu.
(map_event_to_widget_value, XlwMenuRedisplay, Key, Select)
(pop_up_menu): Remowe two last parameters to display_menu.
(XlwMenuRealize): Call create_pixmap_for_menu, set w and pixmap.
Remove call to XftDrawCreate.
(XlwMenuDestroy): Free pixmap.  Call XtDestroyWidget instead of
XDestroyWindow.
(handle_motion_event): Only call handle_single_motion_event once.

* xlwmenuP.h (window_state): Add pixmap and w.
2010-04-17 19:43:03 +02:00
YAMAMOTO Mitsuharu
b117f7cc49 xlwmenu.c (facename_changed): Put function in #ifdef HAVE_XFT. 2010-04-16 10:08:29 +09:00
Jan Djärv
99852628a8 Lucid menus can now use Xft for fonts.
* xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
(parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
in current_font.
(init_gconf): Read value of SYSTEM_FONT and save it in current_font.
(Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
functions.
(syms_of_xsettings): Initialize current_font. defsubr
Sfont_get_system_normal_font.

* xsettings.h (Ffont_get_system_normal_font,
xsettings_get_system_normal_font): Declare.

* xfns.c (extern xlwmenu_default_font): Remove.
(Fx_create_frame): Remove setting of xlwmenu_default_font, moved
to xlwmenu.c.

* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.

* xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu.

* xlwmenu.c (xlwmenu_default_font): Make static.
(xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
(string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
HAVE_XFT.
(size_menu): Set max_rest_width in window_state structure.
(display_menu_item): If HAVE_XFT and xft_draw is set, use
XftDrawRect and XftDrawStringUtf8 to draw text.
(make_windows_if_needed): Set max_rest_width and xft_draw
in windows[i].
(openXftFont): New.
(XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
is not set, load font fixed and save it in xlwmenu_default_font.
(XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
(XlwMenuClassInitialize): Initialize xlwmenu_default_font.
(XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
windows[0].xft_draw if xft_font is set.
(XlwMenuDestroy): Destroy all xft_draw and close xft_font.
(facename_changed): New.
(XlwMenuSetValues): Call facename_changed. If face name did change,
close old fonts and destroy xft_draw:s.  Then create new ones.

* xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
XtCDefaultFace): New.

* xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
(_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
xft_font.

* xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
2010-04-08 18:20:32 +02:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.

* image.c: Move png.h #include earlier to avoid warnings.

* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h.  (Bug#4643)

* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Glenn Morris
f5d0ac07d6 Add 2009 to copyright years. 2009-01-08 03:38:51 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
b9b14d130b Add 2008 to copyright years. 2008-01-07 08:31:52 +00:00
Glenn Morris
5abfd5d946 (XlwMenuRealize): Remove unused integer `count'. 2007-08-26 00:22:57 +00:00
Karoly Lorentey
81088e260b Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-650
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-651
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-652
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-653
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-654
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-655
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-656
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-657
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-658
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-659
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-203
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-204
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-205
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-599
2007-04-22 11:42:03 +00:00
Glenn Morris
2aa86c0fec Revert previous change, since not sure it was correct. 2007-02-28 04:25:21 +00:00
Glenn Morris
500f276a8e Despite initial RCS check-in in 1994 being under GPLv2 later, lwlib
was released under v1 or later.
2007-02-28 04:02:01 +00:00
Glenn Morris
81e32ca354 Adjust FSF copyright years based on changelogs. 2007-02-27 03:09:41 +00:00
Karoly Lorentey
93afd0f1d4 Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-599
   Merge from erc--main--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-600
   Merge from erc--main--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-601
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-602
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-603
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-604
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-605
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-606
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-607
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-608
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-609
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-610
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-611
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-612
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-613
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-614
   Make byte compiler correctly write circular constants

 * emacs@sv.gnu.org/emacs--devo--0--patch-615
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-616
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-617
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-618
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-192
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-193
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-194
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-195
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-196
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-594
2007-01-29 22:21:19 +00:00
Glenn Morris
4e6835dbc4 Add 2007 to copyright years. 2007-01-21 04:57:37 +00:00
Karoly Lorentey
191ae1cf7c Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-585
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-586
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-587
   Update from erc--emacs--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-588
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-589
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-590
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-591
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-592
2007-01-06 15:25:16 +00:00
Jan Djärv
1ecd508641 (xlwMenuResources): Add XtNleaveCallback, XtNenterCallback.
(display_menu, map_event_to_widget_value): Generate enter and
leave callbacks.
(pop_up_menu): Initialize mw->menu.inside_entry.
2007-01-01 15:20:11 +00:00
Karoly Lorentey
16b555334a Fix compilation error in lwlib/xlwmenu.c.
* lwlib/xlwmenu.c (XlwMenuRealize): Fix x_catch_errors and
  x_uncatch_errors invocation.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-568
2006-05-24 12:14:26 +00:00
Karoly Lorentey
40a1b46245 Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-289
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-290
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-291
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-292
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-293
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-567
2006-05-24 09:13:31 +00:00
Jan Djärv
1f5df1f783 * xlwmenu.c: Include xterm.h if emacs instead of declaring functions
used.
 (string_width): Declare as static.
 (Start, pop_up_menu): Set is_hint to 0 before calling
 handle_motion_event.
 (pop_up_menu): Return value and parameters for x_catch_errors and
 x_uncatch_errors changed.
2006-05-23 07:19:45 +00:00
Karoly Lorentey
a5805c9d02 Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-41
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-42
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-43
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-44
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-45
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-46
   Merge from erc--emacs--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-47
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-48
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-14
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-15
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-16
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-17
   Merge from emacs--devo--0

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-507
2006-02-06 18:44:57 +00:00
Thien-Thi Nguyen
5b0d63bc36 Update years in copyright notice; nfc. 2006-02-05 23:44:47 +00:00
Karoly Lorentey
2dfa0facd9 Install workaround for "X protocol error: BadCursor (invalid Cursor parameter) on protocol request 2"
* lwlib/xlwmenu.c (XlwMenuRealize): Ignore X errors while setting up
  cursor shape.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-483
2006-01-02 07:43:46 +00:00