亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? posix.h

?? Linux下比較早的基于命令行的DVD播放器
?? H
字號:
//// Copyright (c) 2002 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA#ifndef DXR3PLAYER_POSIX_H#define DXR3PLAYER_POSIX_H//------------------------------------------------------------------------------#include <cstdarg>#include <unistd.h>#include <fcntl.h>#include <errno.h>#include <sys/socket.h>#include <sys/types.h>#include <sys/ioctl.h>//------------------------------------------------------------------------------//------------------------------------------------------------------------------/** * Wrappers for POSIX functions to handle errors uniformly. */class POSIX{public:    /**     * Wrapper for the open() system call which aborts the program if     * fails.     */    static int open(const char* pathname, int flags,                    const char* errorMessage = "open", ...);    /**     * Wrapper for the pipe system call which aborts the program if     * fails.     */    static void pipe(int filedes[2],                      const char* errorMessage = "pipe", ...);    /**     * Wrapper for the ioctl() system call which aborts the program if     * fails.     */    static int ioctl(int d, int request, void* arg,                     const char* errorMessage = "ioctl", ...);    /**     * Wrapper for the ioctl() system call which aborts the program if     * fails.     */    static int ioctl(int d, int request, void* arg,                     const char* errorMessage, va_list& ap);    /**     * Wrapper for the fcntl() system call which aborts the program if     * fails.     */    static int fcntl(int fd, int cmd,                     const char* errorMessage = "fcntl", ...);    /**     * Wrapper for the fcntl() system call which aborts the program if     * fails.     */    static int fcntl(int fd, int cmd, long arg,                     const char* errorMessage = "fcntl", ...);    /**     * Wrapper for the fcntl() system call which aborts the program if     * fails.     */    static int fcntl(int fd, int cmd, void* arg,                     const char* errorMessage = "fcntl", ...);    /**     * Wrapper for the select system call which aborts the program if     * fails.     */    static int select(int n, fd_set* readfds, fd_set* writefds,                      fd_set* exceptfds, struct timeval* timeout,                      const char* errorMessage = "select", ...);    /**     * Wrapper for the read() system call which aborts the program if     * fails.     */    static ssize_t read(int fd, void* buf, size_t count,                        const char* errorMessage = "read", ...);    /**     * Wrapper for the write() system call which aborts the program if     * fails.     */    static ssize_t write(int fd, const void* buf, size_t count,                         const char* errorMessage = "write", ...);    /**     * Wrapper for the lseek() system call which aborts the program if     * fails.     */    static off_t lseek(int fd, off_t offset, int whence,                       const char* errorMessage = "lseek", ...);    /**     * Wrapper for the socket() system call which aborts the program if     * fails.     */    static int socket(int domain, int type, int protocol,                      const char* errorMessage = "socket", ...);    /**     * Wrapper for the connect() system call which aborts the program if     * fails.     */    static int connect(int sockfd,                        const struct sockaddr* serv_addr,                        socklen_t addrlen,                       const char* errorMessage = "connect", ...);    /**     * Wrapper for the close() system call which aborts the program if     * fails.     */    static void close(int fd, const char* errorMessage = "close", ...);private:    /**     * Handle the given integer result. If -1, the program is aborted     * with error.     */    static int handleResult(int result, const char* errorMessage, va_list& ap,                            bool nonblocking = false);    /**     * Abort the program. The current error message is printed beforehand.     */    static void abort(const char* errorMessage, va_list& ap);};//------------------------------------------------------------------------------// Inline definitions//------------------------------------------------------------------------------inline int POSIX::handleResult(int result,                                const char* errorMessage, va_list& ap,                               bool nonblocking){    if (result==-1) {        if (nonblocking && errno==EAGAIN) {            result = 0;        } else {            abort(errorMessage, ap);        }    }    va_end(ap);    return result;}//------------------------------------------------------------------------------//------------------------------------------------------------------------------inline int POSIX::open(const char* pathname, int flags,                       const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::open(pathname, flags), errorMessage, ap);}//------------------------------------------------------------------------------inline void POSIX::pipe(int filedes[2], const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    handleResult(::pipe(filedes), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::ioctl(int d, int request, void* arg,                        const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return ioctl(d, request, arg, errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::ioctl(int d, int request, void* arg,                        const char* errorMessage, va_list& ap){    return handleResult(::ioctl(d, request, arg), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::fcntl(int fd, int cmd, const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::fcntl(fd, cmd), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::fcntl(int fd, int cmd, long arg,                         const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::fcntl(fd, cmd, arg), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::fcntl(int fd, int cmd, void* arg,                        const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::fcntl(fd, cmd, arg), errorMessage, ap);}//------------------------------------------------------------------------------inline ssize_t POSIX::read(int fd, void* buf, size_t count,                           const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::read(fd, buf, count), errorMessage, ap);}//------------------------------------------------------------------------------inline ssize_t POSIX::write(int fd, const void* buf, size_t count,                            const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::write(fd, buf, count), errorMessage, ap, true);}//------------------------------------------------------------------------------inline off_t POSIX::lseek(int fd, off_t offset, int whence,                          const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::lseek(fd, offset, whence), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::socket(int domain, int type, int protocol,                         const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::socket(domain, type, protocol), errorMessage, ap);}//------------------------------------------------------------------------------inline int POSIX::connect(int sockfd,                           const struct sockaddr* serv_addr,                           socklen_t addrlen,                          const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    return handleResult(::connect(sockfd, serv_addr, addrlen), errorMessage, ap);}//------------------------------------------------------------------------------inline void POSIX::close(int fd, const char* errorMessage, ...){    va_list ap;     va_start(ap, errorMessage);    handleResult(::close(fd), errorMessage, ap);}//------------------------------------------------------------------------------#endif // DXR3PLAYER_POSIX_H// Local variables:// mode: c++// End:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本道在线观看一区二区| 午夜激情久久久| 成人丝袜视频网| 欧美国产一区二区在线观看| 国产传媒日韩欧美成人| 国产精品美女久久久久久久| 成人综合婷婷国产精品久久免费| 久久先锋影音av鲁色资源| 国产成人亚洲综合色影视| 国产精品久久看| 日本乱人伦一区| 日本不卡一区二区| 精品理论电影在线观看| www.欧美.com| 亚洲高清免费观看| 精品电影一区二区三区| 99国产精品久久久久| 亚洲成人午夜电影| 久久久午夜电影| 91麻豆国产福利在线观看| 午夜影院久久久| 国产日本亚洲高清| 欧美日韩激情一区二区三区| 精品中文字幕一区二区小辣椒| 日本一区二区久久| 欧美视频在线播放| 国产在线精品一区二区| 一区二区久久久久久| 精品美女在线播放| 色噜噜夜夜夜综合网| 免费精品视频在线| 亚洲蜜臀av乱码久久精品| 欧美日韩精品一区二区天天拍小说 | 亚洲精品国产无天堂网2021| 欧美精品免费视频| 成人在线视频首页| 日韩国产一区二| 自拍偷拍国产精品| 欧美www视频| 在线视频亚洲一区| 国产成人精品1024| 欧美aaa在线| 亚洲视频一二区| 久久综合久久综合久久| 欧美四级电影在线观看| 成人久久久精品乱码一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 国产精品欧美经典| 欧美一区二区三区日韩| 色欧美日韩亚洲| jizz一区二区| 国产毛片精品一区| 视频一区二区三区在线| 亚洲美女一区二区三区| 中国av一区二区三区| 精品三级av在线| 制服丝袜一区二区三区| 欧美亚洲尤物久久| 99视频精品在线| 高清不卡在线观看av| 精品一区二区免费在线观看| 亚洲一区二区五区| 亚洲美女一区二区三区| 中文字幕一区二区三| 国产无遮挡一区二区三区毛片日本| 欧美一区二区三区日韩视频| 欧美日韩日日摸| 欧美在线一二三四区| 一本大道综合伊人精品热热| va亚洲va日韩不卡在线观看| 国产精品99久久久久久久女警| 九色porny丨国产精品| 日本v片在线高清不卡在线观看| 亚洲国产欧美在线| 亚洲小说春色综合另类电影| 一区二区三区四区不卡在线| 亚洲男女毛片无遮挡| 亚洲人成网站影音先锋播放| 亚洲欧美激情视频在线观看一区二区三区| 国产精品免费观看视频| 国产精品乱人伦| 中文字幕一区二区三区在线不卡| 中文字幕乱码亚洲精品一区| 国产欧美综合在线| 国产精品麻豆网站| 亚洲色图制服诱惑| 亚洲国产乱码最新视频| 亚洲自拍与偷拍| 污片在线观看一区二区| 蜜臀a∨国产成人精品| 另类欧美日韩国产在线| 国模套图日韩精品一区二区| 黄页视频在线91| 高清不卡一区二区| 91看片淫黄大片一级| 99综合影院在线| 色婷婷综合久久久久中文一区二区 | www.亚洲在线| 91影视在线播放| 欧美日韩亚洲丝袜制服| 欧美一区二区日韩| 久久女同精品一区二区| 国产精品久久精品日日| 亚洲欧美自拍偷拍| 亚洲一区二区四区蜜桃| 日av在线不卡| 国产不卡视频在线播放| 成人动漫av在线| 欧美视频一区在线| 精品国产凹凸成av人网站| 国产精品看片你懂得| 亚洲国产毛片aaaaa无费看| 麻豆视频一区二区| 成人精品电影在线观看| 欧美日韩一区小说| 国产亚洲欧洲一区高清在线观看| 一区二区三区四区视频精品免费 | 69久久夜色精品国产69蝌蚪网| 欧美成人video| 亚洲欧美福利一区二区| 老司机免费视频一区二区三区| 粉嫩av一区二区三区| 精品视频在线视频| 国产香蕉久久精品综合网| 一区二区三区在线观看网站| 激情五月婷婷综合网| 91久久精品一区二区| 日韩欧美成人一区二区| 成人免费一区二区三区在线观看| 日本欧洲一区二区| 91美女在线看| 国产亚洲成aⅴ人片在线观看 | 日本韩国一区二区| 成人免费一区二区三区在线观看| 天天影视涩香欲综合网| hitomi一区二区三区精品| 精品国产一区二区三区四区四| 精品少妇一区二区三区在线播放 | 日韩精品在线一区| 高清不卡一区二区| 欧美日韩免费在线视频| 国产精品久久久久久亚洲毛片 | 国产欧美一区二区精品婷婷| 日韩**一区毛片| 91福利视频网站| 国产精品美女久久久久久2018| 免费看日韩精品| 欧美中文字幕一二三区视频| 中文字幕在线一区| 国产美女精品人人做人人爽| 欧美一区二区三区婷婷月色| 亚洲视频资源在线| 国产成人av福利| 久久亚洲影视婷婷| 美女mm1313爽爽久久久蜜臀| 欧美精品久久天天躁| 亚洲影视在线播放| 色婷婷综合久久久| 中文字幕在线免费不卡| 成人动漫视频在线| 国产精品美日韩| 成人深夜在线观看| 久久亚洲捆绑美女| 国模无码大尺度一区二区三区| 日韩视频永久免费| 免费久久精品视频| 欧美一区二区大片| 日韩精品色哟哟| 日韩欧美一区中文| 欧美a一区二区| 欧美不卡一区二区三区| 蜜臀久久99精品久久久久宅男| 欧美一区欧美二区| 美国十次了思思久久精品导航| 欧美一区二区三区思思人| 日韩精品一二三四| 欧美大片在线观看一区二区| 久久成人免费电影| 精品动漫一区二区三区在线观看| 韩国一区二区三区| 精品福利一二区| 成人97人人超碰人人99| 中文字幕在线不卡| 91成人免费在线| 午夜激情一区二区| 精品久久一区二区三区| 国产精品亚洲第一区在线暖暖韩国| 中文无字幕一区二区三区| av电影一区二区| 亚洲精品国产精品乱码不99| 欧美影片第一页| 蜜桃av噜噜一区| 国产亲近乱来精品视频| 91蝌蚪porny九色| 免费观看在线色综合| 精品国精品国产| av中文一区二区三区| 亚洲国产精品视频| 日韩一级视频免费观看在线| 国产主播一区二区三区|