您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ str_ptr函数代码示例

51自学网 2021-06-03 08:26:38
  C++
这篇教程C++ str_ptr函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中str_ptr函数的典型用法代码示例。如果您正苦于以下问题:C++ str_ptr函数的具体用法?C++ str_ptr怎么用?C++ str_ptr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了str_ptr函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: str_fwildcard

uint   STDCALL str_fwildcard( pstr name, pstr mask ){   uint   ret;   uint   dotstr;   uint   dotmask;   pubyte pname = str_ptr( name );   pubyte pmask = str_ptr( mask );   uint   isstr = FALSE;   uint   ismask = FALSE;   uint   empty = 0;   dotstr = str_find( name, 0, '.', TRUE );   dotmask = str_find( mask, 0, '.', TRUE );   if ( pname[ dotstr ] )   {      pname[ dotstr ] = 0;      isstr = TRUE;   }   if ( pmask[ dotmask ] )   {      pmask[ dotmask ] = 0;      ismask = TRUE;   }   ret = ptr_wildcardignore( pname, pmask );   if ( ismask || ( isstr && pmask[ dotmask - 1 ] != '*' ))      ret &= ptr_wildcardignore( isstr ? pname + dotstr + 1 : ( pubyte )&empty,                              ismask ? pmask + dotmask + 1 : ( pubyte )&empty );   if ( isstr )      pname[ dotstr ] = '.';   if ( ismask )      pmask[ dotmask ] = '.';   return ret;}
开发者ID:Refandler,项目名称:gentee,代码行数:34,


示例2: sedp_reader_remove

int sedp_reader_remove (Domain_t *dp, Reader_t *rp){	Endpoint_t	*ep;	Topic_t		*tp;	FilteredTopic_t	*ftp;	tp = rp->r_topic;	if ((tp->entity.flags & EF_FILTERED) != 0) {		ftp = (FilteredTopic_t *) tp;		tp = ftp->related;	}	if (sedp_log)		log_printf (SEDP_ID, 0, "SEDP: Reader (%s/%s) removed./r/n",				str_ptr (tp->name),				str_ptr (tp->type->type_name));	/* Remove the subscription. */	sedp_subscription_remove (dp, rp);	/* Can we match/unmatch discovered writers with the reader? */	for (ep = tp->writers; ep; ep = ep->next)		if (remote_active (ep->entity.flags) &&		    rtps_reader_matches (rp, (DiscoveredWriter_t *) ep))			disc_end_matched_writer (rp, (DiscoveredWriter_t *) ep);	return (DDS_RETCODE_OK);}
开发者ID:FlavioFalcao,项目名称:tinq-core,代码行数:27,


示例3: os_fileopen

uint  STDCALL os_fileopen( pstr name, uint flag ){#ifdef LINUX   int fd;   fd = open( str_ptr( name ), ( flag & FOP_READONLY ? O_RDONLY : O_RDWR ) |                    ( flag & FOP_CREATE ? O_CREAT : 0 ) |                    ( flag & FOP_IFCREATE ? O_TRUNC : 0 ), S_IRWXU );   if ( fd != -1 && flag & FOP_EXCLUSIVE )   {      if ( flock( fd, LOCK_EX ) == -1 )      {        	close( fd );			fd = -1;      }   }   return fd;#else   uint ret;   ret = ( uint )CreateFile( str_ptr( name ), ( flag & FOP_READONLY ? GENERIC_READ :            GENERIC_READ | GENERIC_WRITE ), ( flag & FOP_EXCLUSIVE ? 0 :            FILE_SHARE_READ | FILE_SHARE_WRITE ), NULL,           ( flag & FOP_CREATE ? CREATE_ALWAYS :              ( flag & FOP_IFCREATE ? OPEN_ALWAYS : OPEN_EXISTING )),           /*FILE_FLAG_WRITE_THROUGH*/ 0, NULL );   //printf("Name=%s %i/n", str_ptr( name ), ret );   return ret == ( uint )INVALID_HANDLE_VALUE ? 0 : ret ;#endif}
开发者ID:Refandler,项目名称:gentee,代码行数:30,


示例4: name_

NetStream::NetStream(   int                 fd,    struct sockaddr_in *client,   bool                should_block   ): name_(""), port_(-1), msgSize_(-1), processing_(0){   _fd = fd;   if (!should_block) set_blocking(false);   if (client == 0)    {      name_ = str_ptr(fd);      port_ = 0;      print_name_ = str_ptr("file descriptor ") + name_;      // XXX - assumes fd is not a socket and doesn't need no_tcp_delay()   }    else    {      NetHost host(client);      name_       = host.name();      port_       = -1;  // host.port();      print_name_ = str_ptr(get_host_print_name(port_, **name_));      no_linger(_fd);      if (_fd != -1)       {         // don't wait for large packets before sending a message         no_tcp_delay();      }   }   block(STD_FALSE);}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:33,


示例5: assert

NetHost::NetHost(   const char *hostname   ){   struct hostent *entry;   assert(hostname != NULL);   if (isdigit(hostname[0])) {      unsigned long netAddr = inet_addr(hostname);      entry = gethostbyaddr((const char*) &netAddr, sizeof(netAddr), AF_INET);      if (entry) {         name_ = str_ptr(entry->h_name);      } else name_ = hostname;      addr_ = netAddr;      port_ = -1;   } else {      entry = gethostbyname(hostname);      if (entry == NULL) {         cerr << "NetHost: Could not resolve hostname!" << endl;         exit(1);      }      name_ = str_ptr(entry->h_name);      addr_ = *(unsigned long*)(entry->h_addr_list[0]);      port_ = -1;   }}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:30,


示例6: os_filefullname

pvoid  STDCALL os_filefullname( pubyte filename, pvoid buf ){   pubyte  ptr;#ifdef LINUX   char  cur[512];   if ( filename[0] != '/' )   {      getcwd( cur, 512 );      chdir( filename );      basename( filename );      getcwd( str_ptr( ( pstr )buf ), 512 );      str_setlen( ( pstr )buf, strlen( str_ptr( ( pstr )buf ) ) );      str_appendb( buf, '/' );       str_appendp( buf, filename );      chdir( cur );   }   else   { //
C++ str_replace函数代码示例
C++ str_printfa函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。