• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FormatStr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ASSERT

void CStoreGroupData::operator () (SGroupData* pGroupData)
{
	ASSERT(pGroupData);
	ASSERT(pGroupData->data_vect);

	++ m_nProgressCurrent;

	m_file.WriteString("**********\n");
	m_file.WriteString(FormatStr("%d\n", m_nProgressCurrent));
	m_file.WriteString(pGroupData->time + "\n");
	m_file.WriteString(pGroupData->user + "\n");

	for (SDataVect::iterator it = pGroupData->data_vect->begin(); pGroupData->data_vect->end() != it; ++ it)
	{
		SData *&data = (*it);
		m_file.WriteString(FormatStr("%s\n%d\n", data->file, data->version));
	}

	m_file.WriteString("\n");

	if (0 == m_nProgressCurrent % 1000)
	{
		printf("\r>> %d%%", 100 * m_nProgressCurrent / m_nProgressSize);
	}
}
开发者ID:Gediminas,项目名称:vss2git,代码行数:25,代码来源:Data.cpp


示例2: FormatStr

void			TMDIChild::SetSelectDetail()
{
    //详细信息显示在右边
    memWatch->Lines->Clear();

    tagSelRect	selRect;
    if(GetTreeSelRect(selRect) == false)
        return;

    String info = FormatStr("偏移 : %d", selRect.SelStart);
    memWatch->Lines->Add(info);

    info = FormatStr("长度 : %d", selRect.SelLength);
    memWatch->Lines->Add(info);

    info = "";

    ParseTreeNode * curNode = (ParseTreeNode * )tvParseTree->Selected->Data;
    if(curNode)
    {
        if(curNode->GetClassMember()->GetType() == "char" && curNode->GetClassMember()->GetArrayVar() != "")
        {
            info = curNode->GetParseResult();
        }
    }

    info = FormatStr("信息 : %s", info);
    memWatch->Lines->Add(info);
}
开发者ID:eggxp,项目名称:SuperParse,代码行数:29,代码来源:CHILDWIN.cpp


示例3: DoHTTPProxyTunnel

int DoHTTPProxyTunnel(STREAM *S, char *Host, int Port, int Flags)
{
char *Tempstr=NULL, *Token=NULL, *ptr=NULL;
int result=FALSE;

	if (Flags & CONNECT_SSL) Tempstr=FormatStr(Tempstr,"CONNECT https://%s:%d HTTP/1.1\r\n\r\n",Host,Port);
	else Tempstr=FormatStr(Tempstr,"CONNECT http://%s:%d HTTP/1.1\r\n\r\n",Host,Port);
	STREAMWriteLine(Tempstr,S);
	STREAMFlush(S);
	
	Tempstr=STREAMReadLine(Tempstr,S);
	StripTrailingWhitespace(Tempstr);

	ptr=GetToken(Tempstr," ",&Token,0);
	ptr=GetToken(ptr," ",&Token,0);

	if (*Token==2) result=TRUE;
	while (StrLen(Tempstr))
	{
		Tempstr=STREAMReadLine(Tempstr,S);
		StripTrailingWhitespace(Tempstr);
	}

DestroyString(Tempstr);
DestroyString(Token);

return(result);
}
开发者ID:ColumPaget,项目名称:FileFerry,代码行数:28,代码来源:ConnectionChain.c


示例4: FormatStr

bool			AuthClientUser::SendLogMessage(AnsiString msg)
{
	String warnMsg = FormatStr("%s(%s) : %s", m_UserName, m_ClientIP, String(msg));
	GetLog()->Warn(warnMsg);
	GetThreadManager()->AddGUIMessage(warnMsg);

	AnsiString sendMsg = msg;
	sendMsg.Unique();
	if(!this->SocketSendBYTE(PT_MSG))
		return false;

	if(!this->SocketSendWORD(sendMsg.Length()))
		return false;

	if(!this->SocketSendBuff(sendMsg.c_str(), sendMsg.Length()))
		return false;

	if(m_ADOQuery)
	{
		m_ADOQuery->SQL->Text = FormatStr("INSERT user_error_msg (accid, cur_time, build, ip, msg) VALUES ('%s', '%s', %d, '%s', '%s')",
										m_UserName, DateTimeToStr(Now()), m_Build, m_ClientIP, String(msg));
		ExecSQL(m_ADOQuery);
	}
//	Sleep(1000);
	return true;
}
开发者ID:KerwinMa,项目名称:eggxp_view,代码行数:26,代码来源:AuthServerListener.cpp


示例5: IntToStr

//---------------------------------------------------------------------
void			TMDIChild::SetFileDescribe(FileStruct * curFile)
{
    memInfo->Lines->Clear();
    memInfo->Lines->Add(FormatStr("描述 : %s", curFile->GetDescribe()));
    String key_str = IntToStr(int(curFile->GetKey()));
    memInfo->Lines->Add(FormatStr("Key : %s", key_str));
    memInfo->Lines->Add(FormatStr("时间 : %s", curFile->GetDateTime()));
    memInfo->Lines->Add(FormatStr("详情 : %s", curFile->GetRemark()));
}
开发者ID:eggxp,项目名称:SuperParse,代码行数:10,代码来源:CHILDWIN.cpp


示例6: STREAMWriteLine

STREAM *IDriveOpenFile(TFileStore *FS, TFileInfo *FI, int Flags)
{
char *URL=NULL, *Tempstr=NULL, *Boundary=NULL, *FullPath=NULL, *ptr;
HTTPInfoStruct *Info;
TFileInfo *tmpFI;

  if (Flags & OPEN_WRITE)
	{
  URL=MCopyStr(URL,"https://",FS->Host,"/evs/uploadFile",NULL);
	Info=HTTPInfoFromURL("POST",URL);
	
	Boundary=FormatStr(Boundary,"%x-%x-%x",getpid(),time(NULL),rand());
	Info->PostContentType=MCopyStr(Info->ContentType,"multipart/form-data; boundary=",Boundary,NULL);

	Tempstr=MCopyStr(Tempstr,"--",Boundary,"\r\n","Content-disposition: form-data; name=uid\r\n\r\n",FS->Logon,"\r\n",NULL);
	Tempstr=MCatStr(Tempstr,"--",Boundary,"\r\n","Content-disposition: form-data; name=pwd\r\n\r\n",FS->Passwd,"\r\n",NULL);
	Tempstr=MCatStr(Tempstr,"--",Boundary,"\r\n","Content-disposition: form-data; name=p\r\n\r\n",FS->CurrDir,"\r\n",NULL);
	//Tempstr=MCatStr(Tempstr,"--",Boundary,"\r\n","Content-disposition: form-data; name=myfiles\r\n\r\n",Path,"\r\n",NULL);
	Tempstr=MCatStr(Tempstr,"--",Boundary,"\r\n","Content-disposition: form-data; charset=UTF-8; name=definition; filename=",FI->Path,"\r\nContent-type: image/jpeg\r\n\r\n",NULL);

	Info->PostContentLength=FI->Size+StrLen(Tempstr)+StrLen(Boundary)+8;
	FS->S=HTTPTransact(Info);
	FS->Extra=Info;

	STREAMWriteLine(Tempstr,FS->S);
	STREAMSetValue(FS->S,"Boundary",Boundary);
	Tempstr=FormatStr(Tempstr,"%d",FI->Size);
	STREAMSetValue(FS->S,"Transfer-Size",Tempstr);
	}
	else
	{
			if (*FI->Path=='/') FullPath=CopyStr(FullPath,FI->Path);
			else FullPath=MCopyStr(FullPath,FS->CurrDir,FI->Path,NULL);

			Tempstr=HTTPQuote(Tempstr,FullPath);

//		if (OpenFI->Version) FI=OpenFI;
//		else FI=FileStoreGetFileInfo(FS, FI->Path);

		  URL=FormatStr(URL,"https://%s/evs/downloadFile?uid=%s&pwd=%s&p=%s&version=%d",FS->Host,FS->Logon,FS->Passwd,Tempstr,FI->Version);
			FS->S=HTTPMethod("POST",URL,"","","","",0);
			FS->Extra=NULL;
//		if (FI != OpenFI) FileInfoDestroy(FI);
	}

	DestroyString(URL);
	DestroyString(FullPath);
	DestroyString(Tempstr);
	DestroyString(Boundary);

   return(FS->S);
}
开发者ID:ColumPaget,项目名称:FileFerry,代码行数:52,代码来源:idrive.c


