Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101011. ------------------------------------------------------------ revno: 101011 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-08-07 03:10:12 +0200 message: Remove duplicate declarations. * lib-src/ebrowse.c (usage, version, mark_virtual) * src/alloc.c (lisp_malloc) * src/buffer.c (set_buffer_internal, set_buffer_internal_1) * src/charset.h (emacs_mule_charset) * src/dispextern.h (inhibit_free_realized_faces, redraw_frame) (redraw_garbaged_frames, scroll_cost, update_frame, scrolling) (bitch_at_user) * src/lisp.h (Fcheck_coding_system, Fget_text_property) (Qfunction, Qcompletion_ignore_case, QCwidth, QCsize) diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-08-06 04:09:54 +0000 +++ lib-src/ChangeLog 2010-08-07 01:10:12 +0000 @@ -1,3 +1,8 @@ +2010-08-07 Juanma Barranquero + + * ebrowse.c (usage, version, mark_virtual): + Remove duplicate declarations. + 2010-08-06 Dan Nicolaescu * emacsclient.c: Move socket related #includes together with the === modified file 'lib-src/ebrowse.c' --- lib-src/ebrowse.c 2010-07-08 05:48:57 +0000 +++ lib-src/ebrowse.c 2010-08-07 01:10:12 +0000 @@ -492,8 +492,6 @@ void insert_keyword (char *, int); void re_init_scanner (void); void init_scanner (void); -void usage (int); -void version (void); void process_file (char *); void add_search_path (char *); FILE *open_file (char *); @@ -504,7 +502,6 @@ struct member *find_member (struct sym *, char *, int, int, unsigned); struct member *add_member (struct sym *, char *, int, int, unsigned); void mark_virtual (struct sym *); -void mark_virtual (struct sym *); struct sym *make_namespace (char *, struct sym *); char *sym_scope (struct sym *); char *sym_scope_1 (struct sym *); === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 20:08:26 +0000 +++ src/ChangeLog 2010-08-07 01:10:12 +0000 @@ -1,3 +1,15 @@ +2010-08-07 Juanma Barranquero + + * alloc.c (lisp_malloc): + * buffer.c (set_buffer_internal, set_buffer_internal_1): + * charset.h (emacs_mule_charset): + * dispextern.h (inhibit_free_realized_faces, redraw_frame) + (redraw_garbaged_frames, scroll_cost, update_frame, scrolling) + (bitch_at_user): + * lisp.h (Fcheck_coding_system, Fget_text_property) + (Qfunction, Qcompletion_ignore_case, QCwidth, QCsize): + Remove duplicate declarations. + 2010-08-06 Dan Nicolaescu * process.c: Simplify include logic. === modified file 'src/alloc.c' --- src/alloc.c 2010-07-23 17:50:14 +0000 +++ src/alloc.c 2010-08-07 01:10:12 +0000 @@ -448,7 +448,6 @@ static struct mem_node mem_z; #define MEM_NIL &mem_z -static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); static struct Lisp_Vector *allocate_vectorlike (EMACS_INT); static void lisp_free (POINTER_TYPE *); static void mark_stack (void); === modified file 'src/buffer.c' --- src/buffer.c 2010-07-30 04:42:38 +0000 +++ src/buffer.c 2010-08-07 01:10:12 +0000 @@ -106,8 +106,6 @@ int last_per_buffer_idx; EXFUN (Fset_buffer, 1); -void set_buffer_internal (struct buffer *b); -void set_buffer_internal_1 (struct buffer *b); static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3); === modified file 'src/charset.h' --- src/charset.h 2010-07-02 09:26:33 +0000 +++ src/charset.h 2010-08-07 01:10:12 +0000 @@ -517,8 +517,6 @@ #define EMACS_MULE_LEADING_CODE_PRIVATE_21 0x9C /* 2/2 */ #define EMACS_MULE_LEADING_CODE_PRIVATE_22 0x9D /* 2/2 */ -extern struct charset *emacs_mule_charset[256]; - extern Lisp_Object Qcharsetp; === modified file 'src/dispextern.h' --- src/dispextern.h 2010-08-05 23:15:24 +0000 +++ src/dispextern.h 2010-08-07 01:10:12 +0000 @@ -2430,7 +2430,6 @@ #define PRODUCE_GLYPHS(IT) \ do { \ - extern int inhibit_free_realized_faces; \ if ((IT)->glyph_row != NULL && (IT)->bidi_p) \ { \ if ((IT)->bidi_it.paragraph_dir == R2L) \ @@ -3243,15 +3242,9 @@ void prepare_desired_row (struct glyph_row *); int line_hash_code (struct glyph_row *); void set_window_update_flags (struct window *, int); -void redraw_frame (struct frame *); -void redraw_garbaged_frames (void); -int scroll_cost (struct frame *, int, int, int); -int update_frame (struct frame *, int, int); void update_single_window (struct window *, int); -int scrolling (struct frame *); void do_pending_window_change (int); void change_frame_size (struct frame *, int, int, int, int, int); -void bitch_at_user (void); void init_display (void); void syms_of_display (void); extern Lisp_Object Qredisplay_dont_pause; === modified file 'src/lisp.h' --- src/lisp.h 2010-08-06 18:56:41 +0000 +++ src/lisp.h 2010-08-07 01:10:12 +0000 @@ -2395,7 +2395,6 @@ EXFUN (Fcoding_system_base, 1); EXFUN (Fcoding_system_eol_type, 1); EXFUN (Fcheck_coding_system, 1); -EXFUN (Fcheck_coding_system, 1); EXFUN (Fread_coding_system, 2); EXFUN (Fread_non_nil_coding_system, 1); EXFUN (Ffind_operation_coding_system, MANY); @@ -2822,7 +2821,6 @@ /* Defined in lread.c */ extern Lisp_Object Vafter_load_alist; extern Lisp_Object Qvariable_documentation, Qstandard_input; -extern Lisp_Object Qfunction; extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; extern Lisp_Object Vobarray, initial_obarray, Vstandard_input; extern int load_in_progress; @@ -3135,7 +3133,6 @@ /* Defined in minibuf.c */ extern Lisp_Object Qcompletion_ignore_case; -extern Lisp_Object Qcompletion_ignore_case; extern Lisp_Object Vcompletion_regexp_list; extern Lisp_Object Vhistory_length; extern Lisp_Object Vminibuffer_list; @@ -3417,7 +3414,6 @@ EXFUN (Fprevious_single_property_change, 4); EXFUN (Fget_text_property, 3); EXFUN (Fput_text_property, 5); -EXFUN (Fget_text_property, 3); EXFUN (Fprevious_char_property_change, 2); EXFUN (Fnext_char_property_change, 2); extern void report_interval_modification (Lisp_Object, Lisp_Object); @@ -3540,8 +3536,8 @@ extern Lisp_Object Qmode_line_inactive, Qvertical_border; extern Lisp_Object Qface; extern Lisp_Object Qnormal; -extern Lisp_Object QCfamily, QCweight, QCslant, QCwidth; -extern Lisp_Object QCheight, QCsize, QCname, QCwidth, QCforeground, QCbackground; +extern Lisp_Object QCfamily, QCweight, QCslant; +extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; extern Lisp_Object Vface_alternative_font_family_alist; extern Lisp_Object Vface_font_rescale_alist; extern Lisp_Object Vface_ignored_fonts; ------------------------------------------------------------ revno: 101010 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 13:08:26 -0700 message: * src/process.c: Simplify include logic. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 19:52:47 +0000 +++ src/ChangeLog 2010-08-06 20:08:26 +0000 @@ -1,5 +1,7 @@ 2010-08-06 Dan Nicolaescu + * process.c: Simplify include logic. + * keyboard.h (quit_char): Add declaration. * process.h (QCport, QCspeed, QCprocess, QCbytesize, QCstopbits) (QCparity, Qodd, Qeven, QCflowcontrol, Qhw, Qsw, QCsummary): Add @@ -10,7 +12,6 @@ Remove extern declarations in .c files, .h files have them. * xterm.c: * xdisp.c: - * process.c: * msdos.c: * image.c: * gtkutil.c: === modified file 'src/process.c' --- src/process.c 2010-08-06 19:07:16 +0000 +++ src/process.c 2010-08-06 20:08:26 +0000 @@ -64,21 +64,15 @@ #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) #include #endif /* HAVE_PTYS and no O_NDELAY */ +#if defined(HAVE_NET_IF_H) +#include +#endif /* HAVE_NET_IF_H */ #endif /* HAVE_SYS_IOCTL_H */ #ifdef NEED_BSDTTY #include #endif -/* Can we use SIOCGIFCONF and/or SIOCGIFADDR */ -#if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_NET_IF_H) -/* sys/ioctl.h may have been included already */ -#ifndef SIOCGIFADDR -#include -#endif -#include -#endif - #ifdef HAVE_SYS_WAIT #include #endif ------------------------------------------------------------ revno: 101009 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 13:05:40 -0700 message: * sysdep.c: Remove declarations. diff: === modified file 'src/sysdep.c' --- src/sysdep.c 2010-08-06 17:38:01 +0000 +++ src/sysdep.c 2010-08-06 20:05:40 +0000 @@ -96,8 +96,6 @@ #include #endif /* USG */ -extern int quit_char; - #include "keyboard.h" #include "frame.h" #include "window.h" @@ -114,11 +112,6 @@ #include #endif -/* For serial_configure and serial_open. */ -extern Lisp_Object QCport, QCspeed, QCprocess; -extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; -extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; - #ifdef WINDOWSNT #include /* In process.h which conflicts with the local copy. */ ------------------------------------------------------------ revno: 101008 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 12:52:47 -0700 message: Move declarations to header files. * src/keyboard.h (quit_char): Add declaration. * src/process.h (QCport, QCspeed, QCprocess, QCbytesize, QCstopbits) (QCparity, Qodd, Qeven, QCflowcontrol, Qhw, Qsw, QCsummary): Add declarations. * sysdep.c: * src/w32.c: Remove the above declarations. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 19:07:16 +0000 +++ src/ChangeLog 2010-08-06 19:52:47 +0000 @@ -1,5 +1,12 @@ 2010-08-06 Dan Nicolaescu + * keyboard.h (quit_char): Add declaration. + * process.h (QCport, QCspeed, QCprocess, QCbytesize, QCstopbits) + (QCparity, Qodd, Qeven, QCflowcontrol, Qhw, Qsw, QCsummary): Add + declarations. + * sysdep.c: + * w32.c: Remove the above declarations. + Remove extern declarations in .c files, .h files have them. * xterm.c: * xdisp.c: === modified file 'src/keyboard.h' --- src/keyboard.h 2010-08-06 11:28:59 +0000 +++ src/keyboard.h 2010-08-06 19:52:47 +0000 @@ -485,6 +485,8 @@ X Windows wants this for selection ownership. */ extern unsigned long last_event_timestamp; +extern int quit_char; + extern int parse_menu_item (Lisp_Object, int); extern void echo_now (void); === modified file 'src/process.h' --- src/process.h 2010-07-07 17:39:49 +0000 +++ src/process.h 2010-08-06 19:52:47 +0000 @@ -166,6 +166,9 @@ extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime; extern Lisp_Object Qtime, Qctime; +extern Lisp_Object QCport, QCspeed, QCprocess; +extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; +extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; extern Lisp_Object list_system_processes (void); extern Lisp_Object system_process_attributes (Lisp_Object); === modified file 'src/w32.c' --- src/w32.c 2010-07-07 09:45:28 +0000 +++ src/w32.c 2010-08-06 19:52:47 +0000 @@ -140,10 +140,6 @@ /* For serial_configure and serial_open. */ #include "process.h" -/* From process.c */ -extern Lisp_Object QCport, QCspeed, QCprocess; -extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; -extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; typedef HRESULT (WINAPI * ShGetFolderPath_fn) (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); ------------------------------------------------------------ revno: 101007 committer: Alan Mackenzie branch nick: trunk timestamp: Fri 2010-08-06 19:48:59 +0000 message: cc-cmds.el (c-mask-paragraph, c-fill-paragraph): Fix for the case that a C style comment has its delimiters alone on their respective lines. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-08-06 14:34:23 +0000 +++ lisp/ChangeLog 2010-08-06 19:48:59 +0000 @@ -1,3 +1,9 @@ +2010-08-06 Alan Mackenzie + + * progmodes/cc-cmds.el (c-mask-paragraph, c-fill-paragraph): Fix + for the case that a C style comment has its delimiters alone on + their respective lines. + 2010-08-06 Michael Albinus * net/tramp.el (tramp-handle-start-file-process ): Set connection === modified file 'lisp/progmodes/cc-cmds.el' --- lisp/progmodes/cc-cmds.el 2010-07-31 09:39:24 +0000 +++ lisp/progmodes/cc-cmds.el 2010-08-06 19:48:59 +0000 @@ -4001,6 +4001,14 @@ (goto-char ender-start) (current-column))) (point-rel (- ender-start here)) + (sentence-ends-comment + (save-excursion + (goto-char ender-start) + (and (search-backward-regexp + (c-sentence-end) (c-point 'bol) t) + (goto-char (match-end 0)) + (looking-at "[ \t]*") + (= (match-end 0) ender-start)))) spaces) (save-excursion @@ -4043,7 +4051,9 @@ (setq spaces (max (min spaces - (if sentence-end-double-space 2 1)) + (if (and sentence-ends-comment + sentence-end-double-space) + 2 1)) 1))) ;; Insert the filler first to keep marks right. (insert-char ?x spaces t) @@ -4253,8 +4263,11 @@ (let ((fill-paragraph-function ;; Avoid infinite recursion. (if (not (eq fill-paragraph-function 'c-fill-paragraph)) - fill-paragraph-function))) - (c-mask-paragraph t nil 'fill-paragraph arg)) + fill-paragraph-function)) + (start-point (point-marker))) + (c-mask-paragraph + t nil (lambda () (fill-region-as-paragraph (point-min) (point-max) arg))) + (goto-char start-point)) ;; Always return t. This has the effect that if filling isn't done ;; above, it isn't done at all, and it's therefore effectively ;; disabled in normal code. ------------------------------------------------------------ revno: 101006 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 12:07:16 -0700 message: Remove extern declarations in .c files, .h files have them. * src/xterm.c: * src/xdisp.c: * src/process.c: * src/msdos.c: * src/image.c: * src/gtkutil.c: * src/fileio.c: * src/eval.c: Remove declarations. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 19:01:35 +0000 +++ src/ChangeLog 2010-08-06 19:07:16 +0000 @@ -1,5 +1,15 @@ 2010-08-06 Dan Nicolaescu + Remove extern declarations in .c files, .h files have them. + * xterm.c: + * xdisp.c: + * process.c: + * msdos.c: + * image.c: + * gtkutil.c: + * fileio.c: + * eval.c: Remove declarations. + * frame.c (frame_params): Make const. * lisp.h (fatal_error_signal, emacs_root_dir): Add declaration. === modified file 'src/eval.c' --- src/eval.c 2010-07-29 05:48:06 +0000 +++ src/eval.c 2010-08-06 19:07:16 +0000 @@ -1629,7 +1629,6 @@ That is a special case--don't do this in other situations. */ register struct handler *allhandlers = handlerlist; Lisp_Object conditions; - extern int waiting_for_input; Lisp_Object string; Lisp_Object real_error_symbol; struct backtrace *bp; @@ -3432,7 +3431,6 @@ register int i; Lisp_Object tail; Lisp_Object tem; - extern Lisp_Object Vprint_level; struct gcpro gcpro1; XSETFASTINT (Vprint_level, 3); === modified file 'src/fileio.c' --- src/fileio.c 2010-07-29 05:48:06 +0000 +++ src/fileio.c 2010-08-06 19:07:16 +0000 @@ -854,8 +854,6 @@ To avoid this, we set default_directory to the root of the current drive. */ - extern char *emacs_root_dir (void); - default_directory = build_string (emacs_root_dir ()); #else default_directory = build_string ("/"); === modified file 'src/gtkutil.c' --- src/gtkutil.c 2010-08-05 23:34:12 +0000 +++ src/gtkutil.c 2010-08-06 19:07:16 +0000 @@ -291,7 +291,6 @@ { Lisp_Object specified_file = Qnil; Lisp_Object tail; - extern Lisp_Object QCfile; for (tail = XCDR (image); NILP (specified_file) && CONSP (tail) && CONSP (XCDR (tail)); === modified file 'src/image.c' --- src/image.c 2010-08-06 10:12:41 +0000 +++ src/image.c 2010-08-06 19:07:16 +0000 @@ -126,6 +126,9 @@ Lisp_Object Vx_bitmap_file_path; +/* The symbol `postscript' identifying images of this type. */ + +Lisp_Object Qpostscript; static void x_disable_image (struct frame *, struct image *); static void x_edge_detection (struct frame *, struct image *, Lisp_Object, @@ -1756,8 +1759,6 @@ /* If not found, create a new image and cache it. */ if (img == NULL) { - extern Lisp_Object Qpostscript; - BLOCK_INPUT; img = make_image (spec, hash); cache_image (f, img); @@ -7742,10 +7743,6 @@ #define HAVE_GHOSTSCRIPT 1 #endif /* HAVE_X_WINDOWS */ -/* The symbol `postscript' identifying images of this type. */ - -Lisp_Object Qpostscript; - #ifdef HAVE_GHOSTSCRIPT static int gs_image_p (Lisp_Object object); === modified file 'src/msdos.c' --- src/msdos.c 2010-08-06 14:54:06 +0000 +++ src/msdos.c 2010-08-06 19:07:16 +0000 @@ -1453,7 +1453,6 @@ /* Look for a `help-echo' property. */ { Lisp_Object help; - extern Lisp_Object Qhelp_echo; /* Check overlays first. */ help = Qnil; === modified file 'src/process.c' --- src/process.c 2010-08-06 10:12:41 +0000 +++ src/process.c 2010-08-06 19:07:16 +0000 @@ -6361,8 +6361,7 @@ { int old_errno = errno; Lisp_Object proc; - register struct Lisp_Process *p; - extern EMACS_TIME *input_available_clear_time; + struct Lisp_Process *p; SIGNAL_THREAD_CHECK (signo); === modified file 'src/xdisp.c' --- src/xdisp.c 2010-08-06 15:53:11 +0000 +++ src/xdisp.c 2010-08-06 19:07:16 +0000 @@ -10195,7 +10195,6 @@ int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); int hmargin, vmargin, relief, idx, end; - extern Lisp_Object QCrelief, QCmargin, QCconversion; /* If image is a vector, choose the image according to the button state. */ === modified file 'src/xterm.c' --- src/xterm.c 2010-08-05 23:34:12 +0000 +++ src/xterm.c 2010-08-06 19:07:16 +0000 @@ -7628,7 +7628,6 @@ /* If DPYINFO is null, this means we didn't open the display in the first place, so don't try to close it. */ { - extern void (*fatal_error_signal_hook) (void); fatal_error_signal_hook = x_fatal_error_signal; XtCloseDisplay (dpy); fatal_error_signal_hook = NULL; ------------------------------------------------------------ revno: 101005 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 12:01:35 -0700 message: * src/frame.c (frame_params): Make const. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 18:56:41 +0000 +++ src/ChangeLog 2010-08-06 19:01:35 +0000 @@ -1,5 +1,7 @@ 2010-08-06 Dan Nicolaescu + * frame.c (frame_params): Make const. + * lisp.h (fatal_error_signal, emacs_root_dir): Add declaration. * emacs.c (emacs_copyright, emacs_version): Make static. === modified file 'src/frame.c' --- src/frame.c 2010-08-05 23:34:12 +0000 +++ src/frame.c 2010-08-06 19:01:35 +0000 @@ -2774,7 +2774,7 @@ Lisp_Object *variable; }; -static struct frame_parm_table frame_parms[] = +static const struct frame_parm_table frame_parms[] = { {"auto-raise", &Qauto_raise}, {"auto-lower", &Qauto_lower}, ------------------------------------------------------------ revno: 101004 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 11:56:41 -0700 message: * src/lisp.h (fatal_error_signal, emacs_root_dir): Add declaration. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 18:48:24 +0000 +++ src/ChangeLog 2010-08-06 18:56:41 +0000 @@ -1,5 +1,7 @@ 2010-08-06 Dan Nicolaescu + * lisp.h (fatal_error_signal, emacs_root_dir): Add declaration. + * emacs.c (emacs_copyright, emacs_version): Make static. (Vinitial_window_system, Vauto_save_list_file_name) (Vinhibit_redisplay): Remove declarations. === modified file 'src/lisp.h' --- src/lisp.h 2010-08-06 10:12:41 +0000 +++ src/lisp.h 2010-08-06 18:56:41 +0000 @@ -3300,6 +3300,7 @@ extern Lisp_Object Vinstallation_directory; extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; +extern void (*fatal_error_signal_hook) (void); EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE void fixup_locale (void); @@ -3591,6 +3592,11 @@ void xd_read_queued_messages (void); void syms_of_dbusbind (void); #endif + +#ifdef DOS_NT +/* Defined in msdos.c, w32.c */ +extern char *emacs_root_dir (void); +#endif /* DOS_NT */ /* Nonzero means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ ------------------------------------------------------------ revno: 101003 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 11:48:24 -0700 message: emacs.c cleanups. * src/emacs.c (emacs_copyright, emacs_version): Make static. (Vinitial_window_system, Vauto_save_list_file_name) (Vinhibit_redisplay): Remove declarations. (main): Remove HAVE_SHM code, unused. Remove _I386 conditional for AIX. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 18:41:15 +0000 +++ src/ChangeLog 2010-08-06 18:48:24 +0000 @@ -1,5 +1,11 @@ 2010-08-06 Dan Nicolaescu + * emacs.c (emacs_copyright, emacs_version): Make static. + (Vinitial_window_system, Vauto_save_list_file_name) + (Vinhibit_redisplay): Remove declarations. + (main): Remove HAVE_SHM code, unused. Remove _I386 conditional + for AIX. + Use const for some arrays and functions. * xterm.h (xg_set_icon_from_xpm_data): * xfns.c (xg_set_icon_from_xpm_data): === modified file 'src/emacs.c' --- src/emacs.c 2010-08-06 10:12:41 +0000 +++ src/emacs.c 2010-08-06 18:48:24 +0000 @@ -91,8 +91,8 @@ #endif #endif -const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc."; -const char emacs_version[] = "24.0.50"; +static const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc."; +static const char emacs_version[] = "24.0.50"; /* Make these values available in GDB, which doesn't see macros. */ @@ -217,15 +217,6 @@ output a warning in dump-emacs. */ #define MAX_HEAP_BSS_DIFF (1024*1024) - -#ifdef HAVE_WINDOW_SYSTEM -extern Lisp_Object Vinitial_window_system; -#endif /* HAVE_WINDOW_SYSTEM */ - -extern Lisp_Object Vauto_save_list_file_name; - -extern Lisp_Object Vinhibit_redisplay; - /* Nonzero means running Emacs without interactive terminal. */ int noninteractive; @@ -864,23 +855,6 @@ } #endif /* HAVE_PERSONALITY_LINUX32 */ - -/* Map in shared memory, if we are using that. */ -#ifdef HAVE_SHM - if (argmatch (argv, argc, "-nl", "--no-shared-memory", 6, NULL, &skip_args)) - { - map_in_data (0); - /* The shared memory was just restored, which clobbered this. */ - skip_args = 1; - } - else - { - map_in_data (1); - /* The shared memory was just restored, which clobbered this. */ - skip_args = 0; - } -#endif - #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK) /* Extend the stack space available. Don't do that if dumping, since some systems (e.g. DJGPP) @@ -1279,9 +1253,7 @@ #ifdef AIX /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ signal (SIGXCPU, fatal_error_signal); -#ifndef _I386 signal (SIGIOINT, fatal_error_signal); -#endif signal (SIGGRANT, fatal_error_signal); signal (SIGRETRACT, fatal_error_signal); signal (SIGSOUND, fatal_error_signal); ------------------------------------------------------------ revno: 101002 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-08-06 11:41:15 -0700 message: Use const for some arrays and functions. * src/xterm.h (xg_set_icon_from_xpm_data): * src/xfns.c (xg_set_icon_from_xpm_data): * src/term.c (fkeys): * src/keyboard.c (lispy_accent_keys, lispy_function_keys) (lispy_multimedia_keys, lispy_kana_keys, iso_lispy_function_keys) (lispy_drag_n_drop_names, scroll_bar_parts, modify_event_symbol) (frame.c frame_parms): * src/emacs-icon.h (gnu_xpm_bits): * src/callint.c (callint_argfuns): Use const. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 17:38:01 +0000 +++ src/ChangeLog 2010-08-06 18:41:15 +0000 @@ -1,3 +1,16 @@ +2010-08-06 Dan Nicolaescu + + Use const for some arrays and functions. + * xterm.h (xg_set_icon_from_xpm_data): + * xfns.c (xg_set_icon_from_xpm_data): + * term.c (fkeys): + * keyboard.c (lispy_accent_keys, lispy_function_keys) + (lispy_multimedia_keys, lispy_kana_keys, iso_lispy_function_keys) + (lispy_drag_n_drop_names, scroll_bar_parts, modify_event_symbol) + (frame.c frame_parms): + * emacs-icon.h (gnu_xpm_bits): + * callint.c (callint_argfuns): Use const. + 2010-08-06 Jan Djärv * sysdep.c: Move include term.h last of includes (Bug#6812). === modified file 'src/callint.c' --- src/callint.c 2010-07-29 05:48:06 +0000 +++ src/callint.c 2010-08-06 18:41:15 +0000 @@ -149,7 +149,7 @@ return exp; } -char *callint_argfuns[] +static const char *callint_argfuns[] = {"", "point", "mark", "region-beginning", "region-end"}; static void === modified file 'src/emacs-icon.h' --- src/emacs-icon.h 2010-01-13 08:35:10 +0000 +++ src/emacs-icon.h 2010-08-06 18:41:15 +0000 @@ -23,7 +23,7 @@ /* Note that the GTK port uses gdk to display the icon, so Emacs need not have XPM support compiled in. */ #if (defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)) || defined (USE_GTK) -static char * gnu_xpm_bits[] = { +static const char * gnu_xpm_bits[] = { /* width height ncolors chars_per_pixel */ "32 32 255 2", /* colors */ === modified file 'src/keyboard.c' --- src/keyboard.c 2010-08-05 23:34:12 +0000 +++ src/keyboard.c 2010-08-06 18:41:15 +0000 @@ -613,7 +613,7 @@ unsigned long); #endif static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object, - Lisp_Object, char **, + Lisp_Object, const char **, Lisp_Object *, unsigned); static Lisp_Object make_lispy_switch_frame (Lisp_Object); static void save_getcjmp (jmp_buf); @@ -4724,7 +4724,7 @@ /* This is a list of Lisp names for special "accent" characters. It parallels lispy_accent_codes. */ -static char *lispy_accent_keys[] = +static const char *lispy_accent_keys[] = { "dead-circumflex", "dead-grave", @@ -4751,7 +4751,7 @@ #ifdef HAVE_NTGUI #define FUNCTION_KEY_OFFSET 0x0 -char *lispy_function_keys[] = +char const *lispy_function_keys[] = { 0, /* 0 */ @@ -4945,7 +4945,7 @@ /* Some of these duplicate the "Media keys" on newer keyboards, but they are delivered to the application in a different way. */ -static char *lispy_multimedia_keys[] = +static const char *lispy_multimedia_keys[] = { 0, "browser-back", @@ -5009,7 +5009,7 @@ the XK_kana_A case below. */ #if 0 #ifdef XK_kana_A -static char *lispy_kana_keys[] = +static const char *lispy_kana_keys[] = { /* X Keysym value */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x400 .. 0x40f */ @@ -5048,7 +5048,7 @@ /* You'll notice that this table is arranged to be conveniently indexed by X Windows keysym values. */ -static char *lispy_function_keys[] = +static const char *lispy_function_keys[] = { /* X Keysym value */ @@ -5134,7 +5134,7 @@ /* ISO 9995 Function and Modifier Keys; the first byte is 0xFE. */ #define ISO_FUNCTION_KEY_OFFSET 0xfe00 -static char *iso_lispy_function_keys[] = +static const char *iso_lispy_function_keys[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe08 */ @@ -5157,14 +5157,14 @@ Lisp_Object Vlispy_mouse_stem; -static char *lispy_wheel_names[] = +static const char *lispy_wheel_names[] = { "wheel-up", "wheel-down", "wheel-left", "wheel-right" }; /* drag-n-drop events are generated when a set of selected files are dragged from another application and dropped onto an Emacs window. */ -static char *lispy_drag_n_drop_names[] = +static const char *lispy_drag_n_drop_names[] = { "drag-n-drop" }; @@ -5175,7 +5175,7 @@ Lisp_Object Qtop, Qratio; /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ -Lisp_Object *scroll_bar_parts[] = { +const Lisp_Object *scroll_bar_parts[] = { &Qabove_handle, &Qhandle, &Qbelow_handle, &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio }; @@ -6542,7 +6542,7 @@ static Lisp_Object modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, - Lisp_Object name_alist_or_stem, char **name_table, + Lisp_Object name_alist_or_stem, const char **name_table, Lisp_Object *symbol_table, unsigned int table_size) { Lisp_Object value; === modified file 'src/term.c' --- src/term.c 2010-08-06 10:12:41 +0000 +++ src/term.c 2010-08-06 18:41:15 +0000 @@ -1266,7 +1266,7 @@ other keys (as on the IBM PC keyboard) they get overridden. */ -static struct fkey_table keys[] = +static const struct fkey_table keys[] = { {"kh", "home"}, /* termcap */ {"kl", "left"}, /* termcap */ @@ -2906,7 +2906,6 @@ /* Look for a `help-echo' property. */ { Lisp_Object help; - extern Lisp_Object Qhelp_echo; /* Check overlays first. */ help = Qnil; === modified file 'src/xfns.c' --- src/xfns.c 2010-08-05 23:34:12 +0000 +++ src/xfns.c 2010-08-06 18:41:15 +0000 @@ -762,10 +762,10 @@ } int -xg_set_icon_from_xpm_data (FRAME_PTR f, char **data) +xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data) { int result = 0; - GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data); + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); if (!pixbuf) return 0; === modified file 'src/xterm.h' --- src/xterm.h 2010-08-06 11:28:59 +0000 +++ src/xterm.h 2010-08-06 18:41:15 +0000 @@ -1062,7 +1062,7 @@ #ifdef USE_GTK extern int xg_set_icon (struct frame *, Lisp_Object); -extern int xg_set_icon_from_xpm_data (struct frame *, char**); +extern int xg_set_icon_from_xpm_data (struct frame *, const char**); #endif /* USE_GTK */ extern void x_real_positions (struct frame *, int *, int *); ------------------------------------------------------------ revno: 101001 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-06 19:38:01 +0200 message: * src/sysdep.c: Move include term.h last of includes (Bug#6812). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 15:05:21 +0000 +++ src/ChangeLog 2010-08-06 17:38:01 +0000 @@ -1,3 +1,7 @@ +2010-08-06 Jan Djärv + + * sysdep.c: Move include term.h last of includes (Bug#6812). + 2010-08-06 Eli Zaretskii * dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs. === modified file 'src/sysdep.c' --- src/sysdep.c 2010-08-06 10:12:41 +0000 +++ src/sysdep.c 2010-08-06 17:38:01 +0000 @@ -33,9 +33,6 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_TERM_H -#include -#endif #include "lisp.h" /* Including stdlib.h isn't necessarily enough to get srandom @@ -110,6 +107,12 @@ #include "dispextern.h" #include "process.h" #include "cm.h" /* for reset_sys_modes */ +#ifdef HAVE_TERM_H +/* Include this last. If it is ncurses header file, it adds a lot of + defines that interfere with stuff in other headers. Someone responsible + for ncurses messed up bigtime. See bug#6812. */ +#include +#endif /* For serial_configure and serial_open. */ extern Lisp_Object QCport, QCspeed, QCprocess; ------------------------------------------------------------ revno: 101000 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-08-06 18:53:11 +0300 message: xdisp.c (display_line): Fix a typo in a comment. diff: === modified file 'src/xdisp.c' --- src/xdisp.c 2010-08-05 23:34:12 +0000 +++ src/xdisp.c 2010-08-06 15:53:11 +0000 @@ -17381,8 +17381,8 @@ row->ends_at_zv_p = 1; /* A row that displays right-to-left text must always have its last face extended all the way to the end of line, - even if this row ends in ZV, because we still write to th - screen left to right. */ + even if this row ends in ZV, because we still write to + the screen left to right. */ if (row->reversed_p) extend_face_to_end_of_line (it); break; ------------------------------------------------------------ revno: 100999 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-08-06 18:05:21 +0300 message: Fix redisplay bugs due to uninitialized glyphs. Add diagnostics tools. dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs. msdos.c (IT_display_cursor): Log cursor position on termscript. .gdbinit (pgx): Display the avoid_cursor_p flag. diff: === modified file 'src/.gdbinit' --- src/.gdbinit 2010-05-19 20:24:21 +0000 +++ src/.gdbinit 2010-08-06 14:54:06 +0000 @@ -535,6 +535,9 @@ if ($g->overlaps_vertically_p) printf " OVL" end + if ($g->avoid_cursor_p) + printf " AVOID" + end if ($g->left_box_line_p) printf " [" end === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 12:35:00 +0000 +++ src/ChangeLog 2010-08-06 15:05:21 +0000 @@ -1,3 +1,11 @@ +2010-08-06 Eli Zaretskii + + * dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs. + + * msdos.c (IT_display_cursor): Log cursor position on termscript. + + * .gdbinit (pgx): Display the avoid_cursor_p flag. + 2010-08-06 Juanma Barranquero * makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies. === modified file 'src/dispnew.c' --- src/dispnew.c 2010-07-29 05:48:06 +0000 +++ src/dispnew.c 2010-08-06 14:54:06 +0000 @@ -1528,7 +1528,11 @@ int size = needed * sizeof (struct glyph); if (pool->glyphs) - pool->glyphs = (struct glyph *) xrealloc (pool->glyphs, size); + { + pool->glyphs = (struct glyph *) xrealloc (pool->glyphs, size); + memset (pool->glyphs + pool->nglyphs, 0, + size - pool->nglyphs * sizeof (struct glyph)); + } else { pool->glyphs = (struct glyph *) xmalloc (size); === modified file 'src/msdos.c' --- src/msdos.c 2010-07-29 05:48:06 +0000 +++ src/msdos.c 2010-08-06 14:54:06 +0000 @@ -1593,14 +1593,16 @@ ScreenSetCursor (current_pos_Y, current_pos_X); cursor_cleared = 0; if (tty->termscript) - fprintf (tty->termscript, "\nCURSOR ON"); + fprintf (tty->termscript, "\nCURSOR ON (%dx%d)", + current_pos_Y, current_pos_X); } else if (!on && !cursor_cleared) { ScreenSetCursor (-1, -1); cursor_cleared = 1; if (tty->termscript) - fprintf (tty->termscript, "\nCURSOR OFF"); + fprintf (tty->termscript, "\nCURSOR OFF (%dx%d)", + current_pos_Y, current_pos_X); } } ------------------------------------------------------------ revno: 100998 committer: Michael Albinus branch nick: trunk timestamp: Fri 2010-08-06 16:34:23 +0200 message: * net/tramp.el (tramp-handle-start-file-process ): Set connection property "vec". (tramp-process-sentinel): Use it for flushing the cache. We cannot do it via the process buffer, the buffer could be deleted already when running the sentinel. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-08-06 13:53:59 +0000 +++ lisp/ChangeLog 2010-08-06 14:34:23 +0000 @@ -1,4 +1,12 @@ -2010-08-06 Jürgen Hötzel +2010-08-06 Michael Albinus + + * net/tramp.el (tramp-handle-start-file-process ): Set connection + property "vec". + (tramp-process-sentinel): Use it for flushing the cache. We + cannot do it via the process buffer, the buffer could be deleted + already when running the sentinel. + +2010-08-06 Jürgen Hötzel (tiny change) * comint.el (comint-mode): Make directory tracking functions functional on remote files. (Bug#6764) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-08-05 08:15:22 +0000 +++ lisp/net/tramp.el 2010-08-06 14:34:23 +0000 @@ -4506,10 +4506,10 @@ (defun tramp-process-sentinel (proc event) "Flush file caches." (unless (memq (process-status proc) '(run open)) - (with-current-buffer (process-buffer proc) - (with-parsed-tramp-file-name default-directory nil - (tramp-message v 5 "Sentinel called: `%s' `%s'" proc event) - (tramp-flush-directory-property v ""))))) + (let ((vec (tramp-get-connection-property proc "vector" nil))) + (when vec + (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event) + (tramp-flush-directory-property vec ""))))) ;; We use BUFFER also as connection buffer during setup. Because of ;; this, its original contents must be saved, and restored once @@ -4556,6 +4556,7 @@ v 'file-error "pty association is not supported for `%s'" name))) (let ((p (tramp-get-connection-process v))) ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) (set-process-sentinel p 'tramp-process-sentinel) (tramp-set-process-query-on-exit-flag p t) ;; Return process. ------------------------------------------------------------ revno: 100997 committer: Michael Albinus branch nick: trunk timestamp: Fri 2010-08-06 15:53:59 +0200 message: * comint.el (comint-mode): Make directory tracking functions functional on remote files. (Bug#6764) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-08-06 04:01:00 +0000 +++ lisp/ChangeLog 2010-08-06 13:53:59 +0000 @@ -1,3 +1,8 @@ +2010-08-06 Jürgen Hötzel + + * comint.el (comint-mode): Make directory tracking functions + functional on remote files. (Bug#6764) + 2010-08-06 Dan Nicolaescu * vc/diff-mode.el (diff-mode-shared-map): Bind g to revert-buffer. === modified file 'lisp/comint.el' --- lisp/comint.el 2010-07-10 18:52:53 +0000 +++ lisp/comint.el 2010-08-06 13:53:59 +0000 @@ -674,6 +674,9 @@ (make-local-variable 'comint-process-echoes) (make-local-variable 'comint-file-name-chars) (make-local-variable 'comint-file-name-quote-list) + ;; dir tracking on remote files + (set (make-local-variable 'comint-file-name-prefix) + (or (file-remote-p default-directory) "")) (make-local-variable 'comint-accum-marker) (setq comint-accum-marker (make-marker)) (make-local-variable 'font-lock-defaults) ------------------------------------------------------------ revno: 100996 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-08-06 14:35:00 +0200 message: src/ChangeLog: Fix typos. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 12:25:10 +0000 +++ src/ChangeLog 2010-08-06 12:35:00 +0000 @@ -23,9 +23,9 @@ * term.c: Check HAVE_SYS_IOCTL_H. - * sysdep.c: Check HAVE_TERM_H + * sysdep.c: Check HAVE_TERM_H. - * process.c: Check HAVE_UTIL_H. Include nsterm.h if HAVE_NS. + * process.c: Check HAVE_UTIL_H. Include nsterm.h if HAVE_NS. * nsterm.m (ns_init_paths, ns_alloc_autorelease_pool) (ns_ring_bell, ns_defined_color, hide_hourglass) @@ -41,7 +41,7 @@ (x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines) (x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select) (syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect): - Declare + Declare. * nsmenu.m (popup_activated, name_is_separator) (syms_of_nsmenu): Convert to ANSI C prototypes. @@ -310,7 +310,7 @@ Only make handlebox_widget if NULL. Check if tool bar goes to vbox or hbox depending on pos. (xg_update_tool_bar_sizes): New function. - (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar + (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar height, call xg_update_tool_bar_sizes instead. (free_frame_tool_bar): Remove from hbox or vbox depending on toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero. @@ -488,7 +488,7 @@ * xfaces.c (Qmouse_face): Remove declaration. (face_color_gray_p, tty_defined_color, defined_color) - (face_color_gray_p, face_color_supported_p). Add const. + (face_color_gray_p, face_color_supported_p): Add const. * xdisp.c (do_mouse_tracking): Remove declaration. (add_to_log): Use const. @@ -3890,8 +3890,8 @@ (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. + * 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 @@ -5693,7 +5693,7 @@ (store_symval_forwarding): Take into account the fact that Ints can now have more than one tag. * buffer.c (syms_of_buffer): Use LISP_INT_TAG. - buffer_slot_type_mismatch): + (buffer_slot_type_mismatch): * xfaces.c (face_attr_equal_p): * print.c (print_object): * alloc.c (mark_maybe_object, mark_object, survives_gc_p): ------------------------------------------------------------ revno: 100995 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-08-06 14:25:10 +0200 message: src/makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 11:28:59 +0000 +++ src/ChangeLog 2010-08-06 12:25:10 +0000 @@ -1,3 +1,7 @@ +2010-08-06 Juanma Barranquero + + * makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies. + 2010-08-06 Jan Djärv * xterm.h (x_get_focus_frame): Declare. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2010-07-18 13:59:40 +0000 +++ src/makefile.w32-in 2010-08-06 12:25:10 +0000 @@ -1506,6 +1506,7 @@ $(SRC)/systime.h \ $(SRC)/termchar.h \ $(SRC)/termhooks.h \ + $(SRC)/termopts.h \ $(SRC)/w32gui.h \ $(SRC)/w32term.h \ $(SRC)/window.h ------------------------------------------------------------ revno: 100994 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-06 13:28:59 +0200 message: More undeclared function fixes and add -Wimplicit-function-declaration. If a function returns Lisp_Object it must be declared, otherwise on a 64-bit system, it will return just 32 bits (int). * configure.in: Use -Wimplicit-function-declaration if compiler supports it. * src/keyboard.h (poll_for_input_1): Unconditionally declare. * src/xterm.h (x_get_focus_frame): Declare. diff: === modified file 'ChangeLog' --- ChangeLog 2010-08-06 10:12:41 +0000 +++ ChangeLog 2010-08-06 11:28:59 +0000 @@ -1,6 +1,7 @@ 2010-08-06 Jan Djärv * configure.in: Check for util.h. + Use -Wimplicit-function-declaration if compiler supports it. 2010-08-05 Eli Zaretskii === modified file 'configure' --- configure 2010-08-06 10:12:41 +0000 +++ configure 2010-08-06 11:28:59 +0000 @@ -4865,6 +4865,38 @@ unset has_option unset SAVE_CFLAGS +### Use -Wimplicit-function-declaration if the compiler supports it +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 +$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } +SAVE_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wimplicit-function-declaration" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + has_option=yes +else + has_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $has_option = yes; then + C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 +$as_echo "$has_option" >&6; } +CFLAGS="$SAVE_CFLAGS" +unset has_option +unset SAVE_CFLAGS + + #### Some other nice autoconf tests. === modified file 'configure.in' --- configure.in 2010-08-06 10:12:41 +0000 +++ configure.in 2010-08-06 11:28:59 +0000 @@ -770,6 +770,20 @@ CFLAGS="$SAVE_CFLAGS" unset has_option unset SAVE_CFLAGS + +### Use -Wimplicit-function-declaration if the compiler supports it +AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) +SAVE_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wimplicit-function-declaration" +AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) +if test $has_option = yes; then + C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" +fi +AC_MSG_RESULT($has_option) +CFLAGS="$SAVE_CFLAGS" +unset has_option +unset SAVE_CFLAGS + AC_SUBST(C_WARNINGS_SWITCH) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 11:04:29 +0000 +++ src/ChangeLog 2010-08-06 11:28:59 +0000 @@ -1,5 +1,9 @@ 2010-08-06 Jan Djärv + * xterm.h (x_get_focus_frame): Declare. + + * keyboard.h (poll_for_input_1): Unconditionally declare. + * nsterm.h (x_set_menu_bar_lines): Declare. * window.c: Don't include menu.h, it depends on lots of other .h-files. === modified file 'src/keyboard.h' --- src/keyboard.h 2010-08-05 23:15:24 +0000 +++ src/keyboard.h 2010-08-06 11:28:59 +0000 @@ -515,9 +515,7 @@ extern void kbd_buffer_store_event_hold (struct input_event *, struct input_event *); extern void kbd_buffer_unget_event (struct input_event *); -#ifdef POLL_FOR_INPUT extern void poll_for_input_1 (void); -#endif extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int); extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, === modified file 'src/xterm.h' --- src/xterm.h 2010-08-05 23:15:24 +0000 +++ src/xterm.h 2010-08-06 11:28:59 +0000 @@ -1058,6 +1058,7 @@ /* Defined in xfns.c */ extern struct x_display_info * check_x_display_info (Lisp_Object frame); +extern Lisp_Object x_get_focus_frame (struct frame *); #ifdef USE_GTK extern int xg_set_icon (struct frame *, Lisp_Object); ------------------------------------------------------------ revno: 100993 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-06 13:04:29 +0200 message: Can't include menu.h in window.c for X targets. * nsterm.h (x_set_menu_bar_lines): Declare. * window.c: Don't include menu.h, it depends on lots of other .h-files. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 10:12:41 +0000 +++ src/ChangeLog 2010-08-06 11:04:29 +0000 @@ -1,5 +1,9 @@ 2010-08-06 Jan Djärv + * nsterm.h (x_set_menu_bar_lines): Declare. + + * window.c: Don't include menu.h, it depends on lots of other .h-files. + * xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes. * window.c: Include menu.h. === modified file 'src/nsterm.h' --- src/nsterm.h 2010-08-06 10:12:41 +0000 +++ src/nsterm.h 2010-08-06 11:04:29 +0000 @@ -761,6 +761,7 @@ extern int x_pixel_width (struct frame *f); extern int x_pixel_height (struct frame *f); extern void x_set_frame_alpha (struct frame *f); +extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval); === modified file 'src/window.c' --- src/window.c 2010-08-06 10:12:41 +0000 +++ src/window.c 2010-08-06 11:04:29 +0000 @@ -37,7 +37,6 @@ #include "blockinput.h" #include "intervals.h" #include "termhooks.h" /* For FRAME_TERMINAL. */ -#include "menu.h" #ifdef HAVE_X_WINDOWS #include "xterm.h" @@ -52,7 +51,6 @@ #include "nsterm.h" #endif - Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p; Lisp_Object Qdisplay_buffer; Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; ------------------------------------------------------------ revno: 100992 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-06 12:12:41 +0200 message: Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings. * configure.in: Check for util.h. * src/bidi.c (bidi_dump_cached_states): Fix fprintf warning. * src/emacs.c: Include src/nsterm.h if HAVE_NS. * src/image.c (xpm_scan, xpm_make_color_table_v) (xpm_put_color_table_v, xpm_get_color_table_v) (xpm_make_color_table_h, xpm_put_color_table_h) (xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image) (xpm_load): Convert to ANSI C prototypes. * src/lisp.h (fmod_float): Declare. * src/menu.h (x_set_menu_bar_line): Declare. (free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions. * src/window.c: Include menu.h. * src/nsfns.m (have_menus_p, ns_display_info_for_name) (x_set_cursor_type, ns_appkit_version_str) (ns_appkit_version_int, ns_do_applescript) (x_set_scroll_bar_default_width, x_sync, compute_tip_xy) (syms_of_nsfns): Convert to ANSI C prototypes. * src/nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C prototypes. * src/nsimage.m (ns_load_image): Move NSTRACE after declarations. * src/nsmenu.m (popup_activated, name_is_separator) (syms_of_nsmenu): Convert to ANSI C prototypes. (runMenuAt): Prototypes and move declarations before code. * src/nsterm.h : Include sysselect.h. (x_sync, x_get_focus_frame, x_set_mouse_position) (x_set_mouse_pixel_position, x_make_frame_visible) (x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height) (x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines) (x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select) (syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect): Declare * src/process.c: Check HAVE_UTIL_H. Include src/nsterm.h if HAVE_NS. * src/nsterm.m (ns_init_paths, ns_alloc_autorelease_pool) (ns_ring_bell, ns_defined_color, hide_hourglass) (x_display_pixel_height, x_display_pixel_width, syms_of_nsterm): Convert to ANSI C prototypes. (x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations before code. * src/sysdep.c: Check HAVE_TERM_H * src/term.c: Check HAVE_SYS_IOCTL_H. * src/unexmacosx.c (print_region_list, print_regions) (build_region_list, find_emacs_zone_regions) (unexec_regions_merge, read_load_commands, dump_it) (unexec_init_emacs_zone): Convert to ANSI C prototypes. * src/xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes. diff: === modified file 'ChangeLog' --- ChangeLog 2010-08-05 17:11:32 +0000 +++ ChangeLog 2010-08-06 10:12:41 +0000 @@ -1,3 +1,7 @@ +2010-08-06 Jan Djärv + + * configure.in: Check for util.h. + 2010-08-05 Eli Zaretskii * configure.in (UNEXEC_OBJ): Rename unexec.o => unexcoff.o. === modified file 'configure' --- configure 2010-08-05 18:30:35 +0000 +++ configure 2010-08-06 10:12:41 +0000 @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for emacs 24.0.50. +# Generated by GNU Autoconf 2.65 for emacs 24.0.50. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -316,7 +316,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -356,19 +356,19 @@ fi # as_fn_arith -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -530,7 +530,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -950,7 +950,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -976,7 +976,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1180,7 +1180,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1196,7 +1196,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1226,8 +1226,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) @@ -1235,7 +1235,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1253,13 +1253,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1282,7 +1282,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1296,8 +1296,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1312,9 +1312,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1353,11 +1353,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1397,7 +1397,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1613,9 +1613,9 @@ if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.66 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1755,10 +1755,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1821,7 +1821,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1885,7 +1885,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1907,18 +1907,15 @@ } # ac_fn_c_check_header_compile -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1927,12 +1924,8 @@ int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -1961,7 +1954,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1991,7 +1984,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2047,7 +2040,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2115,7 +2108,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2164,7 +2157,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2274,9 +2267,11 @@ { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2310,9 +2305,11 @@ ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2325,9 +2322,11 @@ echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2341,9 +2340,11 @@ fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2398,12 +2399,7 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2418,11 +2414,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } + . "$ac_site_file" fi done @@ -2503,7 +2495,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2677,7 +2669,7 @@ g | gt | gtk ) val=gtk ;; gtk3 ) val=gtk3 ;; * ) -as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; +as_fn_error "\`--with-x-toolkit=$withval' is invalid; this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 ;; @@ -2956,7 +2948,7 @@ stringfreelist) ac_gc_check_string_free_list=1 ;; xmallocoverrun) ac_xmalloc_overrun=1 ;; conslist) ac_gc_check_cons_list=1 ;; - *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; + *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; esac done IFS="$ac_save_IFS" @@ -3074,22 +3066,16 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3103,7 +3089,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3114,16 +3100,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3148,7 +3134,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3156,7 +3142,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3450,7 +3436,7 @@ if test $unported = yes; then - as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. + as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 fi @@ -3764,8 +3750,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3879,8 +3865,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3922,8 +3909,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3980,9 +3967,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi @@ -4033,8 +4020,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4451,8 +4438,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -4513,7 +4500,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4579,7 +4566,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4711,7 +4698,8 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5008,8 +4996,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -5446,7 +5434,7 @@ if test "x${with_makeinfo}" = "xno"; then MAKEINFO=off elif test ! -e $srcdir/info/emacs; then - as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your + as_fn_error "You do not seem to have makeinfo >= 4.6, and your source tree does not seem to have pre-built manuals in the \`info' directory. Either install a suitable version of makeinfo, or re-run configure with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 @@ -5600,7 +5588,7 @@ if test "x$GCC" = "xyes"; then C_SWITCH_MACHINE="-fno-common" else - as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 + as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 fi else UNEXEC_OBJ=unexalpha.o @@ -5878,7 +5866,7 @@ ## Some platforms don't use any of these files, so it is not ## appropriate to put this test outside the if block. test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 + as_fn_error "crt*.o not found in specified location." "$LINENO" 5 fi @@ -5933,7 +5921,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6124,7 +6113,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$emacs_alsa_subdir" != yes; then - as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 fi ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi @@ -6155,11 +6144,12 @@ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h dirent.h + sys/utsname.h pwd.h utmp.h dirent.h util.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7001,7 +6991,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -7009,7 +6999,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -7145,7 +7135,7 @@ have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -7163,7 +7153,7 @@ @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -7432,7 +7422,7 @@ if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : HAVE_NS=yes else - as_fn_error $? "\`--with-ns' was specified, but the include + as_fn_error "\`--with-ns' was specified, but the include files are missing or cannot be compiled." "$LINENO" 5 fi @@ -7548,7 +7538,7 @@ if test "$HAVE_XSERVER" = true || test -n "$DISPLAY" || test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then - as_fn_error $? "You seem to be running X, but no X development libraries + as_fn_error "You seem to be running X, but no X development libraries were found. You should install the relevant development files for X and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make sure you have development files for image handling, i.e. @@ -7671,7 +7661,8 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7777,7 +7768,6 @@ main () { char *data, *data2, *data3; - const char *cdata2; int i, pagesize; int fd, fd2; @@ -7802,10 +7792,10 @@ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) + data2 = ""; + if (write (fd2, data2, 1) != 1) return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) @@ -8178,7 +8168,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -8459,7 +8450,7 @@ fi if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 fi fi @@ -8565,7 +8556,7 @@ fi if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 fi fi fi @@ -8592,7 +8583,7 @@ if test "${GTK_COMPILES}" != "yes"; then if test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; + as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; fi else HAVE_GTK=yes @@ -8722,7 +8713,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -9087,7 +9079,7 @@ USE_X_TOOLKIT=LUCID LUCID_LIBW=-lXaw elif test x"${USE_X_TOOLKIT}" = xLUCID; then - as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 + as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 $as_echo "no; do not use toolkit by default" >&6; } @@ -10264,7 +10256,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10516,7 +10509,7 @@ MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" if test "X${MISSING}" != X; then - as_fn_error $? "The following required libraries were not found: + as_fn_error "The following required libraries were not found: $MISSING Maybe some development libraries/packages are missing? If you don't want to link with them give @@ -10851,7 +10844,8 @@ for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -10915,7 +10909,7 @@ if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 + as_fn_error "a system implementation of alloca is required " "$LINENO" 5 fi # fmod, logb, and frexp are found in -lm on most systems. @@ -11111,7 +11105,7 @@ if test $ac_cv_prog_liblockfile = yes; then - as_fn_error $? "Shared liblockfile found but can't link against it. + as_fn_error "Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a \`development' package to install containing liblockfile." "$LINENO" 5 fi @@ -11200,7 +11194,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11231,7 +11226,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11283,8 +11279,8 @@ static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -11301,7 +11297,7 @@ instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -11314,14 +11310,16 @@ } static int -mktime_test1 (time_t now) +mktime_test1 (now) + time_t now; { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (time_t now) +mktime_test (now) + time_t now; { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -11345,7 +11343,8 @@ } static int -bigtime_test (int j) +bigtime_test (j) + int j; { struct tm tm; time_t now; @@ -11389,7 +11388,7 @@ instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -11424,7 +11423,7 @@ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv ((char*) tz_strings[i]); + putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -11476,7 +11475,7 @@ # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || - as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 + as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 ac_save_LIBS=$LIBS @@ -12345,7 +12344,7 @@ fi if test "$have_tputs_et_al" != true; then - as_fn_error $? "I couldn't find termcap functions (tputs and friends). + as_fn_error "I couldn't find termcap functions (tputs and friends). Maybe some development libraries/packages are missing? Try installing libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 fi @@ -13492,7 +13491,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13866,14 +13866,14 @@ && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 + as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 fi #### Find out which version of Emacs this is. version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` if test x"${version}" = x; then - as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 + as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 fi if test x"${version}" != x"$PACKAGE_VERSION"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 @@ -14431,7 +14431,6 @@ ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -14593,19 +14592,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -14801,7 +14800,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14855,7 +14854,7 @@ # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14921,10 +14920,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.66, +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14978,7 +14977,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' + as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14987,7 +14986,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' + -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -15055,7 +15054,7 @@ "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15093,7 +15092,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15127,7 +15126,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -15144,7 +15143,7 @@ echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { @@ -15152,18 +15151,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15258,28 +15257,20 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15307,7 +15298,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15392,7 +15383,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15405,7 +15396,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15433,7 +15424,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15460,7 +15451,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15596,22 +15587,22 @@ else $AWK -f "$tmp/subs.awk" | $SHELL fi >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 +which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} +which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15622,19 +15613,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + || as_fn_error "could not create -" "$LINENO" 5 fi ;; @@ -15671,7 +15662,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -15692,7 +15683,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 === modified file 'configure.in' --- configure.in 2010-08-05 17:11:32 +0000 +++ configure.in 2010-08-06 10:12:41 +0000 @@ -1210,7 +1210,7 @@ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h dirent.h) + sys/utsname.h pwd.h utmp.h dirent.h util.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-06 00:44:56 +0000 +++ src/ChangeLog 2010-08-06 10:12:41 +0000 @@ -1,3 +1,66 @@ +2010-08-06 Jan Djärv + + * xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes. + + * window.c: Include menu.h. + + * unexmacosx.c (print_region_list, print_regions) + (build_region_list, find_emacs_zone_regions) + (unexec_regions_merge, read_load_commands, dump_it) + (unexec_init_emacs_zone): Convert to ANSI C prototypes. + + * term.c: Check HAVE_SYS_IOCTL_H. + + * sysdep.c: Check HAVE_TERM_H + + * process.c: Check HAVE_UTIL_H. Include nsterm.h if HAVE_NS. + + * nsterm.m (ns_init_paths, ns_alloc_autorelease_pool) + (ns_ring_bell, ns_defined_color, hide_hourglass) + (x_display_pixel_height, x_display_pixel_width, syms_of_nsterm): + Convert to ANSI C prototypes. + (x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations + before code. + + * nsterm.h : Include sysselect.h. + (x_sync, x_get_focus_frame, x_set_mouse_position) + (x_set_mouse_pixel_position, x_make_frame_visible) + (x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height) + (x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines) + (x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select) + (syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect): + Declare + + * nsmenu.m (popup_activated, name_is_separator) + (syms_of_nsmenu): Convert to ANSI C prototypes. + (runMenuAt): Prototypes and move declarations before code. + + * nsimage.m (ns_load_image): Move NSTRACE after declarations. + + * nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C + prototypes. + + * nsfns.m (have_menus_p, ns_display_info_for_name) + (x_set_cursor_type, ns_appkit_version_str) + (ns_appkit_version_int, ns_do_applescript) + (x_set_scroll_bar_default_width, x_sync, compute_tip_xy) + (syms_of_nsfns): Convert to ANSI C prototypes. + + * menu.h (x_set_menu_bar_line): Declare. + (free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions. + + * lisp.h (fmod_float): Declare. + + * image.c (xpm_scan, xpm_make_color_table_v) + (xpm_put_color_table_v, xpm_get_color_table_v) + (xpm_make_color_table_h, xpm_put_color_table_h) + (xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image) + (xpm_load): Convert to ANSI C prototypes. + + * emacs.c: Include nsterm.h if HAVE_NS. + + * bidi.c (bidi_dump_cached_states): Fix fprintf warning. + 2010-08-06 Dan Nicolaescu * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef === modified file 'src/bidi.c' --- src/bidi.c 2010-07-08 04:55:07 +0000 +++ src/bidi.c 2010-08-06 10:12:41 +0000 @@ -1774,6 +1774,6 @@ fputs ("\n", stderr); fputs ("pos ", stderr); for (i = 0; i < bidi_cache_idx; i++) - fprintf (stderr, "%*d", ndigits, bidi_cache[i].charpos); + fprintf (stderr, "%*ld", ndigits, (long)bidi_cache[i].charpos); fputs ("\n", stderr); } === modified file 'src/config.in' --- src/config.in 2010-07-29 20:01:08 +0000 +++ src/config.in 2010-08-06 10:12:41 +0000 @@ -731,6 +731,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIL_H + /* Define to 1 if you have the `utimes' function. */ #undef HAVE_UTIMES === modified file 'src/emacs.c' --- src/emacs.c 2010-07-27 08:02:44 +0000 +++ src/emacs.c 2010-08-06 10:12:41 +0000 @@ -63,6 +63,10 @@ #include "keyboard.h" #include "keymap.h" +#ifdef HAVE_NS +#include "nsterm.h" +#endif + #ifdef HAVE_SETLOCALE #include #endif === modified file 'src/image.c' --- src/image.c 2010-07-29 05:48:06 +0000 +++ src/image.c 2010-08-06 10:12:41 +0000 @@ -3658,9 +3658,10 @@ length of the corresponding token, respectively. */ static int -xpm_scan (s, end, beg, len) - const unsigned char **s, *end, **beg; - int *len; +xpm_scan (const unsigned char **s, + const unsigned char *end, + const unsigned char **beg, + int *len) { int c; @@ -3724,9 +3725,13 @@ hash table is used. */ static Lisp_Object -xpm_make_color_table_v (put_func, get_func) - void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object); - Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int); +xpm_make_color_table_v (void (**put_func) (Lisp_Object, + const unsigned char *, + int, + Lisp_Object), + Lisp_Object (**get_func) (Lisp_Object, + const unsigned char *, + int)) { *put_func = xpm_put_color_table_v; *get_func = xpm_get_color_table_v; @@ -3734,28 +3739,30 @@ } static void -xpm_put_color_table_v (color_table, chars_start, chars_len, color) - Lisp_Object color_table; - const unsigned char *chars_start; - int chars_len; - Lisp_Object color; +xpm_put_color_table_v (Lisp_Object color_table, + const unsigned char *chars_start, + int chars_len, + Lisp_Object color) { XVECTOR (color_table)->contents[*chars_start] = color; } static Lisp_Object -xpm_get_color_table_v (color_table, chars_start, chars_len) - Lisp_Object color_table; - const unsigned char *chars_start; - int chars_len; +xpm_get_color_table_v (Lisp_Object color_table, + const unsigned char *chars_start, + int chars_len) { return XVECTOR (color_table)->contents[*chars_start]; } static Lisp_Object -xpm_make_color_table_h (put_func, get_func) - void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object); - Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int); +xpm_make_color_table_h (void (**put_func) (Lisp_Object, + const unsigned char *, + int, + Lisp_Object), + Lisp_Object (**get_func) (Lisp_Object, + const unsigned char *, + int)) { *put_func = xpm_put_color_table_h; *get_func = xpm_get_color_table_h; @@ -3766,11 +3773,10 @@ } static void -xpm_put_color_table_h (color_table, chars_start, chars_len, color) - Lisp_Object color_table; - const unsigned char *chars_start; - int chars_len; - Lisp_Object color; +xpm_put_color_table_h (Lisp_Object color_table, + const unsigned char *chars_start, + int chars_len, + Lisp_Object color) { struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); unsigned hash_code; @@ -3781,10 +3787,9 @@ } static Lisp_Object -xpm_get_color_table_h (color_table, chars_start, chars_len) - Lisp_Object color_table; - const unsigned char *chars_start; - int chars_len; +xpm_get_color_table_h (Lisp_Object color_table, + const unsigned char *chars_start, + int chars_len) { struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); int i = hash_lookup (table, make_unibyte_string (chars_start, chars_len), @@ -3804,8 +3809,7 @@ static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"}; static int -xpm_str_to_color_key (s) - const char *s; +xpm_str_to_color_key (const char *s) { int i; @@ -3818,10 +3822,10 @@ } static int -xpm_load_image (f, img, contents, end) - struct frame *f; - struct image *img; - const unsigned char *contents, *end; +xpm_load_image (struct frame *f, + struct image *img, + const unsigned char *contents, + const unsigned char *end) { const unsigned char *s = contents, *beg, *str; unsigned char buffer[BUFSIZ]; @@ -4053,9 +4057,8 @@ } static int -xpm_load (f, img) - struct frame *f; - struct image *img; +xpm_load (struct frame *f, + struct image *img) { int success_p = 0; Lisp_Object file_name; === modified file 'src/lisp.h' --- src/lisp.h 2010-08-05 23:15:24 +0000 +++ src/lisp.h 2010-08-06 10:12:41 +0000 @@ -2548,6 +2548,7 @@ EXFUN (Ftruncate, 2); extern void init_floatfns (void); extern void syms_of_floatfns (void); +extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); /* Defined in fringe.c */ extern void syms_of_fringe (void); === modified file 'src/menu.h' --- src/menu.h 2010-08-06 00:16:24 +0000 +++ src/menu.h 2010-08-06 10:12:41 +0000 @@ -21,13 +21,18 @@ extern Lisp_Object Vmenu_updating_frame; +extern void x_set_menu_bar_lines (struct frame *f, + Lisp_Object value, + Lisp_Object oldval); + extern void init_menu_items (void); extern void finish_menu_items (void); extern void discard_menu_items (void); extern void save_menu_items (void); extern int parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object); extern void list_of_panes (Lisp_Object); -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) \ + || defined (HAVE_NS) extern void free_menubar_widget_value_tree (widget_value *); extern void update_submenu_strings (widget_value *); extern void find_and_call_menu_selection (FRAME_PTR, int, === modified file 'src/nsfns.m' --- src/nsfns.m 2010-07-08 21:25:08 +0000 +++ src/nsfns.m 2010-08-06 10:12:41 +0000 @@ -125,7 +125,7 @@ /* Nonzero if we can use mouse menus. */ int -have_menus_p () +have_menus_p (void) { return NSApp != nil; } @@ -240,8 +240,7 @@ /* Return the X display structure for the display named NAME. Open a new connection if necessary. */ struct ns_display_info * -ns_display_info_for_name (name) - Lisp_Object name; +ns_display_info_for_name (Lisp_Object name) { Lisp_Object names; struct ns_display_info *dpyinfo; @@ -925,9 +924,7 @@ /* This is the same as the xfns.c definition. */ void -x_set_cursor_type (f, arg, oldval) - FRAME_PTR f; - Lisp_Object arg, oldval; +x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); @@ -949,7 +946,7 @@ #define Xstr(x) Str(x) static Lisp_Object -ns_appkit_version_str () +ns_appkit_version_str (void) { char tmp[80]; @@ -968,7 +965,7 @@ have into a single int. For a better picture of the implementation running, use ns_appkit_version_str.*/ static int -ns_appkit_version_int () +ns_appkit_version_int (void) { #ifdef NS_IMPL_GNUSTEP return GNUSTEP_GUI_MAJOR_VERSION * 100 + GNUSTEP_GUI_MINOR_VERSION; @@ -2004,8 +2001,7 @@ string or a number containing the resulting script value. Otherwise, 1 is returned. */ static int -ns_do_applescript (script, result) - Lisp_Object script, *result; +ns_do_applescript (Lisp_Object script, Lisp_Object *result) { NSAppleEventDescriptor *desc; NSDictionary* errorDict; @@ -2108,8 +2104,7 @@ void -x_set_scroll_bar_default_width (f) - struct frame *f; +x_set_scroll_bar_default_width (struct frame *f) { int wid = FRAME_COLUMN_WIDTH (f); FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = NS_SCROLL_BAR_WIDTH_DEFAULT; @@ -2189,7 +2184,7 @@ void -x_sync (Lisp_Object frame) +x_sync (struct frame *f) { /* XXX Not implemented XXX */ return; @@ -2367,11 +2362,14 @@ /* TODO: move to xdisp or similar */ static void -compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) - struct frame *f; - Lisp_Object parms, dx, dy; - int width, height; - int *root_x, *root_y; +compute_tip_xy (struct frame *f, + Lisp_Object parms, + Lisp_Object dx, + Lisp_Object dy, + int width, + int height, + int *root_x, + int *root_y) { Lisp_Object left, top; EmacsView *view = FRAME_NS_VIEW (f); @@ -2595,7 +2593,7 @@ void -syms_of_nsfns () +syms_of_nsfns (void) { int i; === modified file 'src/nsfont.m' --- src/nsfont.m 2010-07-07 22:18:28 +0000 +++ src/nsfont.m 2010-08-06 10:12:41 +0000 @@ -223,7 +223,7 @@ /* Default font entity. */ static Lisp_Object -ns_fallback_entity () +ns_fallback_entity (void) { return ns_descriptor_to_entity ([[NSFont userFixedPitchFontOfSize: 0] fontDescriptor], Qnil, NULL); @@ -1510,7 +1510,7 @@ void -syms_of_nsfont () +syms_of_nsfont (void) { nsfont_driver.type = Qns; register_font_driver (&nsfont_driver, NULL); === modified file 'src/nsimage.m' --- src/nsimage.m 2010-07-07 22:18:28 +0000 +++ src/nsimage.m 2010-08-06 10:12:41 +0000 @@ -83,11 +83,11 @@ ns_load_image (struct frame *f, struct image *img, Lisp_Object spec_file, Lisp_Object spec_data) { - NSTRACE (ns_load_image); - EmacsImage *eImg; NSSize size; + NSTRACE (ns_load_image); + if (NILP (spec_data)) { eImg = [EmacsImage allocInitFromFile: spec_file]; === modified file 'src/nsmenu.m' --- src/nsmenu.m 2010-07-08 21:25:08 +0000 +++ src/nsmenu.m 2010-08-06 10:12:41 +0000 @@ -105,7 +105,7 @@ int -popup_activated () +popup_activated (void) { return popup_activated_flag; } @@ -509,8 +509,7 @@ /* Utility (from macmenu.c): is this item a separator? */ static int -name_is_separator (name) - const char *name; +name_is_separator ( const char *name) { const char *start = name; @@ -737,19 +736,21 @@ keymaps: (int)keymaps { EmacsView *view = FRAME_NS_VIEW (f); + NSEvent *e, *event; + long retVal; + /* p = [view convertPoint:p fromView: nil]; */ p.y = NSHeight ([view frame]) - p.y; - NSEvent *e = [[view window] currentEvent]; - NSEvent *event = [NSEvent mouseEventWithType: NSRightMouseDown - location: p - modifierFlags: 0 - timestamp: [e timestamp] - windowNumber: [[view window] windowNumber] - context: [e context] - eventNumber: 0/*[e eventNumber] */ - clickCount: 1 - pressure: 0]; - long retVal; + e = [[view window] currentEvent]; + event = [NSEvent mouseEventWithType: NSRightMouseDown + location: p + modifierFlags: 0 + timestamp: [e timestamp] + windowNumber: [[view window] windowNumber] + context: [e context] + eventNumber: 0/*[e eventNumber] */ + clickCount: 1 + pressure: 0]; context_menu_value = -1; [NSMenu popUpContextMenu: self withEvent: event forView: view]; @@ -1801,7 +1802,7 @@ ========================================================================== */ void -syms_of_nsmenu () +syms_of_nsmenu (void) { defsubr (&Sx_popup_dialog); defsubr (&Sns_reset_menu); === modified file 'src/nsterm.h' --- src/nsterm.h 2010-07-02 09:26:33 +0000 +++ src/nsterm.h 2010-08-06 10:12:41 +0000 @@ -21,6 +21,7 @@ #include "frame.h" #include "character.h" #include "font.h" +#include "sysselect.h" #ifdef HAVE_NS @@ -712,7 +713,9 @@ extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); extern int -ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, +ns_defined_color (struct frame *f, + const char *name, + XColor *color_def, int alloc, char makeIndex); extern void ns_query_color (void *col, XColor *color_def, int setPixel); @@ -742,10 +745,33 @@ extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header); -/* two more prototypes that should be moved to a more general include file */ +/* More prototypes that should be moved to a more general include file */ extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); extern void x_set_window_size (struct frame *f, int change_grav, int cols, int rows); +extern void x_sync (struct frame *); +extern Lisp_Object x_get_focus_frame (struct frame *); +extern void x_set_mouse_position (struct frame *f, int h, int v); +extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); +extern void x_make_frame_visible (struct frame *f); +extern void x_make_frame_invisible (struct frame *f); +extern void x_iconify_frame (struct frame *f); +extern int x_char_width (struct frame *f); +extern int x_char_height (struct frame *f); +extern int x_pixel_width (struct frame *f); +extern int x_pixel_height (struct frame *f); +extern void x_set_frame_alpha (struct frame *f); +extern void x_set_tool_bar_lines (struct frame *f, + Lisp_Object value, + Lisp_Object oldval); +extern void x_activate_menubar (struct frame *); +extern void free_frame_menubar (struct frame *); + +extern void ns_init_paths (void); +extern void syms_of_nsterm (void); +extern void syms_of_nsfns (void); +extern void syms_of_nsmenu (void); +extern void syms_of_nsselect (void); /* From nsimage.m, needed in image.c */ struct image; @@ -764,6 +790,8 @@ extern int x_display_pixel_width (struct ns_display_info *); /* This in nsterm.m */ +extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); extern unsigned long ns_get_rgb_color (struct frame *f, float r, float g, float b, float a); extern NSPoint last_mouse_motion_position; === modified file 'src/nsterm.m' --- src/nsterm.m 2010-07-10 18:52:53 +0000 +++ src/nsterm.m 2010-08-06 10:12:41 +0000 @@ -296,7 +296,7 @@ void -ns_init_paths () +ns_init_paths (void) /* -------------------------------------------------------------------------- Used to allow emacs to find its resources under Emacs.app Called from emacs.c at startup. @@ -479,7 +479,7 @@ void * -ns_alloc_autorelease_pool () +ns_alloc_autorelease_pool (void) /* -------------------------------------------------------------------------- Allocate a pool for temporary objects (callable from C) -------------------------------------------------------------------------- */ @@ -790,7 +790,7 @@ static void -ns_ring_bell () +ns_ring_bell (struct frame *f) /* -------------------------------------------------------------------------- "Beep" routine -------------------------------------------------------------------------- */ @@ -1186,12 +1186,14 @@ difference between the real width and Emacs' imagined one. For right-hand bars, don't worry about it since the extra is never used. (Obviously doesn't work for vertically split windows tho..) */ - NSPoint origin = FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) - ? NSMakePoint (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) - - NS_SCROLL_BAR_WIDTH (f), 0) - : NSMakePoint (0, 0); - [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; - [view setBoundsOrigin: origin]; + { + NSPoint origin = FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) + ? NSMakePoint (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) + - NS_SCROLL_BAR_WIDTH (f), 0) + : NSMakePoint (0, 0); + [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; + [view setBoundsOrigin: origin]; + } change_frame_size (f, rows, cols, 0, 1, 0); /* pretend, delay, safe */ FRAME_PIXEL_WIDTH (f) = pixelwidth; @@ -1507,7 +1509,10 @@ int -ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, +ns_defined_color (struct frame *f, + const char *name, + XColor *color_def, + int alloc, char makeIndex) /* -------------------------------------------------------------------------- Return 1 if named color found, and set color_def rgb accordingly. @@ -2184,9 +2189,8 @@ int yAdjust = rowY - FRAME_INTERNAL_BORDER_WIDTH (f) < 5 ? -FRAME_INTERNAL_BORDER_WIDTH (f) : 0; int yIncr = FRAME_PIXEL_HEIGHT (f) - (p->by+yAdjust + p->ny) < 5 ? - FRAME_INTERNAL_BORDER_WIDTH (f) : 0; - if (yAdjust) - yIncr += FRAME_INTERNAL_BORDER_WIDTH (f); + FRAME_INTERNAL_BORDER_WIDTH (f) : 0 + + (yAdjust ? FRAME_INTERNAL_BORDER_WIDTH (f) : 0); NSRect r = NSMakeRect (p->bx+xAdjust, p->by+yAdjust, p->nx, p->ny+yIncr); NSRectClip (r); [ns_lookup_indexed_color(face->background, f) set]; @@ -2375,7 +2379,7 @@ void -hide_hourglass () +hide_hourglass (void) { if (!hourglass_shown_p) return; @@ -3406,16 +3410,14 @@ ========================================================================== */ int -x_display_pixel_height (dpyinfo) - struct ns_display_info *dpyinfo; +x_display_pixel_height (struct ns_display_info *dpyinfo) { NSScreen *screen = [NSScreen mainScreen]; return [screen frame].size.height; } int -x_display_pixel_width (dpyinfo) - struct ns_display_info *dpyinfo; +x_display_pixel_width (struct ns_display_info *dpyinfo) { NSScreen *screen = [NSScreen mainScreen]; return [screen frame].size.width; @@ -5743,9 +5745,10 @@ NSTRACE (judge); if (condemned) { + EmacsView *view; BLOCK_INPUT; /* ensure other scrollbar updates after deletion */ - EmacsView *view = (EmacsView *)FRAME_NS_VIEW (frame); + view = (EmacsView *)FRAME_NS_VIEW (frame); if (view != nil) view->scrollbarsNeedingUpdate++; [self removeFromSuperview]; @@ -6122,7 +6125,7 @@ void -syms_of_nsterm () +syms_of_nsterm (void) { NSTRACE (syms_of_nsterm); === modified file 'src/process.c' --- src/process.c 2010-08-06 00:36:12 +0000 +++ src/process.c 2010-08-06 10:12:41 +0000 @@ -89,6 +89,10 @@ #include #endif +#ifdef HAVE_UTIL_H +#include +#endif + #endif /* subprocesses */ #include "lisp.h" @@ -116,7 +120,9 @@ #if defined (USE_GTK) || defined (HAVE_GCONF) #include "xgselect.h" #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ - +#ifdef HAVE_NS +#include "nsterm.h" +#endif extern int timers_run; Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; === modified file 'src/sysdep.c' --- src/sysdep.c 2010-08-05 05:18:55 +0000 +++ src/sysdep.c 2010-08-06 10:12:41 +0000 @@ -33,6 +33,9 @@ #ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_TERM_H +#include +#endif #include "lisp.h" /* Including stdlib.h isn't necessarily enough to get srandom === modified file 'src/term.c' --- src/term.c 2010-08-05 22:23:53 +0000 +++ src/term.c 2010-08-06 10:12:41 +0000 @@ -34,6 +34,9 @@ #if HAVE_TERMIOS_H #include /* For TIOCNOTTY. */ #endif +#ifdef HAVE_SYS_IOCTL_H +#include +#endif #include #include === modified file 'src/unexmacosx.c' --- src/unexmacosx.c 2010-07-07 22:18:28 +0000 +++ src/unexmacosx.c 2010-08-06 10:12:41 +0000 @@ -305,7 +305,7 @@ } static void -print_region_list () +print_region_list (void) { struct region_t *r; @@ -316,7 +316,7 @@ } static void -print_regions () +print_regions (void) { task_t target_task = mach_task_self (); vm_address_t address = (vm_address_t) 0; @@ -346,7 +346,7 @@ cannot be omitted because they some regions created at run time are read-only. */ static void -build_region_list () +build_region_list (void) { task_t target_task = mach_task_self (); vm_address_t address = (vm_address_t) 0; @@ -465,7 +465,7 @@ } static void -find_emacs_zone_regions () +find_emacs_zone_regions (void) { num_unexec_regions = 0; @@ -495,7 +495,7 @@ } static void -unexec_regions_merge () +unexec_regions_merge (void) { int i, n; unexec_region_info r; @@ -627,7 +627,7 @@ the global array lca. Store the total number of load commands in global variable nlc. */ static void -read_load_commands () +read_load_commands (void) { int i; @@ -684,8 +684,8 @@ } } - printf ("Highest address of load commands in input file: %#8x\n", - infile_lc_highest_addr); + printf ("Highest address of load commands in input file: %#8lx\n", + (unsigned long)infile_lc_highest_addr); printf ("Lowest offset of all sections in __TEXT segment: %#8lx\n", text_seg_lowest_offset); @@ -1143,7 +1143,7 @@ /* Loop through all load commands and dump them. Then write the Mach header. */ static void -dump_it () +dump_it (void) { int i; long linkedit_delta = 0; @@ -1253,7 +1253,7 @@ void -unexec_init_emacs_zone () +unexec_init_emacs_zone (void) { emacs_zone = malloc_create_zone (0, 0); malloc_set_zone_name (emacs_zone, "EmacsZone"); === modified file 'src/window.c' --- src/window.c 2010-08-05 23:34:12 +0000 +++ src/window.c 2010-08-06 10:12:41 +0000 @@ -37,6 +37,7 @@ #include "blockinput.h" #include "intervals.h" #include "termhooks.h" /* For FRAME_TERMINAL. */ +#include "menu.h" #ifdef HAVE_X_WINDOWS #include "xterm.h" === modified file 'src/xfaces.c' --- src/xfaces.c 2010-08-05 23:34:12 +0000 +++ src/xfaces.c 2010-08-06 10:12:41 +0000 @@ -742,10 +742,9 @@ /* NS emulation of GCs */ static INLINE GC -x_create_gc (f, mask, xgcv) - struct frame *f; - unsigned long mask; - XGCValues *xgcv; +x_create_gc (struct frame *f, + unsigned long mask, + XGCValues *xgcv) { GC gc = xmalloc (sizeof (*gc)); if (gc) @@ -754,9 +753,7 @@ } static INLINE void -x_free_gc (f, gc) - struct frame *f; - GC gc; +x_free_gc (struct frame *f, GC gc) { xfree (gc); } ------------------------------------------------------------ revno: 100991 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-08-05 21:09:54 -0700 message: emacsclient.c cleanups. * lib-src/emacsclient.c: Move socket related #includes together with the rest of the #includes. Move a WINDOWSNT includes closer together. (HAVE_CONFIG_H): Remove. (NO_RETURN): Remove, defined in config.h. (main): Convert definition to standard C. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-07-29 02:42:53 +0000 +++ lib-src/ChangeLog 2010-08-06 04:09:54 +0000 @@ -1,3 +1,11 @@ +2010-08-06 Dan Nicolaescu + + * emacsclient.c: Move socket related #includes together with the + rest of the #includes. Move a WINDOWSNT includes closer together. + (HAVE_CONFIG_H): Remove. + (NO_RETURN): Remove, defined in config.h. + (main): Convert definition to standard C. + 2010-07-29 Juanma Barranquero * make-docfile.c (write_c_args): Warn for old-style empty arglist (). === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2010-07-25 03:36:54 +0000 +++ lib-src/emacsclient.c 2010-08-06 04:09:54 +0000 @@ -18,9 +18,7 @@ along with GNU Emacs. If not, see . */ -#ifdef HAVE_CONFIG_H #include -#endif #ifdef WINDOWSNT @@ -32,6 +30,8 @@ # include # include # include +# include +# include # define NO_SOCKETS_IN_FILE_SYSTEM @@ -45,8 +45,12 @@ # ifdef HAVE_INET_SOCKETS # include +# ifdef HAVE_SOCKETS +# include +# include +# include +# endif /* HAVE_SOCKETS */ # endif - # include # define INVALID_SOCKET -1 @@ -67,19 +71,15 @@ #include #include "getopt.h" #ifdef HAVE_UNISTD_H -#include +# include #endif -#ifdef WINDOWSNT -# include -#else /* not WINDOWSNT */ -# include -#endif /* not WINDOWSNT */ +#include #include - #include #include + char *getenv (const char *), *getwd (char *); #ifdef HAVE_GETCWD @@ -114,10 +114,6 @@ #define TRUE 1 #endif -#ifndef NO_RETURN -#define NO_RETURN -#endif - /* Additional space when allocating buffers for filenames, etc. */ #define EXTRA_SPACE 100 @@ -702,9 +698,7 @@ #if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS) int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { main_argv = argv; progname = argv[0]; @@ -716,14 +710,6 @@ #else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ -#ifdef WINDOWSNT -# include -#else -# include -# include -# include -#endif - #define AUTH_KEY_LENGTH 64 #define SEND_BUFFER_SIZE 4096 ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.