Commit 84c53436 authored by Paul Eggert's avatar Paul Eggert

Prefer comments /* like this */ in C code

Emacs C code assumes C99 features, but has long used traditional
comments /* like this */ instead of C99-style comments // like this.
Stick with traditional comments for now, partly for style, partly as
it may be safer with compilers that are not fully in C99 mode.
parent bb61e505
......@@ -142,8 +142,8 @@ static emacs_value const module_nil = 0;
or a pointer to handle non-local exits. The function must have an
ENV parameter. The function will return the specified value if a
signal or throw is caught. */
// TODO: Have Fsignal check for CATCHER_ALL so we only have to install
// one handler.
/* TODO: Have Fsignal check for CATCHER_ALL so we only have to install
one handler. */
#define MODULE_HANDLE_NONLOCAL_EXIT(retval) \
MODULE_SETJMP (CONDITION_CASE, module_handle_signal, retval); \
MODULE_SETJMP (CATCHER_ALL, module_handle_throw, retval)
......@@ -163,7 +163,7 @@ static emacs_value const module_nil = 0;
code after the macro may longjmp back into the macro, which means
its local variable C must stay live in later code. */
// TODO: Make backtraces work if this macros is used.
/* TODO: Make backtraces work if this macros is used. */
#define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \
if (module_non_local_exit_check (env) != emacs_funcall_exit_return) \
......
......@@ -105,7 +105,7 @@ dir_monitor_callback (GFileMonitor *monitor,
/* Store it into the input event queue. */
kbd_buffer_store_event (&event);
// XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg));
/* XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg)); */
}
/* Cancel monitor if file or directory is deleted. */
......
......@@ -185,7 +185,7 @@ xg_display_open (char *display_name, Display **dpy)
{
GdkDisplay *gdpy;
unrequest_sigio (); // See comment in x_display_ok, xterm.c.
unrequest_sigio (); /* See comment in x_display_ok, xterm.c. */
gdpy = gdk_display_open (display_name);
request_sigio ();
if (!gdpy_def && gdpy)
......
......@@ -3712,7 +3712,7 @@ xpm_load (struct frame *f, struct image *img)
}
#ifdef USE_CAIRO
// Load very specific Xpm:s.
/* Load very specific Xpm:s. */
if (rc == XpmSuccess
&& img->ximg->format == ZPixmap
&& img->ximg->bits_per_pixel == 32
......@@ -3736,7 +3736,7 @@ xpm_load (struct frame *f, struct image *img)
int maskidx = mid ? i * img->mask_img->bytes_per_line + k/8 : 0;
int mask = mid ? mid[maskidx] & (1 << (k % 8)) : 1;
if (mask) od[idx] = id[idx] + 0xff000000; // ff => full alpha
if (mask) od[idx] = id[idx] + 0xff000000; /* ff => full alpha */
else od[idx] = bgcolor;
}
}
......
......@@ -264,8 +264,6 @@ kqueue_compare_dir_list (Lisp_Object watch_object)
report_file_error ("New list not empty", new_dl);
if (! NILP (pending_dl))
report_file_error ("Pending events list not empty", pending_dl);
// if (! NILP (deleted_dl))
// report_file_error ("Deleted events list not empty", deleted_dl);
/* Replace old directory listing with the new one. */
XSETCDR (Fnthcdr (make_number (3), watch_object),
......
......@@ -6934,7 +6934,7 @@ value of DIR as in previous invocations; this is standard Windows behavior. */)
} new_file_details_w;
#ifdef NTGUI_UNICODE
wchar_t filename_buf_w[32*1024 + 1]; // NT kernel maximum
wchar_t filename_buf_w[32*1024 + 1]; /* NT kernel maximum */
OPENFILENAMEW * file_details_w = &new_file_details_w.details;
const int use_unicode = 1;
#else /* not NTGUI_UNICODE */
......
......@@ -24461,7 +24461,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
}
if (FRAME_WINDOW_P (it->f) && valid_xwidget_spec_p (prop))
{
// TODO: Don't return dummy size.
/* TODO: Don't return dummy size. */
return OK_PIXELS (100);
}
#endif
......
......@@ -693,7 +693,7 @@ x_reply_selection_request (struct selection_input_event *event,
: format_bytes);
XFlush (display);
had_errors_p = x_had_errors_p (display);
// See comment above about property_change_reply.
/* See comment above about property_change_reply. */
set_property_change_object (cs->wait_object);
unblock_input ();
......@@ -1393,7 +1393,7 @@ receive_incremental_selection (struct x_display_info *dpyinfo,
wait_object = expect_property_change (display, window, property,
PropertyNewValue);
XFlush (display);
// See comment in x_reply_selection_request about property_change_reply.
/* See comment in x_reply_selection_request about property_change_reply. */
set_property_change_object (wait_object);
unblock_input ();
......@@ -1433,7 +1433,8 @@ receive_incremental_selection (struct x_display_info *dpyinfo,
XDeleteProperty (display, window, property);
wait_object = expect_property_change (display, window, property,
PropertyNewValue);
// See comment in x_reply_selection_request about property_change_reply.
/* See comment in x_reply_selection_request about
property_change_reply. */
set_property_change_object (wait_object);
XFlush (display);
unblock_input ();
......
......@@ -170,7 +170,7 @@ smc_save_yourself_CB (SmcConn smcConn,
char *smid_opt, *chdir_opt = NULL;
Lisp_Object user_login_name = Fuser_login_name (Qnil);
// Must have these.
/* Must have these. */
if (! STRINGP (Vinvocation_name) || ! STRINGP (user_login_name))
return;
......
......@@ -11950,7 +11950,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
#else /* not USE_X_TOOLKIT */
XSetLocaleModifiers ("");
unrequest_sigio (); // See comment in x_display_ok.
unrequest_sigio (); /* See comment in x_display_ok. */
dpy = XOpenDisplay (SSDATA (display_name));
request_sigio ();
#endif /* not USE_X_TOOLKIT */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment