📄 seio.h
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * seio.h (extension) * * Standard IO */#ifndef __EXTENSION_SEIO_H__#define __EXTENSION_SEIO_H__#include <basic.h>#include "typedef.h"#include <seio/sys/types.h>#include <seio/sys/dirent.h>#include <seio/sys/stat.h>#include <seio/sys/mount.h>#include "seio_cmode.h"#ifdef __cplusplusextern "C" {#endif#define L_FCONNM 16 /* Maximum length of connection name (number of bytes) */#define L_FPATH 512 /* Maximum length of path name (number of bytes) *//* * Connection mode */#define SF_RONLY 0x0001 /* Read only *//* * Extension file name */#define TK_EXTEND_FNM_MARK 0xA121U /* Identification mark */#define L_EXTEND_FNM 34 /* Maximum length of file name (number of characters) *//* * Character code conversion option */struct cconvopt { int optid; /* ID in libtf */ int value; /* Value for ID */};IMPORT int attach( const TC *devnm, const char *connm, int mode );IMPORT int detach( const TC *devnm, int eject );IMPORT int getlink( const char *path, char *buf );IMPORT int toSFERRNO( ER err );/* * Definitions for automatic generation of interface library (mkiflib) *//*** DEFINE_IFLIB[INCLUDE FILE]<extension/seio.h>[PREFIX]SF***//* * Standard file IO system call *//* [BEGIN SYSCALLS] */IMPORT ER tkse_attach( const TC *devnm, const char *connm, int mode );IMPORT ER tkse_detach( const TC *devnm, int eject );IMPORT WER tkse_open( const char *path, int oflag, mode_t mode );IMPORT ER tkse_close( int fildes );IMPORT WER tkse_lseek( int fildes, off_t offset, int whence );IMPORT WER tkse_read( int fildes, void *buf, size_t nbyte );IMPORT WER tkse_write( int fildes, const void *buf, size_t nbyte );IMPORT WER tkse_getdents( int fildes, struct dirent *buf, size_t nbyte );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_dup( int oldd );IMPORT WER tkse_dup2( int oldd, int newd );/* RESERVE_NO */IMPORT WER tkse_fsync( int fd );IMPORT ER tkse_rename( const char *from, const char *to );IMPORT ER tkse_unlink( const char *path );/* RESERVE_NO */IMPORT WER tkse_chdir( const char *path );IMPORT WER tkse_fchdir( int fd );IMPORT WER tkse_chmod( const char *path, mode_t mode );IMPORT WER tkse_fchmod( int fd, mode_t mode );IMPORT ER tkse_mkdir( const char *path, mode_t mode );IMPORT ER tkse_rmdir( const char *path );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_creat( const char *path, mode_t mode );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_utimes( const char *path, const struct timeval times[2] );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_umask( mode_t cmask );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_truncate( const char *path, off_t length );IMPORT WER tkse_ftruncate( int fildes, off_t length );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO */IMPORT WER tkse_sync( void );IMPORT WER tkse_getfsstat( struct statfs *buf, long bufsize, int flags );/* RESERVE_NO *//* RESERVE_NO */IMPORT ER tkse_getlink( const char *path, void *buf );IMPORT ER tkse_stat( const char *path, struct stat *sb );IMPORT ER tkse_lstat( const char *path, struct stat *sb );IMPORT ER tkse_fstat( int fd, struct stat *sb );/* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* RESERVE_NO *//* [END SYSCALLS] */#ifdef __cplusplus}#endif#endif /* __EXTENSION_SEIO_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -