Mercurial > emacs
comparison src/buffer.c @ 21514:fa9ff387d260
Fix -Wimplicit warnings.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Tue, 14 Apr 1998 12:25:56 +0000 |
parents | a44f9f59c656 |
children | afbf4a3def4c |
comparison
equal
deleted
inserted
replaced
21513:984881b316fc | 21514:fa9ff387d260 |
---|---|
31 /* in 4.1, param.h fails to define this. */ | 31 /* in 4.1, param.h fails to define this. */ |
32 #define MAXPATHLEN 1024 | 32 #define MAXPATHLEN 1024 |
33 #endif /* not MAXPATHLEN */ | 33 #endif /* not MAXPATHLEN */ |
34 | 34 |
35 #include <config.h> | 35 #include <config.h> |
36 #ifdef STDC_HEADERS | |
37 #include <stdlib.h> | |
38 #endif | |
39 #ifdef HAVE_UNISTD_H | |
40 #include <unistd.h> | |
41 #endif | |
36 #include "lisp.h" | 42 #include "lisp.h" |
37 #include "intervals.h" | 43 #include "intervals.h" |
38 #include "window.h" | 44 #include "window.h" |
39 #include "commands.h" | 45 #include "commands.h" |
40 #include "buffer.h" | 46 #include "buffer.h" |
2228 int beg, end; | 2234 int beg, end; |
2229 int priority; | 2235 int priority; |
2230 }; | 2236 }; |
2231 | 2237 |
2232 static int | 2238 static int |
2233 compare_overlays (s1, s2) | 2239 compare_overlays (v1, v2) |
2234 struct sortvec *s1, *s2; | 2240 const void *v1, *v2; |
2235 { | 2241 { |
2242 const struct sortvec *s1 = (const struct sortvec *) v1; | |
2243 const struct sortvec *s2 = (const struct sortvec *) v2; | |
2236 if (s1->priority != s2->priority) | 2244 if (s1->priority != s2->priority) |
2237 return s1->priority - s2->priority; | 2245 return s1->priority - s2->priority; |
2238 if (s1->beg != s2->beg) | 2246 if (s1->beg != s2->beg) |
2239 return s1->beg - s2->beg; | 2247 return s1->beg - s2->beg; |
2240 if (s1->end != s2->end) | 2248 if (s1->end != s2->end) |
3771 | 3779 |
3772 error ("Only %s should be stored in the buffer-local variable %s", | 3780 error ("Only %s should be stored in the buffer-local variable %s", |
3773 type_name, XSYMBOL (sym)->name->data); | 3781 type_name, XSYMBOL (sym)->name->data); |
3774 } | 3782 } |
3775 | 3783 |
3784 void | |
3776 init_buffer_once () | 3785 init_buffer_once () |
3777 { | 3786 { |
3778 register Lisp_Object tem; | 3787 register Lisp_Object tem; |
3779 | 3788 |
3780 buffer_permanent_local_flags = 0; | 3789 buffer_permanent_local_flags = 0; |
3912 Vbuffer_alist = Qnil; | 3921 Vbuffer_alist = Qnil; |
3913 | 3922 |
3914 Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); | 3923 Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
3915 } | 3924 } |
3916 | 3925 |
3926 void | |
3917 init_buffer () | 3927 init_buffer () |
3918 { | 3928 { |
3919 char buf[MAXPATHLEN+1]; | 3929 char buf[MAXPATHLEN+1]; |
3920 char *pwd; | 3930 char *pwd; |
3921 struct stat dotstat, pwdstat; | 3931 struct stat dotstat, pwdstat; |
3971 temp = get_minibuffer (0); | 3981 temp = get_minibuffer (0); |
3972 XBUFFER (temp)->directory = current_buffer->directory; | 3982 XBUFFER (temp)->directory = current_buffer->directory; |
3973 } | 3983 } |
3974 | 3984 |
3975 /* initialize the buffer routines */ | 3985 /* initialize the buffer routines */ |
3986 void | |
3976 syms_of_buffer () | 3987 syms_of_buffer () |
3977 { | 3988 { |
3978 extern Lisp_Object Qdisabled; | 3989 extern Lisp_Object Qdisabled; |
3979 | 3990 |
3980 staticpro (&last_overlay_modification_hooks); | 3991 staticpro (&last_overlay_modification_hooks); |
4551 defsubr (&Soverlay_lists); | 4562 defsubr (&Soverlay_lists); |
4552 defsubr (&Soverlay_get); | 4563 defsubr (&Soverlay_get); |
4553 defsubr (&Soverlay_put); | 4564 defsubr (&Soverlay_put); |
4554 } | 4565 } |
4555 | 4566 |
4567 void | |
4556 keys_of_buffer () | 4568 keys_of_buffer () |
4557 { | 4569 { |
4558 initial_define_key (control_x_map, 'b', "switch-to-buffer"); | 4570 initial_define_key (control_x_map, 'b', "switch-to-buffer"); |
4559 initial_define_key (control_x_map, 'k', "kill-buffer"); | 4571 initial_define_key (control_x_map, 'k', "kill-buffer"); |
4560 | 4572 |