示例7: FormatStr

	pplx::task<http::http_response> RealSteamDataConnection::GetMessages(int baseMessage, const wchar_t * pwzSteamID, bool fSecure)
	{
		std::string strPostData;

		if (fSecure)
			strPostData = FormatStr(STEAM_CHAT_POLL_POST_DATA_FMT_SZ, GetAccessToken(), pwzSteamID, GetUMQID(), baseMessage);
		else
			strPostData = FormatStr(STEAM_CHAT_POLLSTATUS_POST_DATA_FMT_SZ, pwzSteamID, GetUMQID(), baseMessage);

		http::client::http_client  client(fSecure ? STEAM_POST_OAUTH_POLL_URI : STEAM_POST_OAUTH_POLLSTATUS_URI);
		http::http_request         request = CreateHttpPostRequest(strPostData);

		return client.request(request);
	}
开发者ID:galenelias,项目名称:VapoRT,代码行数:14,代码来源:SteamDataConnection.cpp


示例8: DisplayTransferStatus

void DisplayTransferStatus(char *Line, unsigned int transferred, unsigned int total, unsigned int *percent, unsigned int secs,int CmdFlags, int Throttle)
{
int result=0, cols=80, bps=0;
char *Tempstr=NULL, *TimeStr=NULL, *ptr=NULL;
static int ThrotCount=0;
struct winsize w;


	if (Settings.Flags & FLAG_QUIET) return;
	if (CmdFlags & FLAG_QUIET) return;
	if (! isatty(1)) return;

	ptr=getenv("COLUMNS");
	if (ptr) cols=atoi(ptr);
	printf("\r");
	if (total==0) Tempstr=FormatStr(Tempstr,"%s bytes sent ",GetHumanReadableDataQty(transferred,0));
	else
	{
	result=(transferred * 100) / total;
//	if (result != *percent)
	{
		Tempstr=FormatStr(Tempstr,"%d%% %s of ",result,GetHumanReadableDataQty(transferred,0));
		Tempstr=CatStr(Tempstr,GetHumanReadableDataQty(total,0));
	}
	*percent=result;
	}

bps=transferred / secs;
TimeStr=FormatStr(TimeStr," in %d secs %s Bps ",secs,GetHumanReadableDataQty(bps,0) );

if ((Throttle > 0) && (bps > Throttle)) 
{
	ThrotCount++;
	usleep(ThrotCount * 250000);
}
else if (ThrotCount > 0) ThrotCount--;

if (ThrotCount > 0) Tempstr=MCatStr(Tempstr,TimeStr, Line, " (throttling)      ",NULL);
else Tempstr=MCatStr(Tempstr,TimeStr, Line, "           ",NULL);


ioctl(0, TIOCGWINSZ, &w);
if (StrLen(Tempstr) > w.ws_col) Tempstr[w.ws_col]='\0';

printf("%s",Tempstr);
fflush(NULL);

DestroyString(TimeStr);
DestroyString(Tempstr);
}
开发者ID:zhangjinde,项目名称:FileFerry,代码行数:50,代码来源:commands-file-transfer.c


示例9: main

