Wolfgang Schnerring
3ecb8d931a
* emacsclient.c (main): Return EXIT_FAILURE if Emacs sends us an error string
...
(Bug#6963).
2010-10-02 20:00:01 -04:00
Juanma Barranquero
968ef9b4da
lisp/server.el: Use just one way to pass the Emacs PID to emacsclient.
...
* lib-src/emacsclient.c (get_server_config): Don't read Emacs pid from
the authentication file.
* lisp/server.el (server-start): Don't write pid to the authentication file.
(server-create-tty-frame): Don't send pid.
(server-process-filter): Send pid at the start of every connection.
2010-09-30 04:53:26 +02:00
Juanma Barranquero
6ab88e02c9
* emacsclient.c (main): Remove unused variables.
...
(start_daemon_and_retry_set_socket): Use EXIT_FAILURE.
2010-09-29 10:18:40 +02:00
Jan D
988e88ab11
Fix warnings produced by compiling with -Wwrite_strings (i.e. use const char *).
...
* b2m.c (concat, fatal): Use const char*.
(main): Don't assign labels a string literal.
* ebrowse.c (struct member): filename, def_filename is const.
(struct sym): filename, sfilename is const.
(struct kw): name is const.
(add_sym, yyerror, token_string, insert_keyword, main): Use const char*.
* emacsclient.c (message, sock_err_message, send_to_emacs)
(quote_argument, set_local_socket)
(start_daemon_and_retry_set_socket): Use const char*.
* etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes)
(Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes)
(Cplusplus_help, Cjava_suffixes, Cobol_suffixes, Cstar_suffixes)
(Erlang_suffixes, Erlang_help, Forth_suffixes, Forth_help)
(Fortran_suffixes, Fortran_help, HTML_suffixes, HTML_help)
(Lisp_suffixes, Lisp_help, Lua_suffixes, Lua_help)
(Makefile_filenames, Makefile_help, Objc_suffixes, Objc_help)
(Pascal_suffixes, Pascal_help, Perl_suffixes, Perl_interpreters)
(Perl_help, PHP_suffixes, PHP_help, plain_C_suffixses, PS_suffixes)
(PS_help, Prolog_suffixes, Prolog_help, Python_suffixes, Python_help)
(Scheme_suffixes, Scheme_help, TeX_suffixes, TeX_help, Texinfo_suffixes)
(Texinfo_help, Yacc_suffixes, Yacc_help, auto_help, none_help)
(no_lang_help, print_language_names)
(get_language_from_interpreter, get_language_from_filename)
(init, make_tag, struct C_stab_entry, write_classname, TEX_defenv)
(TEX_decode_env, nocase_tail, savestr, savenstr, fatal, pfatal)
(concat): Use const char*.
* make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use
const char *.
* movemail.c (fatal, error, concat): Use const char *.
* pop.c (pop_multi_first, socket_connection, sendline): Use conat char*.
* pop.h (pop_multi_first): Use const char *.
(_ARGS): Remove.
* sorted-doc.c (error, fatal, states): Use const char *.
* update-game-score.c (get_prefix, write_scores, main): Use const char*.
2010-08-11 10:20:34 +02:00
Dan Nicolaescu
0613f5d515
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.
2010-08-05 21:09:54 -07:00
Juanma Barranquero
35a7804dae
* emacsclient.c (getcwd): Fix previous change.
...
Make getcwd conditional on HAVE_GETCWD and declare with the
correct POSIX profile (for some reason MinGW headers define
its 2nd arg as int, not size_t; but getcwd is not used on
Windows nonetheless).
2010-07-25 05:36:54 +02:00
Juanma Barranquero
361358ea12
Make building under stricter warning flags somewhat cleaner.
...
Flags used: -Wold-style-declaration -Wunused-function -Wstrict-prototypes
* lib-src/emacsclient.c (getcwd, w32_getenv):
* lib-src/ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes.
* nt/runemacs.c (set_user_model_id): Fix prototype.
* src/callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
* src/dired.c (opendir, readdir): Fix prototypes.
* src/editfns.c (w32_get_internal_run_time): Fix prototypes.
* src/keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
* src/ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
(telldir): Remove declaration.
* src/ralloc.c (real_morecore, __morecore): Fix prototypes.
* src/sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
* src/syssignal.h (strsignal): Fix prototype.
* src/term.c (tparam): Fix prototype.
(term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
(term_get_fkeys): Set inside "#ifndef DOS_NT".
* src/vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
and __morecore.
* src/w32gui.h (XParseGeometry): Fix prototype.
* src/w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
* src/w32term.c (my_set_focus): Declare inside #if 0.
* src/w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
(w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
(drain_message_queue, get_next_msg, post_msg, parse_button)
(ClipboardSequence_Proc): Fix prototypes.
(wait_for_sync): Remove declaration.
2010-07-25 02:20:51 +02:00
Dan Nicolaescu
68441b90e9
Add NO_RETURN specifiers to functions in lib-src.
...
* lib-src/update-game-score.c (usage): Add NO_RETURN specifier.
* lib-src/movemail.c (fatal, pfatal_with_name, pfatal_and_delete):
* lib-src/make-docfile.c (fatal):
* lib-src/hexl.c (usage):
* lib-src/fakemail.c (fatal):
* lib-src/etags.c (fatal, suggest_asking_for_help, pfatal):
* lib-src/emacsclient.c (fatal):
* lib-src/b2m.c (fatal): Likewise.
2010-07-24 10:18:18 -07:00
Juanma Barranquero
7c3320d8b9
Convert some more functions to standard C.
...
* lib-src/emacsclient.c (get_current_dir_name, w32_get_resource)
(w32_getenv, w32_set_user_model_id, w32_window_app, w32_execvp)
(close_winsock, initialize_sockets, w32_find_emacs_process)
(w32_give_focus):
* lib-src/ntlib.c (getlogin, getuid, getgid, getegid):
* nt/addpm.c (add_registry, main):
* nt/cmdproxy.c (get_env_size):
* nt/ddeclient.c (main):
* nt/runemacs.c (set_user_model_id):
* src/alloc.c (emacs_blocked_free, emacs_blocked_malloc)
(emacs_blocked_realloc, uninterrupt_malloc):
* src/fringe.c (w32_reset_fringes):
* src/image.c (convert_mono_to_color_image, lookup_rgb_color)
(init_color_table, XPutPixel, jpeg_resync_to_restart_wrapper):
* src/sound.c (be2hs, do_play_sound):
* src/vm-limit.c (get_lim_data, ret_lim_data):
* src/w32term.c (x_free_frame_resources):
* src/xfaces.c (x_create_gc, x_free_gc):
Convert definitions to standard C.
2010-07-20 22:21:03 +02:00
Andreas Schwab
8966b7575b
Use strchr, strrchr instead of index, rindex
...
* callint.c (Fcall_interactively): Use strchr, strrchr instead of
index, rindex.
* doc.c (get_doc_string, Fsnarf_documentation): Likewise.
* editfns.c (Fuser_full_name, Fformat): Likewise.
* emacs.c (argmatch, sort_args, decode_env_path): Likewise.
* fileio.c (Ffile_symlink_p): Likewise.
* filelock.c (current_lock_owner): Likewise.
* font.c (font_parse_name, font_parse_family_registry): Likewise.
* fontset.c (fontset_pattern_regexp): Likewise.
* lread.c (read1): Likewise.
* sysdep.c (init_system_name): Likewise.
* xfns.c (select_visual): Likewise.
* s/hpux10-20.h (index, rindex): Don't define.
* s/ms-w32.h (index): Likewise.
* s/usg5-4.h: Likewise.
* sed2v2.inp (HAVE_INDEX, HAVE_RINDEX): Don't edit.
(HAVE_STRCHR, HAVE_STRRCHR): Edit to 1.
* emacsclient.c (set_local_socket): Use strchr, strrchr instead of
index, rindex.
* movemail.c (mail_spool_name, popmail): Likewise.
* pop.c (pop_list): Likewise.
* CPP-DEFINES (HAVE_INDEX, HAVE_RINDEX): Remove.
* configure.in: Don't check for index and rindex, check for strchr
and strrchr. Define strchr and strrchr as index and rindex,
resp., in src/config.h if not available.
2010-07-11 12:31:10 +02:00
Juanma Barranquero
3a35a84c93
Fix prototypes.
...
* src/cm.c (evalcost): Fix arg type.
* src/cm.h (evalcost): Fix prototype.
* src/lisp.h (memory_warnings): Fix prototype.
* lib-src/ebrowse.c (match_qualified_namespace_alias):
Pass sym* to find_namespace, not link*.
* lib-src/emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
* lib-src/sorted-doc.c (qsort_compare): New typedef.
(main): Use it to cast cmpdoc.
2010-07-03 09:44:17 +02:00
Dan Nicolaescu
873fbd0b84
Convert function definitions to standard C.
...
* lib-src/update-game-score.c: Convert function definitions to standard C.
* lib-src/sorted-doc.c:
* lib-src/profile.c:
* lib-src/pop.c:
* lib-src/movemail.c:
* lib-src/make-docfile.c:
* lib-src/hexl.c:
* lib-src/fakemail.c:
* lib-src/etags.c:
* lib-src/ebrowse.c:
* lib-src/digest-doc.c:
* lib-src/b2m.c: Likewise.
2010-07-02 17:50:23 -07:00
Chong Yidong
0191e222e3
Add --parent-id argument to emacsclient.
...
* lib-src/emacsclient.c (longopts, decode_options, print_help_and_exit):
New arg `-parent-id'.
(main): Send parent-id to Emacs.
* lisp/server.el (server-process-filter): Receive parent-id argument
from emacsclient.
(server-create-window-system-frame): New arg. Pass parent-id as
frame parameter.
2010-05-29 19:50:47 -04:00
Dan Nicolaescu
42a2c62292
Remove extern errno declarations.
...
* xterm.c:
* xrdb.c:
* w32term.c:
* unexec.c:
* unexaix.c:
* sysdep.c:
* process.c:
* lread.c:
* keyboard.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c (main):
* ecrt0.c:
* dispnew.c:
* callproc.c:
* buffer.c: Remove errno extern declarations.
* s/netbsd.h (NEED_ERRNO): Remove.
* movemail.c:
* etags.c:
* emacsclient.c: Remove extern errno declarations.
2010-04-01 20:10:33 -07:00
Juanma Barranquero
768c0c0f39
Fix typos in comments and ChangeLogs.
2010-01-13 16:38:28 +01:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Glenn Morris
5f54cae6cc
(print_help_and_exit): Fix bug report instructions.
2009-10-15 06:11:57 +00:00
Jason Rumney
0a3472c7b9
* w32term.c (w32_initialize): Use standard types.
...
* runemacs.c (set_user_model_id): Use standard types.
* emacsclient.c (w32_set_user_model_id): Use standard types.
2009-07-03 15:32:02 +00:00
Jason Rumney
ff90fbdecc
bug#1849 - Windows 7 Taskbar Support
...
* w32term.c (w32_initialize): Use GetModuleHandle for library that
is already loaded.
Set user model ID if supported (bug#1849).
* runemacs.c (set_user_model_id): New function.
(WinMain): Use it.
* emacsclient.c (w32_give_focus): Use GetModuleHandle for library
that is already loaded.
(w32_set_user_model_id): New function.
(main): Use it to associate emacsclient with emacs (bug#1849).
2009-06-30 15:48:23 +00:00
Juanma Barranquero
9dfda22f23
* emacsclient.c (print_help_and_exit): Fix typo and tabify (careful
...
spacing is required in the message output, as the comment suggests).
2009-04-20 03:19:19 +00:00
Chong Yidong
24d5010d9f
* emacsclient.c (print_help_and_exit): Clarify argument placement
...
for short option names.
2009-04-20 02:52:56 +00:00
Dan Nicolaescu
6133a1a9b7
(print_help_and_exit): Fix typo.
2009-04-02 19:43:27 +00:00
Juanma Barranquero
6cde1b2138
* emacsclient.c (main): Revert part of last change,
...
so drive-relative file names again work on Windows.
2009-03-11 00:57:03 +00:00
Stefan Monnier
ba528748a1
* server.el (server-process-filter): Use expand-file-name rather than
...
command-line-normalize-file-name so as to use the `dir' when provided.
* emacsclient.c (main): Always pass cwd via "-dir". Pass the file
names without prepending cwd to them, so Emacs uses its customary
rules to determine how to interpret the file name.
2009-03-10 14:08:52 +00:00
Adrian Robert
e7534fc4ed
* emacsclient.c (decode_options): Use a dummy display name under NS/Cocoa.
2009-01-23 09:08:03 +00:00
Glenn Morris
f5d0ac07d6
Add 2009 to copyright years.
2009-01-08 03:38:51 +00:00
Dan Nicolaescu
fd95644b93
* emacs.c (main): Print and error and exit when no data is read
...
from the pipe.
* startup.el (command-line): Do not mention the server name in
case the user has not mentioned it, print a more explicit message.
* emacsclient.c (start_daemon_and_retry_set_socket): Improve error
checking.
2008-12-18 08:48:26 +00:00
Dan Nicolaescu
67c1df0180
Include syswait.h instead of sys/types.h.
2008-12-14 03:23:43 +00:00
Dan Nicolaescu
5445ab06ef
(WCONTINUED): New compatibility define for older systems.
2008-12-11 17:32:44 +00:00
Dan Nicolaescu
d50299d55d
(main): Fix previous change.
2008-12-10 23:36:03 +00:00
Juanma Barranquero
5201664703
* emacsclient.c (main): Fix mindless breakage where emacsclient
...
does not work *at all* on Windows, even if it *can* connect.
2008-12-10 22:18:21 +00:00
Dan Nicolaescu
45ce457074
(main): Fail in case of not being able to connect.
2008-12-10 15:24:22 +00:00
Dan Nicolaescu
69157c9960
(decode_options): Fix typo.
2008-12-10 15:07:56 +00:00
Dan Nicolaescu
802bdb3c6b
(EMACS_DAEMON): Remove definition.
...
(decode_options): Do not allow an empty alternate_editor on
WINDOWSNT.
(print_help_and_exit): Replace EMACS_DAEMON with WINDOWSNT.
(start_daemon_and_retry_set_socket): Likewise.
2008-12-10 14:57:20 +00:00
Juanma Barranquero
c3f995a2cb
* emacsclient.c [!WINDOWSNT] (EMACS_DAEMON): New define.
...
Changes when EMACS_DAEMON is not defined:
(print_help_and_exit): Don't add daemon information to help.
(start_daemon_and_retry_set_socket): Make a no-op.
(main): Don't set `start_daemon_if_needed' (which is initialized to 0).
2008-12-10 09:47:06 +00:00
Dan Nicolaescu
636b507bcc
* misc.texi (emacsclient Options): Describe what an empty string
...
argument does for --alternate-editor.
* emacsclient.1: Describe what an empty string argument does for
--alternate-editor.
* emacsclient.c (print_help_and_exit): Describe what an empty
string argument does for --alternate-editor.
(set_socket): Make it possible to not exit in case of an error.
(start_daemon_and_retry_set_socket): New function.
(main): Use it. Restore the NULL value for socket_name and
server_file after the set_socket call.
2008-12-10 07:56:51 +00:00
Dan Nicolaescu
18d2ad2920
Fix typo in include.
2008-12-03 04:33:44 +00:00
Dan Nicolaescu
448d408588
Include <darpa/inet.h>.
2008-12-03 03:37:37 +00:00
Chong Yidong
a336ee5bc0
Fix last change.
2008-11-02 23:16:33 +00:00
Chong Yidong
273b902863
(window_system): Delete redundant variable.
...
(decode_options): Don't use it.
(find_tty): New function.
(main): Use find_tty, and don't use window_system.
2008-11-02 21:41:57 +00:00
Eli Zaretskii
d41784eef4
(main) [WINDOWSNT]: Don't ifdef away the call to `ttyname'.
...
(w32_getenv): Treat $TERM specially: if not found in the environment and in
the Registry, return "w32console".
(ttyname) [WINDOWSNT]: New function.
2008-11-01 13:49:23 +00:00
Andreas Schwab
322ca65006
(main): Don't force sending tty when in eval mode.
2008-10-31 23:17:13 +00:00
Chong Yidong
8536c0f5c5
(main): If using the current frame, send tty information to Emacs in
...
case daemon mode needs to occupy this tty.
2008-10-30 15:54:38 +00:00
Juanma Barranquero
bc558f3edb
* emacsclient.c (EXTRA_SPACE): New macro.
...
(get_server_config, set_local_socket): Use it.
2008-10-29 15:34:06 +00:00
Juanma Barranquero
f77b11a051
* server.el, emacsclient.c: Use TMPDIR (default /tmp) instead of hardcoded /tmp.
2008-10-29 10:42:31 +00:00
Dan Nicolaescu
dc1cd5f755
(longopts, print_help_and_exit): Add -nw.
...
(decode_options): Use getopt_long_only.
2008-10-13 02:32:51 +00:00
Eli Zaretskii
c966fd27a1
(main): Fix a typo in a comment.
2008-09-19 16:45:12 +00:00
Chong Yidong
d5dabcb513
(main): Use stdout rather than stdin to obtain the terminal (bug#427).
2008-09-19 15:50:24 +00:00
Dan Nicolaescu
7c2fb837ec
* bitmaps/README:
...
* xfns.c:
* termcap.c:
* term.c:
* syswait.h:
* systty.h:
* systime.h:
* syssignal.h:
* sysdep.c:
* process.h:
* process.c:
* print.c:
* ndir.h:
* lread.c:
* keyboard.c:
* getpagesize.h:
* floatfns.c:
* fileio.c:
* emacs.c:
* doc.c:
* dispnew.c:
* dired.c:
* data.c:
* callproc.c:
* buffer.c:
* README:
* Makefile.in:
* s/template.h:
* s/msdos.h:
* m/vax.h: Remove VMS support.
* s/vms.h:
* vlimit.h:
* uaf.h:
* temacs.opt:
* param.h:
* ioctl.h: Remove file.
* descrip.mms:
* compile.com: Remove file.
* Create.c: Remove VMS support.
* message.el (Module):
* gnus-start.el (Module):
* gnus-registry.el (Module):
* textmodes/texinfmt.el:
* nxml/nxml-enc.el:
* mail/feedmail.el:
* international/mule.el:
* international/latexenc.el:
* emulation/viper-util.el:
* emulation/viper-init.el:
* emulation/viper-ex.el:
* emacs-lisp/bytecomp.el:
* version.el:
* subr.el:
* startup.el:
* sort.el:
* shadowfile.el:
* recentf.el:
* printing.el:
* paths.el:
* minibuffer.el:
* ls-lisp.el:
* loadup.el:
* hippie-exp.el:
* finder.el:
* files.el:
* ediff-util.el:
* ediff-ptch.el:
* ediff-init.el:
* ediff-diff.el:
* dired.el:
* dired-aux.el:
* cus-edit.el:
* bindings.el:
* arc-mode.el:
* add-log.el: Remove VMS support.
* obsolete/vmsproc.el:
* obsolete/vms-pmail.el:
* obsolete/vms-patch.el: Remove file.
* etags.c:
* emacsclient.c: Remove VMS support.
* termcap.src: Remove file.
* README:
* PROBLEMS:
* MACHINES: Remove VMS info.
* ediff.texi: Remove VMS support.
* os.texi:
* intro.texi:
* files.texi: Remove VMS support.
* emacs.texi: Remove VMS support.
* make-dist:
* README: Remove VMS support.
* vms: Remove directory.
2008-07-31 05:33:56 +00:00
Dan Nicolaescu
9e2a264775
Remove support for Mac Carbon.
...
* mactoolbox.c:
* macterm.h:
* macterm.c:
* macselect.c:
* macmenu.c:
* macgui.h:
* macfns.c:
* mac.c: Remove file.
* s/darwin.h:
* m/intel386.h:
* xfaces.c:
* xdisp.c:
* window.c:
* tparam.c:
* termhooks.h:
* termcap.c:
* term.c:
* syssignal.h:
* sysselect.h:
* sysdep.c:
* process.c:
* lread.c:
* lisp.h:
* keyboard.c:
* image.c:
* fringe.c:
* frame.h:
* frame.c:
* fontset.c:
* font.h:
* font.c:
* fns.c:
* fileio.c:
* emacs.c:
* dispnew.c:
* dispextern.h:
* config.in:
* atimer.c:
* Makefile.in: Remove code for Carbon
* erc.el: Remove code for Carbon.
Remove support for Mac Carbon.
* term/mac-win.el: Remove file
* international/mule-cmds.el:
* version.el:
* startup.el:
* simple.el:
* mwheel.el:
* mouse.el:
* loadup.el:
* isearch.el:
* info.el:
* frame.el:
* faces.el:
* disp-table.el:
* cus-start.el:
* cus-face.el:
* cus-edit.el:
* Makefile.in: Remove code for Carbon.
Remove support for Mac Carbon.
* makefile.w32-in:
* emacsclient.c: Remove code for Carbon.
* PROBLEMS:
* MACHINES: Remove mentions of Mac Carbon.
* ns-emacs.texi:
* faq.texi: Remove mentions of Mac Carbon.
* os.texi:
* frames.texi:
* display.texi: Remove mentions of Mac Carbon.
* xresources.texi: Remove mentions of Mac Carbon.
* make-tarball.txt:
* admin.el:
* FOR-RELEASE:
* CPP-DEFINES: Remove mentions of Mac Carbon.
Remove support for Mac Carbon.
* mac: Remove directory.
* make-dist:
* configure.in:
* README:
* Makefile.in:
* INSTALL: Remove code for Carbon.
* configure: Regenerate.
2008-07-27 18:24:48 +00:00