view src/lib/write-full.h @ 29:e9375147c0cb HEAD

Added write_full() which is a simple wrapper around write() meant for writing into files. When there's too much deleted data in index files, they're now compressed when the index is being opened.
author Timo Sirainen <tss@iki.fi>
date Mon, 26 Aug 2002 02:46:59 +0300
parents
children ca6967899c05
line wrap: on
line source

#ifndef __WRITE_FULL_H
#define __WRITE_FULL_H

/* Write data into file. Returns -1 if error occured, or 0 if all was ok.
   If there's not enough space in device -1 with ENOSPC is returned, and
   it's unspecified how much data was actually written. */
int write_full(int fd, const void *data, size_t size);

#endif