#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
Go to the source code of this file.
|
static int | deliver_file (char *path, int fdout) |
|
int | main (int argc, char *argv[]) |
|
◆ BUFLEN
◆ deliver_file()
static int deliver_file |
( |
char * |
path, |
|
|
int |
fdout |
|
) |
| |
|
static |
Definition at line 17 of file rawplayer.c.
References buf, BUFLEN, and error().
Referenced by main().
18 int fd = 0, bytes = 0,
error = 0;
21 if ((fd = open(path,O_RDONLY))) {
22 while ((bytes=read(fd, buf,
BUFLEN)) > 0) {
23 if(write(fdout, buf, bytes) < 0){
int error(const char *format,...)
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 37 of file rawplayer.c.
References deliver_file().
39 fdout = fileno(stdout);
41 for (x = 1; x < argc ; x++) {
static int deliver_file(char *path, int fdout)