-static void
-do_freeargv (void *arg)
-{
- freeargv ((char **) arg);
-}
-
-struct cleanup *
-make_cleanup_freeargv (char **arg)
-{
- return make_cleanup (do_freeargv, arg);
-}
-
-static void
-do_dyn_string_delete (void *arg)
-{
- dyn_string_delete ((dyn_string_t) arg);
-}
-
-struct cleanup *
-make_cleanup_dyn_string_delete (dyn_string_t arg)
-{
- return make_cleanup (do_dyn_string_delete, arg);
-}
-
-static void
-do_bfd_close_cleanup (void *arg)
-{
- gdb_bfd_unref ((bfd *) arg);
-}
-
-struct cleanup *
-make_cleanup_bfd_unref (bfd *abfd)
-{
- return make_cleanup (do_bfd_close_cleanup, abfd);
-}
-
-/* Helper function which does the work for make_cleanup_fclose. */
-
-static void
-do_fclose_cleanup (void *arg)
-{
- FILE *file = (FILE *) arg;
-
- fclose (file);
-}
-
-/* Return a new cleanup that closes FILE. */
-
-struct cleanup *
-make_cleanup_fclose (FILE *file)
-{
- return make_cleanup (do_fclose_cleanup, file);
-}
-
-/* Helper function which does the work for make_cleanup_obstack_free. */
-
-static void
-do_obstack_free (void *arg)
-{
- struct obstack *ob = (struct obstack *) arg;
-
- obstack_free (ob, NULL);
-}
-
-/* Return a new cleanup that frees OBSTACK. */
-
-struct cleanup *
-make_cleanup_obstack_free (struct obstack *obstack)
-{
- return make_cleanup (do_obstack_free, obstack);
-}
-
-static void
-do_ui_file_delete (void *arg)
-{
- ui_file_delete ((struct ui_file *) arg);
-}
-
-struct cleanup *
-make_cleanup_ui_file_delete (struct ui_file *arg)
-{
- return make_cleanup (do_ui_file_delete, arg);
-}
-
-/* Helper function for make_cleanup_ui_out_redirect_pop. */
-
-static void
-do_ui_out_redirect_pop (void *arg)
-{
- struct ui_out *uiout = (struct ui_out *) arg;
-
- if (ui_out_redirect (uiout, NULL) < 0)
- warning (_("Cannot restore redirection of the current output protocol"));
-}
-
-/* Return a new cleanup that pops the last redirection by ui_out_redirect
- with NULL parameter. */
-
-struct cleanup *
-make_cleanup_ui_out_redirect_pop (struct ui_out *uiout)
-{
- return make_cleanup (do_ui_out_redirect_pop, uiout);
-}
-