summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
Commit message (Collapse)AuthorAgeFilesLines
* Rely on <unistd.h> to declare 'environ',Paul Eggert2012-08-191-5/+0
| | | | | | | | | as gnulib does this if the system doesn't. * lib-src/emacsclient.c (environ): Remove decl. * src/callproc.c, src/editfns.c, src/process.c (environ) [!USE_CRT_DLL]: * src/emacs.c (environ) [DOUG_LEA_MALLOC]: * src/vm-limit.c (environ) [ORDINARY_LINK]: Remove decl. * src/vm-limit.c: Include <unistd.h>, for 'environ'.
* Move IF_LINT from lisp.h to conf_post.hGlenn Morris2012-08-101-7/+0
| | | | | | | | * src/conf_post.h (IF_LINT, lint_assume): Move here from lisp.h. * src/lisp.h (IF_LINT, lint_assume): Move to conf_post.h. * lib-src/make-docfile.c (IF_LINT): * lib-src/emacsclient.c (IF_LINT): Remove (in config.h now).
* Move DIRECTORY_SEP from lisp.h to config.hGlenn Morris2012-08-091-16/+2
| | | | | | | | | | | | | * configure.ac (DIRECTORY_SEP): Move here from src/lisp.h. * src/lisp.h (DIRECTORY_SEP): Let configure set it. * nt/config.nt (DIRECTORY_SEP): Move here from src/lisp.h. * lib-src/movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): * lib-src/make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): * lib-src/emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP): Remove (they are in config.h now).
* Assume strerror.Paul Eggert2012-07-101-21/+0
|
* lib-src/emacsclient.c (w32_execvp): Declare execvp to silence the compiler.Juanma Barranquero2012-07-091-0/+1
|
* lib-src/emacsclient.c: Adapt comments to GNU coding standards.Juanma Barranquero2012-07-091-35/+23
|
* Switch from NO_RETURN to C11's _Noreturn.Paul Eggert2012-06-241-4/+3
| | | | Fixes: debbugs:11750
* * emacsclient.c (set_local_socket): Fix a compiler warning.Samuel Bronson2012-06-241-1/+1
| | | | Fixes: debbugs:7838
* lib-src/emacsclient.c (min): Undef before redefining it.Juanma Barranquero2012-05-021-0/+3
|
* * lib-src/emacsclient.c (send_to_emacs): Avoid invalid strcpyJim Meyering2012-05-021-18/+22
| | | | | | upon partial send. Fixes: debbugs:11374
* Fix emacsclient/server behavior under --without-x.Chong Yidong2012-04-201-4/+4
| | | | | | | | | * lib-src/emacsclient.c (main): Send -tty to Emacs under more circumstanced (Bug#8314). * lisp/server.el (server-process-filter): Only try to open a window system frame if compiled with graphical support (Bug#8314). Fixes: debbugs:11102
* Move "emacsclient -t -n" handling from emacsclient.c to server.el.Chong Yidong2012-04-151-21/+12
| | | | | | | | | | | | Fix its buggy logic for the Windows case (regression from 23.4). * lib-src/emacsclient.c (decode_options): Move -t -n corner case handling into server.el. * lisp/server.el (server-process-filter): Handle corner case where both tty and nowait options are present. Fixes: debbugs:11102
* lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Fix typo in ↵Juanma Barranquero2012-04-121-1/+1
| | | | | | 2011-12-04T17:13:01Z!lekktu@gmail.com. Call ttyname instead of passing its address.
* Define -print-nonl client commandAndreas Schwab2012-03-111-0/+8
| | | | | | | | | | * lib-src/emacsclient.c (main): Handle -print-nonl command. * lisp/server.el (server-msg-size): New constant. (server-reply-print): New function. (server-eval-and-print): Use it. (server-eval-at): Use server-quote-arg and server-unquote-arg. Handle -print-nonl.
* * emacsclient.c (main): Handle multiple messages in a singleAndreas Schwab2012-03-111-53/+56
| | | | datagram.
* Don't access freed memory in emacsclientAndreas Schwab2012-03-111-68/+46
| | | | | | | | | | | | | * emacsclient.c (socket_name): Add const. (get_server_config): Add parameter config_file, use it instead of global server_file. (set_tcp_socket): Add parameter local_server_file, pass it down to get_server_config. (set_local_socket): Add parameter local_socket_name, use it instead of global socket_name. (set_socket): Adjust calls to set_local_socket and set_tcp_socket. Don't clobber global server_file or socket_name. (main): No longer reset server_file or socket_name.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Fix emacsclient bug where "-n -c" does not open a new frame on Windows.Juanma Barranquero2011-12-041-8/+16
| | | | | | | | | | | | | * lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0; instead, treat both -c and -t as always requesting a new "tty" frame, and let server.el decide which kind is actually required. Reported by Uwe Siart <usenet@siart.de> in this thread: http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00303.html * lisp/server.el (server-delete-client): On Windows, do not try to delete the only terminal. (server-process-filter): On Windows, treat requests for a tty frame as if they were for a GUI frame if the running server is in GUI mode.
* Fix typo in comment.Chong Yidong2011-11-301-1/+1
|
* * emacsclient.c (main): Condition last change on WINDOWSNT (Bug#10155).Chong Yidong2011-11-301-0/+5
|
* Fix MS-Windows build with MSVC compiler.Eli Zaretskii2011-11-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parts of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>. lib-src/makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS). lib-src/emacsclient.c (main) <environ>: Remove declaration, already pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows. nt/inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs. (UINT64_MAX) [_WIN64]: Fix definition. (uintmax_t, intmax_t): Fix definitions. nt/inc/inttypes.h (strtoumax, strtoimax) [!__MINGW32__]: Provide correct definitions. nt/config.nt (HAVE_DECL_STRTOLL): Define. (va_copy) [_WIN64]: Provide a better definition. src/s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define. (snprintf) [_MSC_VER]: Redirect to _snprintf. (strtoll) [_MSC_VER]: Redirect to _strtoi64. (malloc, free, realloc, calloc): Redirect to e_* only when compiling Emacs. src/lisp.h (GCTYPEBITS): Move before first use. (ALIGN_GCTYPEBITS) [_MSC_VER]: Define. (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in this macro definition. (tzname): Redirect to _tzname for all values of _MSC_VER. Fixes: debbugs:9960
* Spelling fixes.Paul Eggert2011-11-141-1/+1
|
* src/image.c, src/w32*.c, lib-src/emacsclient.c: Silence warnings under -Wall.Juanma Barranquero2011-10-271-2/+2
|
* Integer and memory overflow issues.Paul Eggert2011-08-281-37/+58
| | | | | | | | | | | | | | | | | | | * emacsclient.c (xmalloc): Accept size_t, not unsigned int, to avoid potential buffer overflow issues on typical 64-bit hosts. Return void *, not long *. (get_current_dir_name): Report a failure, instead of looping forever, if buffer size calculation overflows. Treat malloc failures like realloc failures, as that has better behavior and is more consistent. Do not check whether xmalloc returns NULL, as that's not possible. (message): Do not arbitrarily truncate message to 2048 bytes when sending it to stderr; use vfprintf instead. (get_server_config, set_local_socket) (start_daemon_and_retry_set_socket): Do not alloca arbitrarily-large buffers; that's not safe. (get_server_config, set_local_socket): Do not use sprintf when its result might not fit in 'int'. (set_local_socket): Do not assume uid fits in 'int'.
* * lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Avoid tty mode onJason Rumney2011-07-021-0/+8
| | | | | | Windows. Fixes: debbugs:5486
* * lib-src/emacsclient.c (print_help_and_exit): More fixing of previous.Glenn Morris2011-06-251-1/+1
|
* * lib-src/emacsclient.c (print_help_and_exit): Fix previous change.Glenn Morris2011-06-251-1/+2
|
* Minor additions for previous emacsclient change.Glenn Morris2011-06-251-2/+3
| | | | | * lib-src/emacsclient.c (decode_options) <opt>: Add `F:'. (print_help_and_exit): Mention --frame-parameters.
* Allow emacsclient to set parameters of new graphical frames (bug#5864)Andreas Rottmann2011-06-251-0/+16
| | | | | | | | | | | | * lib-src/emacsclient.c (longopts, decode_options, main): Add frame-parameters. * lisp/server.el (server-create-window-system-frame): Add parameters arg. (server-process-filter): Doc fix. Handle frame-parameters. * doc/emacs/misc.texi (emacsclient Options): Mention --frame-parameters. * doc/man/emacsclient.1: Mention --frame-parameters. * etc/NEWS: Mention this.
* * lib-src/emacsclient.c (socket_status): Use constant pointer.Dan Nicolaescu2011-06-011-1/+1
|
* * emacsclient.c (main): Don't use uninitialized var.Paul Eggert2011-04-161-4/+2
| | | | | (IS_ANY_SEP): Remove; unused. (get_current_dir_name): Add an extern decl.
* * emacsclient.c (message): Mark it as a printf-like function.Paul Eggert2011-04-051-0/+1
|
* Remove (RET)SIGTYPE; it is identical to void on all supported systems.Glenn Morris2011-03-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. (AH_BOTTOM): Do not define SIGTYPE. * lib-src/emacsclient.c: Replace SIGTYPE with void. * nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). * src/syssignal.h: Replace RETSIGTYPE with void. * src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c: * src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c: * src/xterm.c: Replace SIGTYPE with void everywhere. * src/s/template.h (SIGTYPE): Remove commented out definition. * src/s/usg5-4-common.h (SIGTYPE): Remove definition. * admin/CPP-DEFINES: Remove SIGTYPE.
* Add --quiet option for emacsclient (bug#663) (tiny change)Drake Wilson2011-03-021-4/+13
| | | | | | | | | * lib-src/emacsclient.c (longopts): Add quiet. (decode_options): Handle q/quiet. (print_help_and_exit): Add q/quiet. (main): Suppress some messages if quiet option is used. * doc/emacs/misc.texi (emacsclient Options): Add q/quiet.
* Fix the MS-Windows build after 2011-02-26T05:54:36Z!eggert@cs.ucla.edu.Eli Zaretskii2011-02-261-6/+23
| | | | | | emacsclient.c (xstrdup) [WINDOWSNT]: Function added back. (w32_getenv): Use xstrdup to return all values in malloc'ed storage.
* * emacsclient.c (IF_LINT): New macro.Paul Eggert2011-02-251-2/+11
| | | | | (set_local_socket, main): Use it to suppress warnings with GCC -Wuninitialized.
* * emacsclient.c (xstrdup): Remove; no longer needed.Paul Eggert2011-02-251-23/+9
| | | | | | | (get_current_dir_name, w32_getenv, get_server_config, find_tty): (set_local_socket, main): Use const char *, not char *, for pointers that are not assigned through.
* * emacsclient.c (main): Avoid dangling 'if'.Paul Eggert2011-02-251-15/+15
|
* * emacsclient.c: Redo local variables to avoid shadowing problems.Paul Eggert2011-02-251-8/+9
| | | | | | (message, socket_status, start_daemon_and_retry_set_socket): Rename locals. (main): Move decl of "i".
* Declare file-scope functions and variables static if not exported.Paul Eggert2011-02-211-24/+24
| | | | | | | | This is more consistent, and is nicer with gcc -Wstrict-prototypes. * ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c: * profile.c, test-distrib.c, update-game-score.c: Declare non-'main' functions and variables to be static. * ebrowse.c: Omit redundant function prototypes.
* * lib-src/emacsclient.c (main): Loop while `recv' return EINTR.Karl Chen2011-02-181-2/+13
|
* * emacsclient.c: conform to C89 pointer rulesPaul Eggert2011-02-041-2/+2
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Merge from mainline.Paul Eggert2011-01-171-2/+0
|\
| * Nuke arch-tags.Glenn Morris2011-01-151-2/+0
| |
* | Merge from mainline.Paul Eggert2011-01-141-1/+1
|\ \ | |/
| * Merge from emacs-23Stefan Monnier2011-01-141-1/+1
| |\
| | * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| | |
* | | Include <unistd.h> unilaterally.Paul Eggert2011-01-091-3/+1
| | |
* | | Include <getopt.h> not "getopt.h".Paul Eggert2011-01-091-1/+1
|/ / | | | | | | | | | | * ebrowse.c, emacsclient.c: Include <getopt.h>, not "getopt.h". Since getopt.h is no longer in this directory, there's no point using the form with double-quotes.