ifnlen = strlen(xxx->
ifname);
113 size_tofnlen = strlen(xxx->
ofname);
114 char* descr = (
char*)
malloc(ifnlen + ofnlen + 3);
116memcpy(descr + 1, xxx->
ifname, ifnlen++);
117descr[ifnlen++] =
'>';
118memcpy(descr + ifnlen, xxx->
ofname, ++ofnlen);
122}
else if(xxx->
ifname) {
124}
else if(xxx->
ofname) {
168 if(!(xxx->
finp= fopen(xxx->
ifname,
"rb"))) {
270 return!xxx->
finp? eIO_Closed
271: feof(xxx->
finp) ? eIO_Closed
274 return!xxx->
fout? eIO_Closed
295 if(fclose(xxx->
finp) != 0)
300 if(fclose(xxx->
fout) != 0)
346(
const char* ifname,
354(
const char* ifname,
364 size_tifnlen = ifname && *ifname ? strlen(ifname) + 1 : 0;
365 size_tofnlen = ofname && *ofname ? strlen(ofname) + 1 : 0;
367 if(!(ifnlen | ofnlen))
377 str= (
char*) xxx +
sizeof(*xxx);
378xxx->
ifname= (
const char*)(ifnlen ? memcpy(
str, ifname, ifnlen) : 0);
380xxx->
ofname= (
const char*)(ofnlen ? memcpy(
str, ofname, ofnlen) : 0);
384memcpy(&xxx->
attr, attr ? attr : &def_attr,
sizeof(xxx->
attr));
386memset(&xxx->
attr, 0,
sizeof(xxx->
attr));
static const char * str(char *buf, int n)
CONNECTOR FILE_CreateConnectorEx(const char *ifname, const char *ofname, const SFILE_ConnAttr *attr)
FSetupVTable setup
init meta, may not be NULL
#define CONN_SET_METHOD(meta, method, function, connector)
CONNECTOR next
linked list
const STimeout * default_timeout
default timeout pointer
FDestroy destroy
destroys handle, can be NULL
void * handle
data handle of the connector
SMetaConnector * meta
back link to original meta
CONNECTOR FILE_CreateConnector(const char *ifname, const char *ofname)
EIO_Event
I/O event (or direction).
@ eIO_Success
everything is fine, no error occurred
@ eIO_Unknown
unknown I/O error (likely fatal but can retry)
@ eIO_InvalidArg
bad argument / parameter value(s) supplied
if(yy_accept[yy_current_state])
static const CS_INT unused
const struct ncbi::grid::netcache::search::fields::SIZE size
static char * s_VT_Descr(CONNECTOR connector)
static EIO_Status s_VT_Write(CONNECTOR connector, const void *buf, size_t size, size_t *n_written, const STimeout *timeout)
static EIO_Status s_VT_Read(CONNECTOR connector, void *buf, size_t size, size_t *n_read, const STimeout *timeout)
static const char * s_VT_GetType(CONNECTOR connector)
static EIO_Status s_VT_Close(CONNECTOR connector, const STimeout *timeout)
static EIO_Status s_VT_Flush(CONNECTOR connector, const STimeout *timeout)
static EIO_Status s_VT_Open(CONNECTOR connector, const STimeout *timeout)
static void s_Setup(CONNECTOR connector)
static EIO_Status s_VT_Status(CONNECTOR connector, EIO_Event dir)
static EIO_Status s_VT_Wait(CONNECTOR connector, EIO_Event event, const STimeout *timeout)
static void s_Destroy(CONNECTOR connector)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4