Commit graph

162 commits

Author SHA1 Message Date
Daniel Stenberg
39fb8f0705 Jean-Philippe Bernardy: C versions of memset() and memcpy() for archs with
no asm optimized versions.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5550 a1c6a512-1295-4272-9138-f99709370657
2005-01-10 21:31:13 +00:00
Jörg Hohensohn
dcdffe828c using a pointer instead of array dereferencing saves ~250 bytes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5529 a1c6a512-1295-4272-9138-f99709370657
2005-01-03 20:23:42 +00:00
Jörg Hohensohn
6dda40124d volume names look better in sharp brackets, code slightly more compact
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5523 a1c6a512-1295-4272-9138-f99709370657
2005-01-01 14:27:28 +00:00
Jörg Hohensohn
1a5962f2be Shared mounting code, also more general. It will mount multiple HD partitions, too, once HAVE_MULTIVOLUME is enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5518 a1c6a512-1295-4272-9138-f99709370657
2004-12-29 22:10:24 +00:00
Jörg Hohensohn
da84857631 prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657
2004-12-28 22:16:07 +00:00
Jens Arnold
f78524bf93 Bug fix: Do only flush the sector buffer after writing head bytes if it really needs to be. The old code did flush always, causing the huge slowdown of fprintf() and other places writing byte-wise
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5413 a1c6a512-1295-4272-9138-f99709370657
2004-11-17 02:34:17 +00:00
Linus Nielsen Feltzing
04c5ecb4ee Wrong typing caused a very skewed random number distribution
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5385 a1c6a512-1295-4272-9138-f99709370657
2004-11-06 23:33:07 +00:00
Linus Nielsen Feltzing
ba809183a8 Ported to Coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5347 a1c6a512-1295-4272-9138-f99709370657
2004-10-26 05:40:24 +00:00
Jörg Hohensohn
85c91a3b8e void* can't be offset, gcc should not allows this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5147 a1c6a512-1295-4272-9138-f99709370657
2004-10-01 19:45:51 +00:00
Jens Arnold
8537e2d12a Bug fix: open() now handles O_TRUNC correctly (this was the real cause for the .playlist_control corruption)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5048 a1c6a512-1295-4272-9138-f99709370657
2004-09-06 23:33:21 +00:00
Linus Nielsen Feltzing
e0e0140f4e Bug fix: renaming a directory could cause a name clash. New feature: rename() can now move files/directories as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5008 a1c6a512-1295-4272-9138-f99709370657
2004-08-22 11:28:24 +00:00
Jens Arnold
0ceaa5e365 Const policed pointer arguments to functions, part 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
2004-08-17 01:45:48 +00:00
Jens Arnold
3a43231392 Fixed a warning when (experimentally) compiling with -Os
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4966 a1c6a512-1295-4272-9138-f99709370657
2004-07-27 19:51:05 +00:00
Jens Arnold
0258287e57 Made the char property lookup table constant
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4905 a1c6a512-1295-4272-9138-f99709370657
2004-07-20 22:32:17 +00:00
Jens Arnold
f68e13c5b4 The pathname argument for open() is declared const, so copy it has to be copied
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4894 a1c6a512-1295-4272-9138-f99709370657
2004-07-19 21:08:44 +00:00
Jörg Hohensohn
74eb64257a infrastructure for sorting by date+time, now we "only" need to decide on the UI
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4778 a1c6a512-1295-4272-9138-f99709370657
2004-06-20 16:34:29 +00:00
Linus Nielsen Feltzing
7662f06e53 valid_time() now handles tm_wday correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4555 a1c6a512-1295-4272-9138-f99709370657
2004-04-25 23:47:50 +00:00
Jens Arnold
4f7956c206 (v)snprintf() wrote past buffer end if string length was equal to buffer size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4549 a1c6a512-1295-4272-9138-f99709370657
2004-04-22 21:19:33 +00:00
Linus Nielsen Feltzing
7ddf0d673d Reworked the time get/set functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4522 a1c6a512-1295-4272-9138-f99709370657
2004-04-20 10:23:57 +00:00
Linus Nielsen Feltzing
18d5d30c1c Better POSIX compatibility for mkdir(), rmdir() and opendir()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4521 a1c6a512-1295-4272-9138-f99709370657
2004-04-20 10:15:39 +00:00
Linus Nielsen Feltzing
bc9397d1fa New function: rmdir(). Also some changes in the fat code, to track the parent directory in opendir(), to be able to delete directories
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4509 a1c6a512-1295-4272-9138-f99709370657
2004-04-16 08:58:29 +00:00
Linus Nielsen Feltzing
b8beff39e9 No need to call fat_truncate() to delete the file, fat_remove() frees all clusters anyway
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4508 a1c6a512-1295-4272-9138-f99709370657
2004-04-16 08:54:13 +00:00
Jörg Hohensohn
b61cf76aba patch #917153: faster memset()/memcpy()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4406 a1c6a512-1295-4272-9138-f99709370657
2004-03-18 22:06:36 +00:00
Linus Nielsen Feltzing
5c8e82e097 You can't open() a directory as a file (at least not for writing)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4359 a1c6a512-1295-4272-9138-f99709370657
2004-03-10 19:47:59 +00:00
Linus Nielsen Feltzing
05f1fc4654 Empty file/dir names are now rejected by open() and mkdir()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4303 a1c6a512-1295-4272-9138-f99709370657
2004-02-11 14:37:16 +00:00
Linus Nielsen Feltzing
ef7293f0bc New feature: NOw you can store the recorded files in either /recordings (the directory will be created automatically) or in the current directory.
New feature: A "Create directory" menu option (untested in the simulator).
Bug fix: The ON+Play menu could do nasty things if you pressed ON+Play in an empty dir.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4268 a1c6a512-1295-4272-9138-f99709370657
2004-01-21 14:58:40 +00:00
Linus Nielsen Feltzing
54353e04b1 Second bug in mkdir() :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4241 a1c6a512-1295-4272-9138-f99709370657
2004-01-15 15:56:19 +00:00
Linus Nielsen Feltzing
ce1c93d628 First mkdir() bug killed :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4239 a1c6a512-1295-4272-9138-f99709370657
2004-01-15 14:34:54 +00:00
Linus Nielsen Feltzing
60b1c4bbe1 Implemented the mkdir() function in the FAT32 driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4238 a1c6a512-1295-4272-9138-f99709370657
2004-01-15 14:30:59 +00:00
Björn Stenberg
96147edb7d Moved memset() out of .iram
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4170 a1c6a512-1295-4272-9138-f99709370657
2003-12-21 12:22:50 +00:00
Daniel Stenberg
ae960a9ece my take at fixing the simulator warnings by adding mode_t, size_t, ssize_t
and off_t


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4116 a1c6a512-1295-4272-9138-f99709370657
2003-12-08 21:58:38 +00:00
Hardeep Sidhu
9e4262081b Added dynamic playlists. ON+PLAY->Playlist on a track, directory, or playlist from file browser to see available options.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3796 a1c6a512-1295-4272-9138-f99709370657
2003-07-01 21:05:43 +00:00
Björn Stenberg
a4baacd3ec Renamed flush() to fsync() to be more in line with POSIX/unix
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3766 a1c6a512-1295-4272-9138-f99709370657
2003-06-29 13:17:19 +00:00
Linus Nielsen Feltzing
c6db7870ef Slightly better handling of disk-full situations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3756 a1c6a512-1295-4272-9138-f99709370657
2003-06-19 12:08:22 +00:00
Linus Nielsen Feltzing
d9a2ef49d6 Fixed bad %x handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3695 a1c6a512-1295-4272-9138-f99709370657
2003-05-24 00:19:27 +00:00
Daniel Stenberg
2723531ff3 remove the ifdef for simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3616 a1c6a512-1295-4272-9138-f99709370657
2003-04-25 13:35:31 +00:00
Daniel Stenberg
012d1f86cc use size_t and not int as the prototype says so
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3614 a1c6a512-1295-4272-9138-f99709370657
2003-04-25 12:43:44 +00:00
Daniel Stenberg
ed155ccc39 include the sprintf.h header, basicly for simulator purposes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3612 a1c6a512-1295-4272-9138-f99709370657
2003-04-25 12:36:52 +00:00
Björn Stenberg
631b8d3bb8 Update fileoffset and cacheoffset on error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3556 a1c6a512-1295-4272-9138-f99709370657
2003-04-15 08:07:50 +00:00
Linus Nielsen Feltzing
e98bad5b38 Added the filesize() function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3473 a1c6a512-1295-4272-9138-f99709370657
2003-03-18 00:39:57 +00:00
Daniel Stenberg
73b427a743 kill warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3455 a1c6a512-1295-4272-9138-f99709370657
2003-03-16 22:35:30 +00:00
Daniel Stenberg
3f27f7d82c only do the fprintf() if not doing a simulator, since this file is used
for the win32 simulator and the fprintf() of Rockbox differs slightly from
how the true POSIX one is (the first argument).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3452 a1c6a512-1295-4272-9138-f99709370657
2003-03-16 21:42:22 +00:00
Daniel Stenberg
758a2c823a introducing fprintf():
int fprintf(int fd, const char *fmt, ...)

Returns number of bytes written to the file descriptor.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3450 a1c6a512-1295-4272-9138-f99709370657
2003-03-16 19:43:28 +00:00
Hardeep Sidhu
e5e9bc3e65 Previous change broke read after seek. Reverted that change and added temporary fix in flush_cache to make sure we are on correct sector before writing to disk.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3448 a1c6a512-1295-4272-9138-f99709370657
2003-03-15 21:13:35 +00:00
Hardeep Sidhu
67c1a0c63c Make sure we are on correct sector after lseek. This fixes the queue file corruption bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3443 a1c6a512-1295-4272-9138-f99709370657
2003-03-14 15:39:50 +00:00
Björn Stenberg
3ca8d3589e flush_cache() failure should still return error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3433 a1c6a512-1295-4272-9138-f99709370657
2003-03-12 15:15:46 +00:00
Björn Stenberg
188be8ec57 Bug fix: If head bytes were read but sector read failed, return head byte count instead of error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3432 a1c6a512-1295-4272-9138-f99709370657
2003-03-12 15:06:57 +00:00
Linus Nielsen Feltzing
5f12c8fbc7 Killed compiling error on debug builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3425 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 21:55:59 +00:00
Linus Nielsen Feltzing
9cb9c821a0 Killed a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3423 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 20:49:18 +00:00
Linus Nielsen Feltzing
44e51833ed Zagor added the flush() function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3416 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 17:10:46 +00:00