- Add header guards
- Fix style
- Add assert in case of wrong parameter
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2706
38d2e660-2303-0410-9eaa-
f027e97ec537
std_whence = SEEK_END;
break;
case KSM_SEEK_SET:
- /* fall */
- default:
std_whence = SEEK_SET;
+ break;
+ default:
+ ASSERT(0);
}
return fseek(fd->fp, offset, std_whence);
return fflush(fd->fp);
}
-FILE* kfile_posix_init(KFilePosix *file, const char *filename, const char *mode)
+FILE *kfile_posix_init(KFilePosix *file, const char *filename, const char *mode)
{
file->fd._type = KFT_KFILEPOSIX;
file->fd.read = kfile_posix_read;
* \author Luca Ottaviano <lottaviano@develer.com>
*/
+#ifndef KFILE_POSIX_H
+#define KFILE_POSIX_H
+
#include <kern/kfile.h>
#include <stdio.h>
}
FILE *kfile_posix_init(KFilePosix *file, const char *filename, const char *mode);
+
+#endif /* KFILE_POSIX_H */