main()
{
char *Tempstr=NULL;
ListNode *Vars, *Streams;
STREAM *S;
int i;
char *IP[]={"217.33.140.70","8.8.8.8","4.2.2.1","88.198.48.36",NULL};

Vars=ListCreate();
Streams=ListCreate();
MessageBusRegister("proc:tester.test.func", 4, 10, Tester);
MessageBusRegister("http://freegeoip.net/xml/", 4, 10, NULL);

printf("PARENT: %d\n",getpid());
for (i=0; i < 4; i++)
{
Tempstr=FormatStr(Tempstr,"string=hello&integer=%d",i);
MessageBusWrite("proc:tester.test.func", Tempstr);
MessageBusWrite("http://freegeoip.net/xml/", IP[i]);

MessageQueueAddToSelect(Streams);
S=STREAMSelect(Streams, NULL);
if (S) 
{
	MessageBusRecv(S, &Tempstr, Vars);
	DumpVars(Vars);
}
else printf("NO ACTIVITY!\n");
sleep(1);
}


}
开发者ID:ColumPaget,项目名称:daytime,代码行数:33,代码来源:test.c


示例10: SSL_CIPHER_get_name

const char *OpenSSLQueryCipher(STREAM *S)
{
void *ptr;

if (! S) return(NULL);
ptr=STREAMGetItem(S,"LIBUSEFUL-SSL-CTX");
if (! ptr) return(NULL);

#ifdef HAVE_LIBSSL
const SSL_CIPHER *Cipher;
char *Tempstr=NULL;

Cipher=SSL_get_current_cipher((const SSL *) ptr);

if (Cipher)
{
Tempstr=FormatStr(Tempstr,"%d bit %s",SSL_CIPHER_get_bits(Cipher,NULL), SSL_CIPHER_get_name(Cipher));
STREAMSetValue(S,"SSL-Cipher",Tempstr);

Tempstr=SetStrLen(Tempstr,1024);
Tempstr=SSL_CIPHER_description(Cipher, Tempstr, 1024);


STREAMSetValue(S,"SSL-Cipher-Details",Tempstr);
}

DestroyString(Tempstr);
return(STREAMGetValue(S,"SSL-Cipher"));

#else
return(NULL);
#endif
}
开发者ID:ColumPaget,项目名称:MetaFTPD,代码行数:33,代码来源:openssl.c


示例11: DoHTTPProxyTunnel

int DoHTTPProxyTunnel(STREAM *S, const char *Host, int Port, const char *Destination, int Flags)
{
char *Tempstr=NULL, *Token=NULL;
const char *ptr=NULL;
int result=FALSE;

	S->in_fd=ConnectToHost(Host,Port,0); 
	S->out_fd=S->in_fd;
	if (S->in_fd == -1) return(FALSE);

	ptr=Destination;
	if (strncmp(ptr,"tcp:",4)==0) ptr+=4;
	Tempstr=FormatStr(Tempstr,"CONNECT %s HTTP/1.1\r\n\r\n",ptr);

	STREAMWriteLine(Tempstr,S);
	STREAMFlush(S);
	
	Tempstr=STREAMReadLine(Tempstr,S);
	StripTrailingWhitespace(Tempstr);

	ptr=GetToken(Tempstr," ",&Token,0);
	ptr=GetToken(ptr," ",&Token,0);

	if (*Token=='2') result=TRUE;
	while (StrLen(Tempstr))
	{
		Tempstr=STREAMReadLine(Tempstr,S);
		StripTrailingWhitespace(Tempstr);
	}

DestroyString(Tempstr);
DestroyString(Token);

return(result);
}
开发者ID:ColumPaget,项目名称:Alaya,代码行数:35,代码来源:ConnectionChain.c


示例12: STREAMSetFlushType

STREAM *STREAMSpawnFunction(BASIC_FUNC Func, void *Data, const char *Config)
{
    int to_fd, from_fd, *iptr;
    pid_t pid=0;
    STREAM *S=NULL;
    char *Tempstr=NULL;
    int Flags=0;

    Flags=TTYParseConfig(Config, NULL);
    if (Flags & TTYFLAG_PTY)
    {
        pid=PseudoTTYSpawnFunction(&to_fd, Func, Data, Flags, Config);
        from_fd=to_fd;
    }
    else
    {
        iptr=NULL;
        //if (Flags & COMMS_COMBINE_STDERR) iptr=(int *) COMMS_COMBINE_STDERR;
        pid=PipeSpawnFunction(&to_fd, &from_fd, iptr, Func, Data, Config);
    }

    if (pid > 0) S=STREAMFromDualFD(from_fd, to_fd);
    if (S)
    {
        STREAMSetFlushType(S,FLUSH_LINE,0,0);
        Tempstr=FormatStr(Tempstr,"%d",pid);
        STREAMSetValue(S,"PeerPID",Tempstr);
        S->Type=STREAM_TYPE_PIPE;
    }

    DestroyString(Tempstr);
    return(S);
}
开发者ID:ColumPaget,项目名称:Hashrat,代码行数:33,代码来源:SpawnPrograms.c


示例13: IntToHex

void __fastcall TDesignFrm::btStartNewClick(TObject *Sender)
{
    if(SourceGenDesignFrm->StartDesign() == false)
        return;

    String  fileName, head, subHead;
    m_WorkSpaceManager->BeginUpdate();
    for(int i=0; i<SourceGenDesignFrm->GetHeadCount(); i++)
    {
        for(int j=0; j<SourceGenDesignFrm->GetSubHeadCount(); j++)
        {
            head = IntToHex(i+1, 2);
            subHead = IntToHex(j+1, 2);
            fileName = FormatStr("Pack_%s_%s.eggxp", head, subHead);
            WorkSpace	*  selWorkSpace = m_WorkSpaceManager->CreateNewWorkSpace();
            selWorkSpace->InitWorkSpace(m_WorkSpaceManager->GetFilePath(),
						fileName, head + " " + subHead);

			selWorkSpace->GetFileManager()->CreateNew();
            selWorkSpace->SaveToFile();            
        }
    }

    m_WorkSpaceManager->ReloadWorkSpacePack();
    WorkspaceToGUI();
    m_WorkSpaceManager->EndUpdate();
}
开发者ID:eggxp,项目名称:SuperParse,代码行数:27,代码来源:FrmDesign.cpp


示例14:

char *FinalizeDirListHTML(char *Buffer, HTTPSession *Session, const char *Path, const char *DirItemsHtml, const char *MimeIconsURL, int Flags)
{
char *HTML=NULL;

	HTML=FormatStr(Buffer,"<html>\r\n<head><title>/%s%s</title></head>\r\n<body>\r\n",Session->Host, Session->URL);

	if ((Flags & DIR_FANCY))
	{
		if (Flags & DIR_INTERACTIVE) HTML=CatStr(HTML,"<form>\r\n");

		HTML=CatStr(HTML,"<table align=center border=0><tr>\n");
		if (Settings.Flags & FLAG_SSL) HTML=MCatStr(HTML,"<td><font color=green size=-1>SECURE<br/>",Session->Cipher,"</font></td>\n",NULL);
		else HTML=MCatStr(HTML,"<td><font color=red size=-1>Unencrypted<br/>Connection</font></td>\n",NULL);

		HTML=MCatStr(HTML,"<td><b>",Session->URL,"</b> at ",Session->Host, " <i>",GetDateStrFromSecs("%Y/%m/%d %H:%M:%S",Now,NULL),"</i><br/>",NULL);

		HTML=DisplayDirActions(HTML,Session,Flags);
		HTML=CatStr(HTML,"</td>\n");


		HTML=MCatStr(HTML,"<td>User: ",Session->UserName,"<br/>",NULL);
		if (Settings.Flags & FLAG_LOGOUT_AVAILABLE) HTML=MCatStr(HTML,"<a href=\"",GetLogoutPath(),"\">( Logout )</a>",NULL);
		HTML=CatStr(HTML,"</td></tr></table>\n");
	}
	HTML=MCatStr(HTML,DirItemsHtml,"<br />&nbsp;<br />",NULL);
	if (Flags & DIR_INTERACTIVE) HTML=CatStr(HTML,"</form>\r\n");
	HTML=CatStr(HTML,"</body></html>\r\n");

return(HTML);
}
开发者ID:ColumPaget,项目名称:Alaya,代码行数:30,代码来源:directory_listing.c


