aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorTom Tromey2013-07-12 18:44:13 -0600
committerTom Tromey2013-07-12 18:44:13 -0600
commitb34a529f177a6ea32da5cb1254f91bf9d71838db (patch)
tree477131abc15d3107b30b635223d87a22550b480b /lib-src
parente6f63071a3f7721f55220514b6d9a8ee8c1232d8 (diff)
parent5e301d7651c0691bb2bc7f3fbe711fdbe26ac471 (diff)
downloademacs-b34a529f177a6ea32da5cb1254f91bf9d71838db.tar.gz
emacs-b34a529f177a6ea32da5cb1254f91bf9d71838db.zip
Merge from trunk
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog18
-rw-r--r--lib-src/ebrowse.c12
-rw-r--r--lib-src/emacsclient.c11
-rw-r--r--lib-src/make-docfile.c2
4 files changed, 34 insertions, 9 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 4a43a741e54..f41c23df5d2 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,15 @@
12013-07-10 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port to C89.
4 * ebrowse.c (USAGE): Remove macro with too-long string literal ...
5 (usage_message): ... and replace it with this new static constant
6 containing multiple literals. All uses changed.
7 * emacsclient.c (print_help_and_exit):
8 Rewrite to avoid string literals longer than the C89 limits.
9 (start_daemon_and_retry_set_socket):
10 Rewrite to avoid non-constant array initializer.
11 * make-docfile.c (enum global_type): Omit trailing comma.
12
12013-07-02 Paul Eggert <eggert@cs.ucla.edu> 132013-07-02 Paul Eggert <eggert@cs.ucla.edu>
2 14
3 Prefer plain 'static' to 'static inline' (Bug#12541). 15 Prefer plain 'static' to 'static inline' (Bug#12541).
@@ -6134,7 +6146,7 @@
6134 6146
61351995-06-13 Geoff Voelker <voelker@cs.washington.edu> 61471995-06-13 Geoff Voelker <voelker@cs.washington.edu>
6136 6148
6137 * etags.c (process_file,absolute_filename): Handle filenames 6149 * etags.c (process_file, absolute_filename): Handle filenames
6138 starting with a drive letter. 6150 starting with a drive letter.
6139 6151
6140 * makefile.nt (install): Copy wakeup.exe properly. 6152 * makefile.nt (install): Copy wakeup.exe properly.
@@ -6161,12 +6173,12 @@
61611995-05-25 Geoff Voelker <voelker@cs.washington.edu> 61731995-05-25 Geoff Voelker <voelker@cs.washington.edu>
6162 6174
6163 * makefile.nt (LIBS): Use BASE_LIBS. 6175 * makefile.nt (LIBS): Use BASE_LIBS.
6164 (make-docfile.exe,hexl.exe,wakeup.exe,etags.exe): Don't depend 6176 (make-docfile.exe, hexl.exe, wakeup.exe, etags.exe): Don't depend
6165 upon LIBS. 6177 upon LIBS.
6166 (DOC): Use del instead of rm. 6178 (DOC): Use del instead of rm.
6167 (DOC) [WINDOWS95]: Use DOC. 6179 (DOC) [WINDOWS95]: Use DOC.
6168 (clean): Handle MSVC aux files. 6180 (clean): Handle MSVC aux files.
6169 (config.h,paths.h): Use $(CP) instead of cp. 6181 (config.h, paths.h): Use $(CP) instead of cp.
6170 (config.h): Use $(CONFIG_H) 6182 (config.h): Use $(CONFIG_H)
6171 (make-docfile.obj): Depend upon config.h. 6183 (make-docfile.obj): Depend upon config.h.
6172 Clean up comments. 6184 Clean up comments.
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 407f769afc8..216865c3800 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -3481,7 +3481,9 @@ open_file (char *file)
3481 3481
3482/* Display usage information and exit program. */ 3482/* Display usage information and exit program. */
3483 3483
3484#define USAGE "\ 3484static char const *const usage_message[] =
3485 {
3486 "\
3485Usage: ebrowse [options] {files}\n\ 3487Usage: ebrowse [options] {files}\n\
3486\n\ 3488\n\
3487 -a, --append append output to existing file\n\ 3489 -a, --append append output to existing file\n\
@@ -3489,6 +3491,8 @@ Usage: ebrowse [options] {files}\n\
3489 -I, --search-path=LIST set search path for input files\n\ 3491 -I, --search-path=LIST set search path for input files\n\
3490 -m, --min-regexp-length=N set minimum regexp length to N\n\ 3492 -m, --min-regexp-length=N set minimum regexp length to N\n\
3491 -M, --max-regexp-length=N set maximum regexp length to N\n\ 3493 -M, --max-regexp-length=N set maximum regexp length to N\n\
3494",
3495 "\
3492 -n, --no-nested-classes exclude nested classes\n\ 3496 -n, --no-nested-classes exclude nested classes\n\
3493 -o, --output-file=FILE set output file name to FILE\n\ 3497 -o, --output-file=FILE set output file name to FILE\n\
3494 -p, --position-info print info about position in file\n\ 3498 -p, --position-info print info about position in file\n\
@@ -3498,12 +3502,16 @@ Usage: ebrowse [options] {files}\n\
3498 -x, --no-regexps don't record regular expressions\n\ 3502 -x, --no-regexps don't record regular expressions\n\
3499 --help display this help\n\ 3503 --help display this help\n\
3500 --version display version info\n\ 3504 --version display version info\n\
3505\n\
3501" 3506"
3507 };
3502 3508
3503static _Noreturn void 3509static _Noreturn void
3504usage (int error) 3510usage (int error)
3505{ 3511{
3506 puts (USAGE); 3512 int i;
3513 for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++)
3514 fputs (usage_message[i], stdout);
3507 exit (error ? EXIT_FAILURE : EXIT_SUCCESS); 3515 exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
3508} 3516}
3509 3517
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 898e8d69b07..74ccfa26259 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -630,7 +630,7 @@ print_help_and_exit (void)
630 Please try to preserve them; otherwise the output is very hard to read 630 Please try to preserve them; otherwise the output is very hard to read
631 when using emacsclientw. */ 631 when using emacsclientw. */
632 message (FALSE, 632 message (FALSE,
633 "Usage: %s [OPTIONS] FILE...\n\ 633 "Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\
634Tell the Emacs server to visit the specified files.\n\ 634Tell the Emacs server to visit the specified files.\n\
635Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ 635Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
636\n\ 636\n\
@@ -640,6 +640,7 @@ The following OPTIONS are accepted:\n\
640-nw, -t, --tty Open a new Emacs frame on the current terminal\n\ 640-nw, -t, --tty Open a new Emacs frame on the current terminal\n\
641-c, --create-frame Create a new frame instead of trying to\n\ 641-c, --create-frame Create a new frame instead of trying to\n\
642 use the current Emacs frame\n\ 642 use the current Emacs frame\n\
643", "\
643-F ALIST, --frame-parameters=ALIST\n\ 644-F ALIST, --frame-parameters=ALIST\n\
644 Set the parameters of a new frame\n\ 645 Set the parameters of a new frame\n\
645-e, --eval Evaluate the FILE arguments as ELisp expressions\n\ 646-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
@@ -647,6 +648,7 @@ The following OPTIONS are accepted:\n\
647-q, --quiet Don't display messages on success\n\ 648-q, --quiet Don't display messages on success\n\
648-d DISPLAY, --display=DISPLAY\n\ 649-d DISPLAY, --display=DISPLAY\n\
649 Visit the file in the given display\n\ 650 Visit the file in the given display\n\
651", "\
650--parent-id=ID Open in parent window ID, via XEmbed\n" 652--parent-id=ID Open in parent window ID, via XEmbed\n"
651#ifndef NO_SOCKETS_IN_FILE_SYSTEM 653#ifndef NO_SOCKETS_IN_FILE_SYSTEM
652"-s SOCKET, --socket-name=SOCKET\n\ 654"-s SOCKET, --socket-name=SOCKET\n\
@@ -661,7 +663,7 @@ The following OPTIONS are accepted:\n\
661 mode and try connecting again\n" 663 mode and try connecting again\n"
662#endif /* not WINDOWSNT */ 664#endif /* not WINDOWSNT */
663"\n\ 665"\n\
664Report bugs with M-x report-emacs-bug.\n", progname); 666Report bugs with M-x report-emacs-bug.\n");
665 exit (EXIT_SUCCESS); 667 exit (EXIT_SUCCESS);
666} 668}
667 669
@@ -1509,7 +1511,10 @@ start_daemon_and_retry_set_socket (void)
1509 { 1511 {
1510 char emacs[] = "emacs"; 1512 char emacs[] = "emacs";
1511 char daemon_option[] = "--daemon"; 1513 char daemon_option[] = "--daemon";
1512 char *d_argv[] = {emacs, daemon_option, 0 }; 1514 char *d_argv[3];
1515 d_argv[0] = emacs;
1516 d_argv[1] = daemon_option;
1517 d_argv[2] = 0;
1513 if (socket_name != NULL) 1518 if (socket_name != NULL)
1514 { 1519 {
1515 /* Pass --daemon=socket_name as argument. */ 1520 /* Pass --daemon=socket_name as argument. */
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 9bc91bc4f77..73d1a0eb31d 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -555,7 +555,7 @@ enum global_type
555 LISP_OBJECT, 555 LISP_OBJECT,
556 EMACS_INTEGER, 556 EMACS_INTEGER,
557 BOOLEAN, 557 BOOLEAN,
558 FUNCTION, 558 FUNCTION
559}; 559};
560 560
561/* A single global. */ 561/* A single global. */