aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorAndreas Schwab2013-03-24 13:59:45 +0100
committerAndreas Schwab2013-03-24 13:59:45 +0100
commit908589fd28437a9b0995b103e22ce5e4d421eb8a (patch)
treece3a4207b04f84fdc97ee1ca2dfbc369fcf07c2a /src/lread.c
parent7b0e2f853fcd88c58715fd159923d50dfdeb9cba (diff)
downloademacs-908589fd28437a9b0995b103e22ce5e4d421eb8a.tar.gz
emacs-908589fd28437a9b0995b103e22ce5e4d421eb8a.zip
Reorder conditions that are written backwards
* alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are written backwards. * blockinput.h (input_blocked_p): Likewise. * bytecode.c (exec_byte_code): Likewise. * callproc.c (call_process_kill, call_process_cleanup) (Fcall_process): Likewise. * ccl.c (ccl_driver, resolve_symbol_ccl_program) (Fccl_execute_on_string): Likewise. * character.c (string_escape_byte8): Likewise. * charset.c (read_hex): Likewise. * cm.c (calccost): Likewise. * data.c (cons_to_unsigned): Likewise. * dired.c (directory_files_internal, file_name_completion): Likewise. * dispnew.c (scrolling_window, update_frame_1, Fsleep_for) (sit_for): Likewise. * doc.c (Fsubstitute_command_keys): Likewise. * doprnt.c (doprnt): Likewise. * editfns.c (hi_time, decode_time_components, Fformat): Likewise. * emacsgtkfixed.c: Likewise. * fileio.c (file_offset, Fwrite_region): Likewise. * floatfns.c (Fexpt, fmod_float): Likewise. * fns.c (larger_vector, make_hash_table, Fmake_hash_table): Likewise. * font.c (font_intern_prop): Likewise. * frame.c (x_set_alpha): Likewise. * gtkutil.c (get_utf8_string): Likewise. * indent.c (check_display_width): Likewise. * intervals.c (create_root_interval, rotate_right, rotate_left) (split_interval_right, split_interval_left) (adjust_intervals_for_insertion, delete_node) (interval_deletion_adjustment, adjust_intervals_for_deletion) (merge_interval_right, merge_interval_left, copy_intervals) (set_intervals_multibyte_1): Likewise. * keyboard.c (gobble_input, append_tool_bar_item): Likewise. * keymap.c (Fkey_description): Likewise. * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise. * lread.c (openp, read_integer, read1, string_to_number): Likewise. * menu.c (ensure_menu_items): Likewise. * minibuf.c (read_minibuf_noninteractive): Likewise. * print.c (printchar, strout): Likewise. * process.c (create_process, Faccept_process_output) (wait_reading_process_output, read_process_output, send_process) (wait_reading_process_output): Likewise. * profiler.c (make_log, handle_profiler_signal): Likewise. * regex.c (re_exec): Likewise. * regex.h: Likewise. * search.c (looking_at_1, Freplace_match): Likewise. * sysdep.c (get_child_status, procfs_ttyname) (procfs_get_total_memory): Likewise. * systime.h (EMACS_TIME_VALID_P): Likewise. * term.c (dissociate_if_controlling_tty): Likewise. * window.c (get_phys_cursor_glyph): Likewise. * xdisp.c (init_iterator, redisplay_internal, redisplay_window) (try_window_reusing_current_matrix, try_window_id, pint2hrstr): Likewise. * xfns.c (Fx_window_property): Likewise. * xmenu.c (set_frame_menubar): Likewise. * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise. * xsmfns.c (smc_save_yourself_CB): Likewise. * xterm.c (x_scroll_bar_set_handle): Likewise.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lread.c b/src/lread.c
index f8ab03af218..d7a16f813c8 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1571,7 +1571,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
1571 { 1571 {
1572 struct stat st; 1572 struct stat st;
1573 fd = emacs_open (pfn, O_RDONLY, 0); 1573 fd = emacs_open (pfn, O_RDONLY, 0);
1574 if (0 <= fd 1574 if (fd >= 0
1575 && (fstat (fd, &st) != 0 || S_ISDIR (st.st_mode))) 1575 && (fstat (fd, &st) != 0 || S_ISDIR (st.st_mode)))
1576 { 1576 {
1577 emacs_close (fd); 1577 emacs_close (fd);
@@ -2359,7 +2359,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix)
2359 while (c == '0'); 2359 while (c == '0');
2360 } 2360 }
2361 2361
2362 while (-1 <= (digit = digit_to_number (c, radix))) 2362 while ((digit = digit_to_number (c, radix)) >= -1)
2363 { 2363 {
2364 if (digit == -1) 2364 if (digit == -1)
2365 valid = 0; 2365 valid = 0;
@@ -2731,8 +2731,8 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2731 /* Read a non-negative integer. */ 2731 /* Read a non-negative integer. */
2732 while (c >= '0' && c <= '9') 2732 while (c >= '0' && c <= '9')
2733 { 2733 {
2734 if (MOST_POSITIVE_FIXNUM / 10 < n 2734 if (n > MOST_POSITIVE_FIXNUM / 10
2735 || MOST_POSITIVE_FIXNUM < n * 10 + c - '0') 2735 || n * 10 + c - '0' > MOST_POSITIVE_FIXNUM)
2736 n = MOST_POSITIVE_FIXNUM + 1; 2736 n = MOST_POSITIVE_FIXNUM + 1;
2737 else 2737 else
2738 n = n * 10 + c - '0'; 2738 n = n * 10 + c - '0';
@@ -2930,7 +2930,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2930 if (end - p < MAX_MULTIBYTE_LENGTH) 2930 if (end - p < MAX_MULTIBYTE_LENGTH)
2931 { 2931 {
2932 ptrdiff_t offset = p - read_buffer; 2932 ptrdiff_t offset = p - read_buffer;
2933 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) 2933 if (read_buffer_size > min (PTRDIFF_MAX, SIZE_MAX) / 2)
2934 memory_full (SIZE_MAX); 2934 memory_full (SIZE_MAX);
2935 read_buffer = xrealloc (read_buffer, read_buffer_size * 2); 2935 read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
2936 read_buffer_size *= 2; 2936 read_buffer_size *= 2;
@@ -3064,7 +3064,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3064 if (end - p < MAX_MULTIBYTE_LENGTH) 3064 if (end - p < MAX_MULTIBYTE_LENGTH)
3065 { 3065 {
3066 ptrdiff_t offset = p - read_buffer; 3066 ptrdiff_t offset = p - read_buffer;
3067 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) 3067 if (read_buffer_size > min (PTRDIFF_MAX, SIZE_MAX) / 2)
3068 memory_full (SIZE_MAX); 3068 memory_full (SIZE_MAX);
3069 read_buffer = xrealloc (read_buffer, read_buffer_size * 2); 3069 read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
3070 read_buffer_size *= 2; 3070 read_buffer_size *= 2;
@@ -3094,7 +3094,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3094 if (p == end) 3094 if (p == end)
3095 { 3095 {
3096 ptrdiff_t offset = p - read_buffer; 3096 ptrdiff_t offset = p - read_buffer;
3097 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size) 3097 if (read_buffer_size > min (PTRDIFF_MAX, SIZE_MAX) / 2)
3098 memory_full (SIZE_MAX); 3098 memory_full (SIZE_MAX);
3099 read_buffer = xrealloc (read_buffer, read_buffer_size * 2); 3099 read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
3100 read_buffer_size *= 2; 3100 read_buffer_size *= 2;
@@ -3298,12 +3298,12 @@ string_to_number (char const *string, int base, bool ignore_trailing)
3298 state = 0; 3298 state = 0;
3299 3299
3300 leading_digit = digit_to_number (*cp, base); 3300 leading_digit = digit_to_number (*cp, base);
3301 if (0 <= leading_digit) 3301 if (leading_digit >= 0)
3302 { 3302 {
3303 state |= LEAD_INT; 3303 state |= LEAD_INT;
3304 do 3304 do
3305 ++cp; 3305 ++cp;
3306 while (0 <= digit_to_number (*cp, base)); 3306 while (digit_to_number (*cp, base) >= 0);
3307 } 3307 }
3308 if (*cp == '.') 3308 if (*cp == '.')
3309 { 3309 {
@@ -3380,7 +3380,7 @@ string_to_number (char const *string, int base, bool ignore_trailing)
3380 3380
3381 /* If the number uses integer and not float syntax, and is in C-language 3381 /* If the number uses integer and not float syntax, and is in C-language
3382 range, use its value, preferably as a fixnum. */ 3382 range, use its value, preferably as a fixnum. */
3383 if (0 <= leading_digit && ! float_syntax) 3383 if (leading_digit >= 0 && ! float_syntax)
3384 { 3384 {
3385 uintmax_t n; 3385 uintmax_t n;
3386 3386