aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-23 19:50:14 +0200
committerJuanma Barranquero2010-07-23 19:50:14 +0200
commit33ac04147b6c42796f4c0c16d6aeb261033c171e (patch)
tree41a8f653f89ff485760e3fe495bc78fe24e4a967 /src
parent225d5e9e16070f908c22e1b40bf9db29fdf17c20 (diff)
downloademacs-33ac04147b6c42796f4c0c16d6aeb261033c171e.tar.gz
emacs-33ac04147b6c42796f4c0c16d6aeb261033c171e.zip
Remove unused static functions.
* alloc.c (free_float) * font.c [ENABLE_CHECKING] (font_match_xlfd, font_check_xlfd_parse) * frame.c (delete_frame_handler) * ralloc.c (reorder_bloc) * w32menu.c (menubar_id_to_frame, add_left_right_boundary)
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/alloc.c10
-rw-r--r--src/font.c33
-rw-r--r--src/frame.c10
-rw-r--r--src/ralloc.c29
-rw-r--r--src/w32menu.c32
6 files changed, 8 insertions, 113 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6a0475f5741..0124b493c0f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
12010-07-23 Juanma Barranquero <lekktu@gmail.com> 12010-07-23 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * alloc.c (free_float):
4 * font.c [ENABLE_CHECKING] (font_match_xlfd, font_check_xlfd_parse):
5 * frame.c (delete_frame_handler):
6 * ralloc.c (reorder_bloc):
7 * w32menu.c (menubar_id_to_frame, add_left_right_boundary):
8 Remove unused static functions.
9
3 * menu.c (cleanup_popup_menu): Set inside "#ifdef HAVE_NS"; 10 * menu.c (cleanup_popup_menu): Set inside "#ifdef HAVE_NS";
4 it is called only from NS code. 11 it is called only from NS code.
5 12
diff --git a/src/alloc.c b/src/alloc.c
index 2ce74f97ff7..2ddec3dbe48 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2538,16 +2538,6 @@ init_float (void)
2538} 2538}
2539 2539
2540 2540
2541/* Explicitly free a float cell by putting it on the free-list. */
2542
2543static void
2544free_float (struct Lisp_Float *ptr)
2545{
2546 ptr->u.chain = float_free_list;
2547 float_free_list = ptr;
2548}
2549
2550
2551/* Return a new float object with value FLOAT_VALUE. */ 2541/* Return a new float object with value FLOAT_VALUE. */
2552 2542
2553Lisp_Object 2543Lisp_Object
diff --git a/src/font.c b/src/font.c
index cb3e9c5d326..23022204729 100644
--- a/src/font.c
+++ b/src/font.c
@@ -980,39 +980,6 @@ font_expand_wildcards (Lisp_Object *field, int n)
980} 980}
981 981
982 982
983#ifdef ENABLE_CHECKING
984/* Match a 14-field XLFD pattern against a full XLFD font name. */
985static int
986font_match_xlfd (char *pattern, char *name)
987{
988 while (*pattern && *name)
989 {
990 if (*pattern == *name)
991 pattern++;
992 else if (*pattern == '*')
993 if (*name == pattern[1])
994 pattern += 2;
995 else
996 ;
997 else
998 return 0;
999 name++;
1000 }
1001 return 1;
1002}
1003
1004/* Make sure the font object matches the XLFD font name. */
1005static int
1006font_check_xlfd_parse (Lisp_Object font, char *name)
1007{
1008 char name_check[256];
1009 font_unparse_xlfd (font, 0, name_check, 255);
1010 return font_match_xlfd (name_check, name);
1011}
1012
1013#endif
1014
1015
1016/* Parse NAME (null terminated) as XLFD and store information in FONT 983/* Parse NAME (null terminated) as XLFD and store information in FONT
1017 (font-spec or font-entity). Size property of FONT is set as 984 (font-spec or font-entity). Size property of FONT is set as
1018 follows: 985 follows:
diff --git a/src/frame.c b/src/frame.c
index 69a640cdc96..0cd7377ece1 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1280,14 +1280,6 @@ other_visible_frames (FRAME_PTR f)
1280 return 1; 1280 return 1;
1281} 1281}
1282 1282
1283/* Error handler for `delete-frame-functions'. */
1284static Lisp_Object
1285delete_frame_handler (Lisp_Object arg)
1286{
1287 add_to_log ("Error during `delete-frame': %s", arg, Qnil);
1288 return Qnil;
1289}
1290
1291extern Lisp_Object Qrun_hook_with_args; 1283extern Lisp_Object Qrun_hook_with_args;
1292 1284
1293/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME 1285/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
@@ -1299,7 +1291,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1299 /* If we use `register' here, gcc-4.0.2 on amd64 using 1291 /* If we use `register' here, gcc-4.0.2 on amd64 using
1300 -DUSE_LISP_UNION_TYPE complains further down that we're getting the 1292 -DUSE_LISP_UNION_TYPE complains further down that we're getting the
1301 address of `force'. Go figure. */ 1293 address of `force'. Go figure. */
1302 1294
1303{ 1295{
1304 struct frame *f; 1296 struct frame *f;
1305 struct frame *sf = SELECTED_FRAME (); 1297 struct frame *sf = SELECTED_FRAME ();
diff --git a/src/ralloc.c b/src/ralloc.c
index 0a2b156e393..f0299873f54 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -519,35 +519,6 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
519 519
520 return 1; 520 return 1;
521} 521}
522
523/* Reorder the bloc BLOC to go before bloc BEFORE in the doubly linked list.
524 This is necessary if we put the memory of space of BLOC
525 before that of BEFORE. */
526
527static void
528reorder_bloc (bloc_ptr bloc, bloc_ptr before)
529{
530 bloc_ptr prev, next;
531
532 /* Splice BLOC out from where it is. */
533 prev = bloc->prev;
534 next = bloc->next;
535
536 if (prev)
537 prev->next = next;
538 if (next)
539 next->prev = prev;
540
541 /* Splice it in before BEFORE. */
542 prev = before->prev;
543
544 if (prev)
545 prev->next = bloc;
546 bloc->prev = prev;
547
548 before->prev = bloc;
549 bloc->next = before;
550}
551 522
552/* Update the records of which heaps contain which blocs, starting 523/* Update the records of which heaps contain which blocs, starting
553 with heap HEAP and bloc BLOC. */ 524 with heap HEAP and bloc BLOC. */
diff --git a/src/w32menu.c b/src/w32menu.c
index e96b70b59dc..919f8505da8 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -111,30 +111,6 @@ void w32_free_menu_strings (HWND);
111 111
112int pending_menu_activation; 112int pending_menu_activation;
113 113
114
115/* Return the frame whose ->output_data.w32->menubar_widget equals
116 ID, or 0 if none. */
117
118static struct frame *
119menubar_id_to_frame (HMENU id)
120{
121 Lisp_Object tail, frame;
122 FRAME_PTR f;
123
124 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
125 {
126 frame = XCAR (tail);
127 if (!FRAMEP (frame))
128 continue;
129 f = XFRAME (frame);
130 if (!FRAME_WINDOW_P (f))
131 continue;
132 if (f->output_data.w32->menubar_widget == id)
133 return f;
134 }
135 return 0;
136}
137
138#ifdef HAVE_MENUS 114#ifdef HAVE_MENUS
139 115
140DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, 116DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
@@ -1316,14 +1292,6 @@ name_is_separator (char *name)
1316 return (*name == '\0' || start + 2 == name); 1292 return (*name == '\0' || start + 2 == name);
1317} 1293}
1318 1294
1319
1320/* Indicate boundary between left and right. */
1321static int
1322add_left_right_boundary (HMENU menu)
1323{
1324 return AppendMenu (menu, MF_MENUBARBREAK, 0, NULL);
1325}
1326
1327/* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */ 1295/* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */
1328static void 1296static void
1329utf8to16 (unsigned char * src, int len, WCHAR * dest) 1297utf8to16 (unsigned char * src, int len, WCHAR * dest)