summaryrefslogtreecommitdiff
path: root/apps/buffering.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-26 21:54:23 +0000
committerSolomon Peachy <pizza@shaftnet.org>2022-04-20 16:51:49 -0400
commit9e93796407ecb8a347f9799c0a03e80939004bd7 (patch)
treeaf70eab0998907aa34602c9345115a60a03f0b4a /apps/buffering.h
parent931d61607174ad1b09f9725ec9da214b63daed85 (diff)
downloadrockbox-9e93796407ecb8a347f9799c0a03e80939004bd7.tar.gz
rockbox-9e93796407ecb8a347f9799c0a03e80939004bd7.zip
buffering: remove bufgettail/bufcuttail
These operations can only be used in limited circumstances and have exactly one user. bufgettail especially seems of dubious value; how often do you need to read N bytes from the end of a file without changing the file position? strip_tags() was the only function using them, to strip off ID3v1 and APE tags off the end of buffered tracks. This would save only 32-192 bytes per track -- if the container format uses APE/ID3v1. It hardly seems worth the effort. Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
Diffstat (limited to 'apps/buffering.h')
-rw-r--r--apps/buffering.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/buffering.h b/apps/buffering.h
index 1a75d865ae..bc47d6b1a1 100644
--- a/apps/buffering.h
+++ b/apps/buffering.h
@@ -46,8 +46,7 @@ enum data_type {
46#define ERR_FILE_ERROR -4 46#define ERR_FILE_ERROR -4
47#define ERR_HANDLE_NOT_DONE -5 47#define ERR_HANDLE_NOT_DONE -5
48#define ERR_UNSUPPORTED_TYPE -6 48#define ERR_UNSUPPORTED_TYPE -6
49#define ERR_WRONG_THREAD -7 49#define ERR_BITMAP_TOO_LARGE -7
50#define ERR_BITMAP_TOO_LARGE -8
51 50
52/* Initialise the buffering subsystem */ 51/* Initialise the buffering subsystem */
53void buffering_init(void) INIT_ATTR; 52void buffering_init(void) INIT_ATTR;
@@ -68,8 +67,6 @@ bool buffering_reset(char *buf, size_t buflen);
68 * bufftell : Return the handle's file read position 67 * bufftell : Return the handle's file read position
69 * bufread : Copy data from a handle to a buffer 68 * bufread : Copy data from a handle to a buffer
70 * bufgetdata: Obtain a pointer for linear access to a "size" amount of data 69 * bufgetdata: Obtain a pointer for linear access to a "size" amount of data
71 * bufgettail: Out-of-band get the last size bytes of a handle.
72 * bufcuttail: Out-of-band remove the trailing 'size' bytes of a handle.
73 * 70 *
74 * NOTE: bufread and bufgetdata will block the caller until the requested 71 * NOTE: bufread and bufgetdata will block the caller until the requested
75 * amount of data is ready (unless EOF is reached). 72 * amount of data is ready (unless EOF is reached).
@@ -85,8 +82,6 @@ int bufadvance(int handle_id, off_t offset);
85off_t bufftell(int handle_id); 82off_t bufftell(int handle_id);
86ssize_t bufread(int handle_id, size_t size, void *dest); 83ssize_t bufread(int handle_id, size_t size, void *dest);
87ssize_t bufgetdata(int handle_id, size_t size, void **data); 84ssize_t bufgetdata(int handle_id, size_t size, void **data);
88ssize_t bufgettail(int handle_id, size_t size, void **data);
89ssize_t bufcuttail(int handle_id, size_t size);
90 85
91/*************************************************************************** 86/***************************************************************************
92 * SECONDARY FUNCTIONS 87 * SECONDARY FUNCTIONS