diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-10 16:23:57 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-10 16:23:57 -0700 |
commit | 29abe551a0d9137718cd21732c9dc383d6493d71 (patch) | |
tree | 9730894ac27692871e3c7cba38fcb4df6412d8bc /src/dispnew.c | |
parent | 3d70c5cfa9aae030c5ab8e8e612319a6645cf659 (diff) | |
download | emacs-29abe551a0d9137718cd21732c9dc383d6493d71.tar.gz |
Port to C89.
* lib-src/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.
* lib-src/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.
* lib-src/make-docfile.c (enum global_type): Omit trailing comma.
* src/bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
(B__dummy__): New dummy symbol, to pacify C89.
* src/dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
they can't grok varargs macros.
* src/dispnew.c (add_window_display_history)
(add_frame_display_history):
* src/print.c (print_object):
* src/xdisp.c (debug_method_add):
Use %p printf format only for void pointers.
* src/emacs.c (usage_message): New constant, replacing ...
(USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
(main): Adjust to usage reorg.
* src/fns.c (syms_of_fns):
* src/profiler.c (syms_of_profiler):
Don't use non-constant struct initializers.
* src/gnutls.h (gnutls_initstage_t):
* src/lisp.h (enum Lisp_Fwd_Type):
* src/lread.c (lisp_file_lexically_bound_p):
* src/xsettings.c (anonymous enum):
Remove trailing comma.
* src/xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
* src/lisp.h (ENUM_BF): Use unsigned if pedantic.
(DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
(DEFUN): Use it.
* src/regex.c (const_re_char): New type, to pacify strict C89.
All uses of 'const re_char' replaced to use it.
* src/regex.h (_Restrict_): Rename from __restrict, to avoid clash
with glibc when strict C89. This change is imported from gnulib.
All uses changed.
(_Restrict_arr_): Rename from __restrict_arr, similarly.
* src/sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
Omit GNU_LINUX implementation, since it requires long long.
* src/xterm.c (x_draw_underwave):
Do not assume the traditional order of struct's members.
(x_term_init): Rewrite to avoid the need for non-constant structure
initializers.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 31b8a1310ea..1eb097f05ab 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -213,6 +213,7 @@ static void add_window_display_history (struct window *w, const char *msg, bool paused_p) { char *buf; + void *ptr = w; if (history_idx >= REDISPLAY_HISTORY_SIZE) history_idx = 0; @@ -222,7 +223,7 @@ add_window_display_history (struct window *w, const char *msg, bool paused_p) snprintf (buf, sizeof redisplay_history[0].trace, "%"pMu": window %p (`%s')%s\n%s", history_tick++, - w, + ptr, ((BUFFERP (w->contents) && STRINGP (BVAR (XBUFFER (w->contents), name))) ? SSDATA (BVAR (XBUFFER (w->contents), name)) @@ -240,6 +241,7 @@ static void add_frame_display_history (struct frame *f, bool paused_p) { char *buf; + void *ptr = f; if (history_idx >= REDISPLAY_HISTORY_SIZE) history_idx = 0; @@ -248,7 +250,7 @@ add_frame_display_history (struct frame *f, bool paused_p) sprintf (buf, "%"pMu": update frame %p%s", history_tick++, - f, paused_p ? " ***paused***" : ""); + ptr, paused_p ? " ***paused***" : ""); } |