summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/buflib.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-08-30 16:48:36 +0000
committerThomas Martitz <kugel@rockbox.org>2011-08-30 16:48:36 +0000
commit42f10e04df42ab19aac74f82a6f113ee29e2012b (patch)
treecf0561936fd8e22bc95b38a0575a078f7039acfa /apps/plugins/lib/buflib.h
parent456170afdf8eb9c43abe7580a3b522c934273a1e (diff)
downloadrockbox-42f10e04df42ab19aac74f82a6f113ee29e2012b.zip
rockbox-42f10e04df42ab19aac74f82a6f113ee29e2012b.tar.gz
rockbox-42f10e04df42ab19aac74f82a6f113ee29e2012b.tar.bz2
rockbox-42f10e04df42ab19aac74f82a6f113ee29e2012b.tar.xz
Remove buflib from the pluginlib and use the core one.
buflib_get_data() isn't inlined for plugins anymore, but can be if really needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30387 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/buflib.h')
-rw-r--r--apps/plugins/lib/buflib.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/apps/plugins/lib/buflib.h b/apps/plugins/lib/buflib.h
deleted file mode 100644
index 47ad57f..0000000
--- a/apps/plugins/lib/buflib.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************
-* __________ __ ___.
-* Open \______ \ ____ ____ | | _\_ |__ _______ ___
-* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-* \/ \/ \/ \/ \/
-* $Id$
-*
-* This is a memory allocator designed to provide reasonable management of free
-* space and fast access to allocated data. More than one allocator can be used
-* at a time by initializing multiple contexts.
-*
-* Copyright (C) 2009 Andrew Mahone
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-* KIND, either express or implied.
-*
-****************************************************************************/
-
-#ifndef _BUFLIB_H_
-#include <plugin.h>
-
-union buflib_data
-{
- intptr_t val;
- union buflib_data *ptr;
-};
-
-struct buflib_context
-{
- union buflib_data *handle_table;
- union buflib_data *first_free_handle;
- union buflib_data *last_handle;
- union buflib_data *first_free_block;
- union buflib_data *buf_start;
- union buflib_data *alloc_end;
- bool compact;
-};
-
-void buflib_init(struct buflib_context *context, void *buf, size_t size);
-int buflib_alloc(struct buflib_context *context, size_t size);
-void buflib_free(struct buflib_context *context, int handle);
-void* buflib_buffer_out(struct buflib_context *ctx, size_t *size);
-void buflib_buffer_in(struct buflib_context *ctx, int size);
-
-
-
-static inline void* buflib_get_data(struct buflib_context *context, int handle)
-{
- return (void*)(context->handle_table[-handle].ptr);
-}
-#endif