rawplayer.c
来自「一个非常美妙的proxy。功能强大。基于sip的协议。如果还要的话」· C语言 代码 · 共 39 行
C
39 行
/* Rawplayer.c simple raw file stdout player (c) Anthony C Minessale II <anthmct@yahoo.com>*/#define BUFLEN 320#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>static int deliver_file(char *path, int fdout) { int fd = 0, bytes = 0; short buf[BUFLEN]; if ((fd = open(path,O_RDONLY))) { while ((bytes=read(fd, buf, BUFLEN))) { write(fdout, buf, bytes); } if(fd) close(fd); } else return -1; return 0;}int main(int argc, char *argv[]) { int x = 0, fdout = 0; fdout = fileno(stdout); for (;;) for (x = 1; x < argc ; x++) { if(deliver_file(argv[x], fdout)) exit(1); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?