/* Reads data from file descriptor `fd' to `buf'. */
-int silc_file_read(int fd, unsigned char *buf, uint32 buf_len)
+int silc_file_read(int fd, unsigned char *buf, SilcUInt32 buf_len)
{
return read(fd, (void *)buf, buf_len);
}
/* Writes `buffer' of length of `len' to file descriptor `fd. */
-int silc_file_write(int fd, const char *buffer, uint32 len)
+int silc_file_write(int fd, const char *buffer, SilcUInt32 len)
{
return write(fd, (const void *)buffer, len);
}
/* Writes a buffer to the file. */
-int silc_file_writefile(const char *filename, const char *buffer, uint32 len)
+int silc_file_writefile(const char *filename, const char *buffer, SilcUInt32 len)
{
int fd;
set to the file. */
int silc_file_writefile_mode(const char *filename, const char *buffer,
- uint32 len, int mode)
+ SilcUInt32 len, int mode)
{
int fd;
/* Reads a file to a buffer. The allocated buffer is returned. Length of
the file read is returned to the return_len argument. */
-char *silc_file_readfile(const char *filename, uint32 *return_len)
+char *silc_file_readfile(const char *filename, SilcUInt32 *return_len)
{
int fd;
char *buffer;
/* Returns files size. Returns 0 on error. */
-uint64 silc_file_size(const char *filename)
+SilcUInt64 silc_file_size(const char *filename)
{
int ret;
struct stat stats;
if (ret < 0)
return 0;
- return (uint64)stats.st_size;
+ return (SilcUInt64)stats.st_size;
}