summaryrefslogtreecommitdiffstats
path: root/tools/checkwps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-03 15:12:19 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-03 15:12:19 +0000
commit69f8e8d277f3edd02d44ac1452d9471a5fedf2f1 (patch)
tree50d9ffbad95ae31e14a6fbfb5a272deff6dd9b29 /tools/checkwps
parentb3f1eb8bbafdac59f2f532adaae97debbcf48a9b (diff)
downloadrockbox-69f8e8d277f3edd02d44ac1452d9471a5fedf2f1.tar.gz
rockbox-69f8e8d277f3edd02d44ac1452d9471a5fedf2f1.tar.bz2
rockbox-69f8e8d277f3edd02d44ac1452d9471a5fedf2f1.zip
Move read_line() further down so that it can be used in checkwps and remove checkwps' copy if it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25793 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps')
-rw-r--r--tools/checkwps/checkwps.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 32d7ef16fd..6760d6215e 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -98,36 +98,6 @@ unsigned int htole32(unsigned int x)
}
#endif
-int read_line(int fd, char* buffer, int buffer_size)
-{
- int count = 0;
- int num_read = 0;
-
- errno = 0;
-
- while (count < buffer_size)
- {
- unsigned char c;
-
- if (1 != read(fd, &c, 1))
- break;
-
- num_read++;
-
- if ( c == '\n' )
- break;
-
- if ( c == '\r' )
- continue;
-
- buffer[count++] = c;
- }
-
- buffer[MIN(count, buffer_size - 1)] = 0;
-
- return errno ? -1 : num_read;
-}
-
int recalc_dimension(struct dim *dst, struct dim *src)
{
return 0;