*/
#include <stdio.h>
#include <sys/types.h>
#include "pi-source.h"
#include "pi-file.h"
fd;
pi_buffer_t *buffer;
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd < 0)
return -1;