From 33ac04147b6c42796f4c0c16d6aeb261033c171e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Jul 2010 19:50:14 +0200 Subject: [PATCH] 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) --- src/ChangeLog | 7 +++++++ src/alloc.c | 10 ---------- src/font.c | 33 --------------------------------- src/frame.c | 10 +--------- src/ralloc.c | 29 ----------------------------- src/w32menu.c | 32 -------------------------------- 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 @@ 2010-07-23 Juanma Barranquero + * 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): + Remove unused static functions. + * menu.c (cleanup_popup_menu): Set inside "#ifdef HAVE_NS"; it is called only from NS code. 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) } -/* Explicitly free a float cell by putting it on the free-list. */ - -static void -free_float (struct Lisp_Float *ptr) -{ - ptr->u.chain = float_free_list; - float_free_list = ptr; -} - - /* Return a new float object with value FLOAT_VALUE. */ Lisp_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) } -#ifdef ENABLE_CHECKING -/* Match a 14-field XLFD pattern against a full XLFD font name. */ -static int -font_match_xlfd (char *pattern, char *name) -{ - while (*pattern && *name) - { - if (*pattern == *name) - pattern++; - else if (*pattern == '*') - if (*name == pattern[1]) - pattern += 2; - else - ; - else - return 0; - name++; - } - return 1; -} - -/* Make sure the font object matches the XLFD font name. */ -static int -font_check_xlfd_parse (Lisp_Object font, char *name) -{ - char name_check[256]; - font_unparse_xlfd (font, 0, name_check, 255); - return font_match_xlfd (name_check, name); -} - -#endif - - /* Parse NAME (null terminated) as XLFD and store information in FONT (font-spec or font-entity). Size property of FONT is set as 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) return 1; } -/* Error handler for `delete-frame-functions'. */ -static Lisp_Object -delete_frame_handler (Lisp_Object arg) -{ - add_to_log ("Error during `delete-frame': %s", arg, Qnil); - return Qnil; -} - extern Lisp_Object Qrun_hook_with_args; /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME @@ -1299,7 +1291,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) /* If we use `register' here, gcc-4.0.2 on amd64 using -DUSE_LISP_UNION_TYPE complains further down that we're getting the address of `force'. Go figure. */ - + { struct frame *f; 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) return 1; } - -/* Reorder the bloc BLOC to go before bloc BEFORE in the doubly linked list. - This is necessary if we put the memory of space of BLOC - before that of BEFORE. */ - -static void -reorder_bloc (bloc_ptr bloc, bloc_ptr before) -{ - bloc_ptr prev, next; - - /* Splice BLOC out from where it is. */ - prev = bloc->prev; - next = bloc->next; - - if (prev) - prev->next = next; - if (next) - next->prev = prev; - - /* Splice it in before BEFORE. */ - prev = before->prev; - - if (prev) - prev->next = bloc; - bloc->prev = prev; - - before->prev = bloc; - bloc->next = before; -} /* Update the records of which heaps contain which blocs, starting 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); int pending_menu_activation; - -/* Return the frame whose ->output_data.w32->menubar_widget equals - ID, or 0 if none. */ - -static struct frame * -menubar_id_to_frame (HMENU id) -{ - Lisp_Object tail, frame; - FRAME_PTR f; - - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) - { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; - f = XFRAME (frame); - if (!FRAME_WINDOW_P (f)) - continue; - if (f->output_data.w32->menubar_widget == id) - return f; - } - return 0; -} - #ifdef HAVE_MENUS DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, @@ -1316,14 +1292,6 @@ name_is_separator (char *name) return (*name == '\0' || start + 2 == name); } - -/* Indicate boundary between left and right. */ -static int -add_left_right_boundary (HMENU menu) -{ - return AppendMenu (menu, MF_MENUBARBREAK, 0, NULL); -} - /* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */ static void utf8to16 (unsigned char * src, int len, WCHAR * dest) -- 2.39.2