diff options
| author | Paul Eggert | 2016-11-05 20:41:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-11-05 20:42:10 -0700 |
| commit | 84c53436ab25b6c8f76c133e59b34e533ea33cc7 (patch) | |
| tree | 0591d8e26be72e5c36a221c6642c614d43cb8c30 /src | |
| parent | bb61e50533a4dd1f2f93de1f8ca55d31f9094e6d (diff) | |
| download | emacs-84c53436ab25b6c8f76c133e59b34e533ea33cc7.tar.gz emacs-84c53436ab25b6c8f76c133e59b34e533ea33cc7.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 6 | ||||
| -rw-r--r-- | src/gfilenotify.c | 2 | ||||
| -rw-r--r-- | src/gtkutil.c | 2 | ||||
| -rw-r--r-- | src/image.c | 4 | ||||
| -rw-r--r-- | src/kqueue.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | src/xselect.c | 7 | ||||
| -rw-r--r-- | src/xsmfns.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 2 |
10 files changed, 15 insertions, 16 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index eca5af739b9..a28fe57b12d 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -142,8 +142,8 @@ static emacs_value const module_nil = 0; | |||
| 142 | or a pointer to handle non-local exits. The function must have an | 142 | or a pointer to handle non-local exits. The function must have an |
| 143 | ENV parameter. The function will return the specified value if a | 143 | ENV parameter. The function will return the specified value if a |
| 144 | signal or throw is caught. */ | 144 | signal or throw is caught. */ |
| 145 | // TODO: Have Fsignal check for CATCHER_ALL so we only have to install | 145 | /* TODO: Have Fsignal check for CATCHER_ALL so we only have to install |
| 146 | // one handler. | 146 | one handler. */ |
| 147 | #define MODULE_HANDLE_NONLOCAL_EXIT(retval) \ | 147 | #define MODULE_HANDLE_NONLOCAL_EXIT(retval) \ |
| 148 | MODULE_SETJMP (CONDITION_CASE, module_handle_signal, retval); \ | 148 | MODULE_SETJMP (CONDITION_CASE, module_handle_signal, retval); \ |
| 149 | MODULE_SETJMP (CATCHER_ALL, module_handle_throw, retval) | 149 | MODULE_SETJMP (CATCHER_ALL, module_handle_throw, retval) |
| @@ -163,7 +163,7 @@ static emacs_value const module_nil = 0; | |||
| 163 | code after the macro may longjmp back into the macro, which means | 163 | code after the macro may longjmp back into the macro, which means |
| 164 | its local variable C must stay live in later code. */ | 164 | its local variable C must stay live in later code. */ |
| 165 | 165 | ||
| 166 | // TODO: Make backtraces work if this macros is used. | 166 | /* TODO: Make backtraces work if this macros is used. */ |
| 167 | 167 | ||
| 168 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \ | 168 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \ |
| 169 | if (module_non_local_exit_check (env) != emacs_funcall_exit_return) \ | 169 | if (module_non_local_exit_check (env) != emacs_funcall_exit_return) \ |
diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 3b1f2fc516a..30d0753f7e7 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c | |||
| @@ -105,7 +105,7 @@ dir_monitor_callback (GFileMonitor *monitor, | |||
| 105 | 105 | ||
| 106 | /* Store it into the input event queue. */ | 106 | /* Store it into the input event queue. */ |
| 107 | kbd_buffer_store_event (&event); | 107 | kbd_buffer_store_event (&event); |
| 108 | // XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg)); | 108 | /* XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg)); */ |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | /* Cancel monitor if file or directory is deleted. */ | 111 | /* Cancel monitor if file or directory is deleted. */ |
diff --git a/src/gtkutil.c b/src/gtkutil.c index e791e6ac317..0f256c563dc 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -185,7 +185,7 @@ xg_display_open (char *display_name, Display **dpy) | |||
| 185 | { | 185 | { |
| 186 | GdkDisplay *gdpy; | 186 | GdkDisplay *gdpy; |
| 187 | 187 | ||
| 188 | unrequest_sigio (); // See comment in x_display_ok, xterm.c. | 188 | unrequest_sigio (); /* See comment in x_display_ok, xterm.c. */ |
| 189 | gdpy = gdk_display_open (display_name); | 189 | gdpy = gdk_display_open (display_name); |
| 190 | request_sigio (); | 190 | request_sigio (); |
| 191 | if (!gdpy_def && gdpy) | 191 | if (!gdpy_def && gdpy) |
diff --git a/src/image.c b/src/image.c index 78539d91d2b..6a62235673a 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -3712,7 +3712,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3712 | } | 3712 | } |
| 3713 | 3713 | ||
| 3714 | #ifdef USE_CAIRO | 3714 | #ifdef USE_CAIRO |
| 3715 | // Load very specific Xpm:s. | 3715 | /* Load very specific Xpm:s. */ |
| 3716 | if (rc == XpmSuccess | 3716 | if (rc == XpmSuccess |
| 3717 | && img->ximg->format == ZPixmap | 3717 | && img->ximg->format == ZPixmap |
| 3718 | && img->ximg->bits_per_pixel == 32 | 3718 | && img->ximg->bits_per_pixel == 32 |
| @@ -3736,7 +3736,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3736 | int maskidx = mid ? i * img->mask_img->bytes_per_line + k/8 : 0; | 3736 | int maskidx = mid ? i * img->mask_img->bytes_per_line + k/8 : 0; |
| 3737 | int mask = mid ? mid[maskidx] & (1 << (k % 8)) : 1; | 3737 | int mask = mid ? mid[maskidx] & (1 << (k % 8)) : 1; |
| 3738 | 3738 | ||
| 3739 | if (mask) od[idx] = id[idx] + 0xff000000; // ff => full alpha | 3739 | if (mask) od[idx] = id[idx] + 0xff000000; /* ff => full alpha */ |
| 3740 | else od[idx] = bgcolor; | 3740 | else od[idx] = bgcolor; |
| 3741 | } | 3741 | } |
| 3742 | } | 3742 | } |
diff --git a/src/kqueue.c b/src/kqueue.c index c848b7ff1af..49ca0c95e27 100644 --- a/src/kqueue.c +++ b/src/kqueue.c | |||
| @@ -264,8 +264,6 @@ kqueue_compare_dir_list (Lisp_Object watch_object) | |||
| 264 | report_file_error ("New list not empty", new_dl); | 264 | report_file_error ("New list not empty", new_dl); |
| 265 | if (! NILP (pending_dl)) | 265 | if (! NILP (pending_dl)) |
| 266 | report_file_error ("Pending events list not empty", pending_dl); | 266 | report_file_error ("Pending events list not empty", pending_dl); |
| 267 | // if (! NILP (deleted_dl)) | ||
| 268 | // report_file_error ("Deleted events list not empty", deleted_dl); | ||
| 269 | 267 | ||
| 270 | /* Replace old directory listing with the new one. */ | 268 | /* Replace old directory listing with the new one. */ |
| 271 | XSETCDR (Fnthcdr (make_number (3), watch_object), | 269 | XSETCDR (Fnthcdr (make_number (3), watch_object), |
diff --git a/src/w32fns.c b/src/w32fns.c index c57b5a188b2..27c0d65fbd0 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -6934,7 +6934,7 @@ value of DIR as in previous invocations; this is standard Windows behavior. */) | |||
| 6934 | } new_file_details_w; | 6934 | } new_file_details_w; |
| 6935 | 6935 | ||
| 6936 | #ifdef NTGUI_UNICODE | 6936 | #ifdef NTGUI_UNICODE |
| 6937 | wchar_t filename_buf_w[32*1024 + 1]; // NT kernel maximum | 6937 | wchar_t filename_buf_w[32*1024 + 1]; /* NT kernel maximum */ |
| 6938 | OPENFILENAMEW * file_details_w = &new_file_details_w.details; | 6938 | OPENFILENAMEW * file_details_w = &new_file_details_w.details; |
| 6939 | const int use_unicode = 1; | 6939 | const int use_unicode = 1; |
| 6940 | #else /* not NTGUI_UNICODE */ | 6940 | #else /* not NTGUI_UNICODE */ |
diff --git a/src/xdisp.c b/src/xdisp.c index a13830c811e..f575b27fec5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -24461,7 +24461,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, | |||
| 24461 | } | 24461 | } |
| 24462 | if (FRAME_WINDOW_P (it->f) && valid_xwidget_spec_p (prop)) | 24462 | if (FRAME_WINDOW_P (it->f) && valid_xwidget_spec_p (prop)) |
| 24463 | { | 24463 | { |
| 24464 | // TODO: Don't return dummy size. | 24464 | /* TODO: Don't return dummy size. */ |
| 24465 | return OK_PIXELS (100); | 24465 | return OK_PIXELS (100); |
| 24466 | } | 24466 | } |
| 24467 | #endif | 24467 | #endif |
diff --git a/src/xselect.c b/src/xselect.c index 123e46374a2..ff6dc3287cf 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -693,7 +693,7 @@ x_reply_selection_request (struct selection_input_event *event, | |||
| 693 | : format_bytes); | 693 | : format_bytes); |
| 694 | XFlush (display); | 694 | XFlush (display); |
| 695 | had_errors_p = x_had_errors_p (display); | 695 | had_errors_p = x_had_errors_p (display); |
| 696 | // See comment above about property_change_reply. | 696 | /* See comment above about property_change_reply. */ |
| 697 | set_property_change_object (cs->wait_object); | 697 | set_property_change_object (cs->wait_object); |
| 698 | unblock_input (); | 698 | unblock_input (); |
| 699 | 699 | ||
| @@ -1393,7 +1393,7 @@ receive_incremental_selection (struct x_display_info *dpyinfo, | |||
| 1393 | wait_object = expect_property_change (display, window, property, | 1393 | wait_object = expect_property_change (display, window, property, |
| 1394 | PropertyNewValue); | 1394 | PropertyNewValue); |
| 1395 | XFlush (display); | 1395 | XFlush (display); |
| 1396 | // See comment in x_reply_selection_request about property_change_reply. | 1396 | /* See comment in x_reply_selection_request about property_change_reply. */ |
| 1397 | set_property_change_object (wait_object); | 1397 | set_property_change_object (wait_object); |
| 1398 | unblock_input (); | 1398 | unblock_input (); |
| 1399 | 1399 | ||
| @@ -1433,7 +1433,8 @@ receive_incremental_selection (struct x_display_info *dpyinfo, | |||
| 1433 | XDeleteProperty (display, window, property); | 1433 | XDeleteProperty (display, window, property); |
| 1434 | wait_object = expect_property_change (display, window, property, | 1434 | wait_object = expect_property_change (display, window, property, |
| 1435 | PropertyNewValue); | 1435 | PropertyNewValue); |
| 1436 | // See comment in x_reply_selection_request about property_change_reply. | 1436 | /* See comment in x_reply_selection_request about |
| 1437 | property_change_reply. */ | ||
| 1437 | set_property_change_object (wait_object); | 1438 | set_property_change_object (wait_object); |
| 1438 | XFlush (display); | 1439 | XFlush (display); |
| 1439 | unblock_input (); | 1440 | unblock_input (); |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 42e23401c7d..d54a94df877 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -170,7 +170,7 @@ smc_save_yourself_CB (SmcConn smcConn, | |||
| 170 | char *smid_opt, *chdir_opt = NULL; | 170 | char *smid_opt, *chdir_opt = NULL; |
| 171 | Lisp_Object user_login_name = Fuser_login_name (Qnil); | 171 | Lisp_Object user_login_name = Fuser_login_name (Qnil); |
| 172 | 172 | ||
| 173 | // Must have these. | 173 | /* Must have these. */ |
| 174 | if (! STRINGP (Vinvocation_name) || ! STRINGP (user_login_name)) | 174 | if (! STRINGP (Vinvocation_name) || ! STRINGP (user_login_name)) |
| 175 | return; | 175 | return; |
| 176 | 176 | ||
diff --git a/src/xterm.c b/src/xterm.c index c64c17463cf..213a527d55d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11950,7 +11950,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 11950 | 11950 | ||
| 11951 | #else /* not USE_X_TOOLKIT */ | 11951 | #else /* not USE_X_TOOLKIT */ |
| 11952 | XSetLocaleModifiers (""); | 11952 | XSetLocaleModifiers (""); |
| 11953 | unrequest_sigio (); // See comment in x_display_ok. | 11953 | unrequest_sigio (); /* See comment in x_display_ok. */ |
| 11954 | dpy = XOpenDisplay (SSDATA (display_name)); | 11954 | dpy = XOpenDisplay (SSDATA (display_name)); |
| 11955 | request_sigio (); | 11955 | request_sigio (); |
| 11956 | #endif /* not USE_X_TOOLKIT */ | 11956 | #endif /* not USE_X_TOOLKIT */ |