示例15: btDeleteSubHeadClick

void __fastcall TDesignFrm::btDeleteSubHeadClick(TObject *Sender)
{
    String fileName = vleSubHeadDef->Keys[vleSubHeadDef->Row];

    int result = Application->MessageBox(FormatStr(L"当真要删除文件 : %s(此操作不可恢复)", fileName).c_str(),L"删除询问",MB_OKCANCEL);
    if(result == IDCANCEL)
    {
        return;
    }

    WorkPackHead * curWorkPackHead = m_WorkSpaceManager->GetWorkSpacePacks()->FindWorkPack(vleHeadDef->Keys[vleHeadDef->Row]);

    if(curWorkPackHead == NULL)
        return;

    WorkSpace	*  selWorkSpace;
    for(int i=0; i<curWorkPackHead->m_Files.Count(); i++)
    {
        if(curWorkPackHead->m_Files[i]->GetFileName() == fileName)
        {
            selWorkSpace = curWorkPackHead->m_Files[i];
            break;
        }
    }
    m_WorkSpaceManager->DeleteWorkSpace(selWorkSpace);
    m_WorkSpaceManager->ReloadWorkSpacePack();
    WorkspaceToGUI();
}
开发者ID:eggxp,项目名称:SuperParse,代码行数:28,代码来源:FrmDesign.cpp


示例16: if

HTTPSession *FileSendCreateSession(char *Path, HTTPSession *Request, ListNode *Vars, int ICYInterval)
{
	HTTPSession *Session;
	char *Tempstr=NULL;

	Session=HTTPSessionResponse(Request);
	Session->ResponseCode=CopyStr(Session->ResponseCode,"200 OK");
	Session->ContentType=CopyStr(Session->ContentType,GetVar(Vars,"ContentType"));
	Session->LastModified=atoi(GetVar(Vars,"MTime-secs"));
	Session->ContentSize=atoi(GetVar(Vars,"FileSize"));

	if (Session->Flags & SESSION_ICECAST) 
	{
		Session->Flags |= SESSION_ICECAST;
		Session->Protocol=CopyStr(Session->Protocol,"ICY");
		Tempstr=FormatStr(Tempstr,"%d",ICYInterval);
		SetVar(Session->Headers,"icy-metaint",Tempstr);
	}
	else if (HTTPServerDecideToCompress(Request,Path))
	{
		Session->ContentSize=0;
		Session->Flags |= SESSION_ENCODE_GZIP;
	}

	DestroyString(Tempstr);
	return(Session);
}
开发者ID:ColumPaget,项目名称:Alaya,代码行数:27,代码来源:server.c


示例17:

char *HTTPQuoteChars(char *RetBuff, char *Str, char *CharList)
{
char *RetStr=NULL, *Token=NULL, *ptr;
int olen=0, ilen;

RetStr=CopyStr(RetStr,"");
ilen=StrLen(Str);

for (ptr=Str; ptr < (Str+ilen); ptr++)
{
if (strchr(CharList,*ptr))
{
		Token=FormatStr(Token,"%%%02X",*ptr); 
		RetStr=CatStr(RetStr,Token);
		olen+=StrLen(Token);
}
else
{
		 RetStr=AddCharToBuffer(RetStr,olen,*ptr); 
		 olen++;
}
}


RetStr[olen]='\0';
DestroyString(Token);
return(RetStr);
}
开发者ID:JackieXie168,项目名称:movgrab,代码行数:28,代码来源:http.c


示例18: LeftString

