diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c index ce4b44c87c3..5244b7043dc 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3146,8 +3146,8 @@ struct sortvec | |||
| 3146 | static int | 3146 | static int |
| 3147 | compare_overlays (const void *v1, const void *v2) | 3147 | compare_overlays (const void *v1, const void *v2) |
| 3148 | { | 3148 | { |
| 3149 | const struct sortvec *s1 = (const struct sortvec *) v1; | 3149 | const struct sortvec *s1 = v1; |
| 3150 | const struct sortvec *s2 = (const struct sortvec *) v2; | 3150 | const struct sortvec *s2 = v2; |
| 3151 | if (s1->priority != s2->priority) | 3151 | if (s1->priority != s2->priority) |
| 3152 | return s1->priority < s2->priority ? -1 : 1; | 3152 | return s1->priority < s2->priority ? -1 : 1; |
| 3153 | if (s1->beg != s2->beg) | 3153 | if (s1->beg != s2->beg) |
| @@ -3253,8 +3253,8 @@ static ptrdiff_t overlay_str_len; | |||
| 3253 | static int | 3253 | static int |
| 3254 | cmp_for_strings (const void *as1, const void *as2) | 3254 | cmp_for_strings (const void *as1, const void *as2) |
| 3255 | { | 3255 | { |
| 3256 | struct sortstr *s1 = (struct sortstr *)as1; | 3256 | struct sortstr const *s1 = as1; |
| 3257 | struct sortstr *s2 = (struct sortstr *)as2; | 3257 | struct sortstr const *s2 = as2; |
| 3258 | if (s1->size != s2->size) | 3258 | if (s1->size != s2->size) |
| 3259 | return s2->size < s1->size ? -1 : 1; | 3259 | return s2->size < s1->size ? -1 : 1; |
| 3260 | if (s1->priority != s2->priority) | 3260 | if (s1->priority != s2->priority) |
| @@ -4752,7 +4752,7 @@ static struct mmap_region * | |||
| 4752 | mmap_find (void *start, void *end) | 4752 | mmap_find (void *start, void *end) |
| 4753 | { | 4753 | { |
| 4754 | struct mmap_region *r; | 4754 | struct mmap_region *r; |
| 4755 | char *s = (char *) start, *e = (char *) end; | 4755 | char *s = start, *e = end; |
| 4756 | 4756 | ||
| 4757 | for (r = mmap_regions; r; r = r->next) | 4757 | for (r = mmap_regions; r; r = r->next) |
| 4758 | { | 4758 | { |
| @@ -4911,7 +4911,7 @@ mmap_alloc (void **var, size_t nbytes) | |||
| 4911 | } | 4911 | } |
| 4912 | else | 4912 | else |
| 4913 | { | 4913 | { |
| 4914 | struct mmap_region *r = (struct mmap_region *) p; | 4914 | struct mmap_region *r = p; |
| 4915 | 4915 | ||
| 4916 | r->nbytes_specified = nbytes; | 4916 | r->nbytes_specified = nbytes; |
| 4917 | r->nbytes_mapped = map; | 4917 | r->nbytes_mapped = map; |
| @@ -5051,7 +5051,7 @@ alloc_buffer_text (struct buffer *b, ptrdiff_t nbytes) | |||
| 5051 | memory_full (nbytes); | 5051 | memory_full (nbytes); |
| 5052 | } | 5052 | } |
| 5053 | 5053 | ||
| 5054 | b->text->beg = (unsigned char *) p; | 5054 | b->text->beg = p; |
| 5055 | unblock_input (); | 5055 | unblock_input (); |
| 5056 | } | 5056 | } |
| 5057 | 5057 | ||
| @@ -5079,7 +5079,7 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta) | |||
| 5079 | memory_full (nbytes); | 5079 | memory_full (nbytes); |
| 5080 | } | 5080 | } |
| 5081 | 5081 | ||
| 5082 | BUF_BEG_ADDR (b) = (unsigned char *) p; | 5082 | BUF_BEG_ADDR (b) = p; |
| 5083 | unblock_input (); | 5083 | unblock_input (); |
| 5084 | } | 5084 | } |
| 5085 | 5085 | ||
| @@ -5397,11 +5397,7 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, | |||
| 5397 | bo_fwd->predicate = predicate; | 5397 | bo_fwd->predicate = predicate; |
| 5398 | sym->declared_special = 1; | 5398 | sym->declared_special = 1; |
| 5399 | sym->redirect = SYMBOL_FORWARDED; | 5399 | sym->redirect = SYMBOL_FORWARDED; |
| 5400 | { | 5400 | SET_SYMBOL_FWD (sym, (union Lisp_Fwd *) bo_fwd); |
| 5401 | /* I tried to do the job without a cast, but it seems impossible. | ||
| 5402 | union Lisp_Fwd *fwd; &(fwd->u_buffer_objfwd) = bo_fwd; */ | ||
| 5403 | SET_SYMBOL_FWD (sym, (union Lisp_Fwd *)bo_fwd); | ||
| 5404 | } | ||
| 5405 | XSETSYMBOL (PER_BUFFER_SYMBOL (offset), sym); | 5401 | XSETSYMBOL (PER_BUFFER_SYMBOL (offset), sym); |
| 5406 | 5402 | ||
| 5407 | if (PER_BUFFER_IDX (offset) == 0) | 5403 | if (PER_BUFFER_IDX (offset) == 0) |