summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
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 @@
+2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port to C89.
+ * ebrowse.c (USAGE): Remove macro with too-long string literal ...
+ (usage_message): ... and replace it with this new static constant
+ containing multiple literals. All uses changed.
+ * emacsclient.c (print_help_and_exit):
+ Rewrite to avoid string literals longer than the C89 limits.
+ (start_daemon_and_retry_set_socket):
+ Rewrite to avoid non-constant array initializer.
+ * make-docfile.c (enum global_type): Omit trailing comma.
+
2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
Prefer plain 'static' to 'static inline' (Bug#12541).
@@ -6134,7 +6146,7 @@
1995-06-13 Geoff Voelker <voelker@cs.washington.edu>
- * etags.c (process_file,absolute_filename): Handle filenames
+ * etags.c (process_file, absolute_filename): Handle filenames
starting with a drive letter.
* makefile.nt (install): Copy wakeup.exe properly.
@@ -6161,12 +6173,12 @@
1995-05-25 Geoff Voelker <voelker@cs.washington.edu>
* makefile.nt (LIBS): Use BASE_LIBS.
- (make-docfile.exe,hexl.exe,wakeup.exe,etags.exe): Don't depend
+ (make-docfile.exe, hexl.exe, wakeup.exe, etags.exe): Don't depend
upon LIBS.
(DOC): Use del instead of rm.
(DOC) [WINDOWS95]: Use DOC.
(clean): Handle MSVC aux files.
- (config.h,paths.h): Use $(CP) instead of cp.
+ (config.h, paths.h): Use $(CP) instead of cp.
(config.h): Use $(CONFIG_H)
(make-docfile.obj): Depend upon config.h.
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)
/* Display usage information and exit program. */
-#define USAGE "\
+static char const *const usage_message[] =
+ {
+ "\
Usage: ebrowse [options] {files}\n\
\n\
-a, --append append output to existing file\n\
@@ -3489,6 +3491,8 @@ Usage: ebrowse [options] {files}\n\
-I, --search-path=LIST set search path for input files\n\
-m, --min-regexp-length=N set minimum regexp length to N\n\
-M, --max-regexp-length=N set maximum regexp length to N\n\
+",
+ "\
-n, --no-nested-classes exclude nested classes\n\
-o, --output-file=FILE set output file name to FILE\n\
-p, --position-info print info about position in file\n\
@@ -3498,12 +3502,16 @@ Usage: ebrowse [options] {files}\n\
-x, --no-regexps don't record regular expressions\n\
--help display this help\n\
--version display version info\n\
+\n\
"
+ };
static _Noreturn void
usage (int error)
{
- puts (USAGE);
+ int i;
+ for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++)
+ fputs (usage_message[i], stdout);
exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
}
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)
Please try to preserve them; otherwise the output is very hard to read
when using emacsclientw. */
message (FALSE,
- "Usage: %s [OPTIONS] FILE...\n\
+ "Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\
Tell the Emacs server to visit the specified files.\n\
Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
\n\
@@ -640,6 +640,7 @@ The following OPTIONS are accepted:\n\
-nw, -t, --tty Open a new Emacs frame on the current terminal\n\
-c, --create-frame Create a new frame instead of trying to\n\
use the current Emacs frame\n\
+", "\
-F ALIST, --frame-parameters=ALIST\n\
Set the parameters of a new frame\n\
-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
@@ -647,6 +648,7 @@ The following OPTIONS are accepted:\n\
-q, --quiet Don't display messages on success\n\
-d DISPLAY, --display=DISPLAY\n\
Visit the file in the given display\n\
+", "\
--parent-id=ID Open in parent window ID, via XEmbed\n"
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"-s SOCKET, --socket-name=SOCKET\n\
@@ -661,7 +663,7 @@ The following OPTIONS are accepted:\n\
mode and try connecting again\n"
#endif /* not WINDOWSNT */
"\n\
-Report bugs with M-x report-emacs-bug.\n", progname);
+Report bugs with M-x report-emacs-bug.\n");
exit (EXIT_SUCCESS);
}
@@ -1509,7 +1511,10 @@ start_daemon_and_retry_set_socket (void)
{
char emacs[] = "emacs";
char daemon_option[] = "--daemon";
- char *d_argv[] = {emacs, daemon_option, 0 };
+ char *d_argv[3];
+ d_argv[0] = emacs;
+ d_argv[1] = daemon_option;
+ d_argv[2] = 0;
if (socket_name != NULL)
{
/* 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
LISP_OBJECT,
EMACS_INTEGER,
BOOLEAN,
- FUNCTION,
+ FUNCTION
};
/* A single global. */