void __fastcall 	TMDIChild::FastParseExecute(TObject *Sender)
{
    TMenuItem * selMenu = (TMenuItem * )Sender;
    String typeName = selMenu->Caption;

    //修正typeName
    if(selMenu->Caption == "-")
        return;

    if(typeName.Pos("["))
        typeName = LeftString(typeName, "[");

    ClassData * curClass = GetCurParseClass();

//	bool	haveResult = false;
    String 	defaultName;
    if(curClass == NULL)
    {
        //当前无结构体, 新建结构体
        int classCount = m_WorkSpace->GetClassManager()->GetClassCount();
        defaultName = FormatStr("tagUnNamedStruct%d", classCount);

        curClass = m_WorkSpace->GetClassManager()->AddClass();
        curClass->Init(defaultName, "");
        RefreshAllClassView();
    }

    String arrayVar;
    if(selMenu->Tag == 0)
        arrayVar = "";
    else
        arrayVar = IntToStr(selMenu->Tag);

    ClassMember * curMember = curClass->AddMember();
    defaultName = FormatStr("UnKnown%d", m_ParseTree->GetSize() + m_FastParsePos);

    curMember->Init(typeName, defaultName, "", arrayVar);

    m_ParseTree->BindClass(curClass);
    ExpandFirstNode();
    ParseData(false);

    tagSelRect	selRect;
    if(GetTreeSelRect(selRect) == false)
        return;
    GotoPosition(selRect.SelStart + selRect.SelLength);
}
开发者ID:eggxp,项目名称:SuperParse,代码行数:47,代码来源:CHILDWIN.cpp


示例19: main

main()
{
char *Tempstr=NULL;

Tempstr=FormatStr(Tempstr,"%s %n","test",100);
printf("%s\n",Tempstr);

}
开发者ID:ColumPaget,项目名称:FileFerry,代码行数:8,代码来源:formattest.c


示例20: HandleCompareResult

void HandleCompareResult(TFileInfo *FI, int CmdFlags, int CompareLevel, char *Hook, int result)
{
char *ResultStr=NULL, *Tempstr=NULL;

	if (result >= CompareLevel) 
	{
		if (CmdFlags & FLAG_CMD_QUIET) /*Do nothing in quiet mode */  ; 
		else if (result==CMP_DIR)  /*Do nothing with dirs */ ;
		else ResultStr=CopyStr(ResultStr,"MATCHES");
	}
	else switch (result)
	{
		case CMP_FAIL:
			ResultStr=CopyStr(ResultStr,"LOCAL ONLY");
		break;

		case CMP_REMOTE:
			ResultStr=CopyStr(ResultStr,"REMOTE ONLY");
		break;

		case CMP_DIR:
		break;

		case CMP_EXISTS:
			ResultStr=CopyStr(ResultStr,"DIFFERS");
		break;

		case CMP_SIZE:
			ResultStr=CopyStr(ResultStr,"Size Matches");
		break;

		case CMP_SIZE_TIME:
			ResultStr=CopyStr(ResultStr,"Size + Time Matches");
		break;

		case CMP_MD5:
			ResultStr=CopyStr(ResultStr,"MD5 Hash Matches");
		break;

		case CMP_SHA1:
			ResultStr=CopyStr(ResultStr,"SHA1 Hash Matches");
		break;

	}

if (StrLen(ResultStr))
{
	printf("%s: %s\n",ResultStr,FI->Path);
	if (StrLen(Hook)) 
	{
		Tempstr=FormatStr(Tempstr,"%s '%s' '%s'",Hook,FI->Path,ResultStr);
		system(Tempstr);
	}
}

DestroyString(Tempstr);
DestroyString(ResultStr);
}
开发者ID:ColumPaget,项目名称:FileFerry,代码行数:58,代码来源:commands-file-info.c



注:本文中的FormatStr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FormatString函数代码示例发布时间:2022-05-30
下一篇:
C++ FormatMessageA函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap