summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Merge from emacs-23Stefan Monnier2010-11-171-0/+3
|\|
| * Add fall-back definition of _CS_DARWIN_USER_TEMP_DIR (fix last failed check-in).YAMAMOTO Mitsuharu2010-11-101-0/+3
| |
* | Merge changes from emacs-23 branch.Juanma Barranquero2010-10-081-1/+12
|\|
| * Close bug#3992.Glenn Morris2010-09-301-1/+12
| | | | | | | | | | * lib-src/emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back DARWIN_USER_TEMP_DIR.
* | Fix compilation warnings.Dan Nicolaescu2010-10-031-9/+7
| | | | | | | | | | | | | | | | | | | | * lib-src/test-distrib.c (cool_read): * lib-src/movemail.c (main, concat): * lib-src/make-docfile.c (scan_file, write_c_args): * emacsclient.c (get_server_config): Fix -Wconversion warning. (egetenv): Move conditional definition earlier. (progname): Use const. * lib-src/sorted-doc.c (xstrdup): Use const.
* | * emacsclient.c (main): Return EXIT_FAILURE if Emacs sends us an error stringWolfgang Schnerring2010-10-021-3/+10
| | | | | | | | (Bug#6963).
* | lisp/server.el: Use just one way to pass the Emacs PID to emacsclient.Juanma Barranquero2010-09-301-10/+3
| | | | | | | | | | | | | | | | | | * 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.
* | * emacsclient.c (main): Remove unused variables.Juanma Barranquero2010-09-291-3/+1
| | | | | | | | (start_daemon_and_retry_set_socket): Use EXIT_FAILURE.
* | Fix warnings produced by compiling with -Wwrite_strings (i.e. use const char *).Jan D2010-08-111-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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*.
* | emacsclient.c cleanups.Dan Nicolaescu2010-08-051-25/+11
| | | | | | | | | | | | | | | | * 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.
* | * emacsclient.c (getcwd): Fix previous change.Juanma Barranquero2010-07-251-1/+3
| | | | | | | | | | | | | | 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).
* | Make building under stricter warning flags somewhat cleaner.Juanma Barranquero2010-07-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add NO_RETURN specifiers to functions in lib-src.Dan Nicolaescu2010-07-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Convert some more functions to standard C.Juanma Barranquero2010-07-201-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Use strchr, strrchr instead of index, rindexAndreas Schwab2010-07-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Fix prototypes.Juanma Barranquero2010-07-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Convert function definitions to standard C.Dan Nicolaescu2010-07-021-31/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Add --parent-id argument to emacsclient.Chong Yidong2010-05-291-1/+18
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Remove extern errno declarations.Dan Nicolaescu2010-04-011-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix typos in comments and ChangeLogs.Juanma Barranquero2010-01-131-1/+1
|
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|