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

C++ scmp函数代码示例

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

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



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

示例1: parseArgs

static int parseArgs(int argc, char **argv)
{
    char    *argp, *ip, *cp;
    int     nextArg;

    assert(app);
    nextArg = 0;
    argp = argv[nextArg++];

    if (scmp(argp, "--host") == 0 || scmp(argp, "-h") == 0) {
        ip = argv[nextArg++];
        if (ip == 0) {
            return MPR_ERR_BAD_ARGS;
        }
        if (sncmp(ip, "http://", 7) == 0) {
            ip += 7;
        }
        if ((cp = strchr(ip, ':')) != 0) {
            *cp++ = '\0';
            app->port = atoi(cp);
        } else {
            app->port = 80;
        }
        app->host = sclone(ip);
    }
    return nextArg - 1;
}
开发者ID:cwhis,项目名称:appweb,代码行数:27,代码来源:testAppweb.c


示例2: isdomain

	int isdomain(char *str)
	{
		char d_ru[] = "ru";
		char d_com[] = "com";
		char d_org[] = "org";
		char *EL[MAXSIZE];
		int i;
		if (6 > slen(str))
			return 0;
		int Z = stok(str, '.', EL);
		if (!((scmp(EL[Z - 1], d_ru) == 0) || (scmp(EL[Z - 1], d_com) == 0) || (scmp(EL[Z - 1], d_org) == 0)))
		{
			suntok(str, '.', EL, Z);
			return 0;
		}
		suntok(str, '.', EL, Z);
		if (3 != Z)
			return 0;
		for (i = 0; str[i] != '\0'; i++)
		{
			if (!((str[i] >= 'A')&&(str[i] <= 'Z') || ( (str[i] >= 'a')&&(str[i] <= 'z')) || str[i] == '.' ))
				return 0;
		}
		return 1;
	}
开发者ID:DSG888,项目名称:SibSUTIS,代码行数:25,代码来源:processing.c


示例3: main

int main(){
  char s[10]="hello";
  printf("%s: %d\n",s,slen(s)); //testing for slen
  char cpy[15]="aba";
  printf("After scpy, %s became: ",cpy);
  scpy(cpy,s);
  printf("%s\n",cpy);
  char ncpy[15]="abalaba";
  printf("After sncpy (n=3), %s became: ",ncpy);
  sncpy(ncpy,s,3);
  printf("%s\n",ncpy);
  char cat[15]="AddOn";
  printf("After scat, %s became: ",cpy);
  scat(cpy,cat);
  printf("%s\n",cpy);
  char s2[18]="hello";
  char s3[5]="po";
  char s4[5]="bao";
  printf("scmp %s and %s: %d\n",s,s2,scmp(s,s2));
  printf("scmp %s and %s: %d\n",s,cpy,scmp(s,cpy));
  printf("scmp %s and %s: %d\n",s,s3,scmp(s,s3));
  printf("scmp %s and %s: %d\n",s,s4,scmp(s,s4));
  printf("schr %s and %c: %s\n",s,'l',schr(s,'l'));
  printf("schr %s and %c: %s\n",s,'t',schr(s,'t'));
  char s5[5]="el";
  printf("sstr %s and %s: %s\n",s,s5,sstr(s,s5));
  printf("sstr %s and %s: %s\n",s,s3,sstr(s,s3));
  return 0;
}
开发者ID:Zilby,项目名称:Stuy-Stuff,代码行数:29,代码来源:string.c


示例4: OSFindFirstFile

HANDLE STDCALL OSFindFirstFile(CTSTR lpFileName, OSFindData &findData)
{
    WIN32_FIND_DATA wfd;
    HANDLE hFind = FindFirstFile(lpFileName, &wfd);

    if(hFind == INVALID_HANDLE_VALUE)
        hFind = NULL;
    else
    {
        BOOL bFoundDumbDir;
        do
        {
            bFoundDumbDir = FALSE;
            if( (scmp(wfd.cFileName, TEXT("..")) == 0) ||
                (scmp(wfd.cFileName, TEXT(".")) == 0)  )
            {
                if(!FindNextFile(hFind, &wfd))
                {
                    FindClose(hFind);
                    return NULL;
                }
                bFoundDumbDir = TRUE;
            }
        }while(bFoundDumbDir);

        scpy(findData.fileName, wfd.cFileName);
        findData.bDirectory = (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
        findData.bHidden = (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0;
    }

    return hFind;
}
开发者ID:tks2103,项目名称:OBS,代码行数:32,代码来源:XT_Windows.cpp


示例5: bitwisehash

	size_t
	Hashdh::search(uchar *w, size_t len)
	{
		size_t hval = bitwisehash(w, len, tsize);
		size_t next;

		if(!b_ht->access(hval))
			return (size_t)-1;

		if(scmp(hash->getField(hval), w, len) == 0)
			return b_ht->rank1(hval)-1;

		//using double hashing
		size_t h2 = step_value(w, len, tsize);

		for(uint i=1 ; i<tsize ; i++ ){
			next = (hval + i*h2)%tsize;

			if(!b_ht->access(next))
				return (size_t)-1;

			if(scmp(hash->getField(next), w, len) == 0)
				return b_ht->rank1(next)-1;
		}

		return (size_t)-1;
	}
开发者ID:migumar2,项目名称:libCSD,代码行数:27,代码来源:Hashdh.cpp


示例6: OSFindNextFile

BOOL  STDCALL OSFindNextFile(HANDLE hFind, OSFindData &findData)
{
    WIN32_FIND_DATA wfd;
    BOOL bSuccess = FindNextFile(hFind, &wfd);

    if (bSuccess)
    {
        BOOL bFoundDumbDir;
        do
        {
            bFoundDumbDir = FALSE;
            if( (scmp(wfd.cFileName, TEXT("..")) == 0) ||
                (scmp(wfd.cFileName, TEXT(".")) == 0)  )
            {
                if(!FindNextFile(hFind, &wfd))
                {
                    bSuccess = FALSE;
                    break;
                }
                bFoundDumbDir = TRUE;
            }
        }while(bFoundDumbDir);
    }

    if(bSuccess)
    {
        scpy(findData.fileName, wfd.cFileName);
        findData.bDirectory = (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
        findData.bHidden = (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0;
    }
    else
        *findData.fileName = 0;

    return bSuccess;
}
开发者ID:tks2103,项目名称:OBS,代码行数:35,代码来源:XT_Windows.cpp


示例7: ConvertTypeToString

String ConvertTypeToString(TypeInfo &ti, TypeInfo *subType=NULL)
{
    if(!ti.name || !ti.name[0])
        return String() << TEXT("void");
    else if(ti.type == DataType_Object)
    {
        Class *cls = FindClass(ti.name);
        assert(cls);
        while(cls->IsPureScriptClass()) cls = cls->GetParent();
        return String() << cls->GetName() << TEXT("*");
    }
    else if(ti.type == DataType_String)
        return String() << TEXT("String");
    else if(ti.type == DataType_List)
        return String() << TEXT("List<") << ConvertTypeToString(*subType) << TEXT(">");
    else if(ti.type == DataType_Type)
        return String() << TEXT("TypeDataInfo");
    else if(scmp(ti.name, TEXT("bool")) == 0)
        return String() << TEXT("BOOL");
    else if(scmp(ti.name, TEXT("icolor")) == 0)
        return String() << TEXT("DWORD");
    else if(scmp(ti.name, TEXT("handle")) == 0)
        return String() << TEXT("HANDLE");
    else
        return String() << ti.name;
}
开发者ID:alanzw,项目名称:JimEngine,代码行数:26,代码来源:ScriptSourceGen.cpp


示例8: exit

/*  
    Exit the application
    static function exit(status: Number, how: String = "default"): void
    MOB - status is not implemented
 */
static EjsObj *app_exit(Ejs *ejs, EjsObj *unused, int argc, EjsObj **argv)
{
    cchar   *how;
    int     status, mode;

    if (ejs->dontExit) {
        ejsThrowStateError(ejs, "App.exit has been disabled");
        return 0;
    }
    status = argc >= 1 ? ejsGetInt(ejs, argv[0]) : 0;
    how = ejsToMulti(ejs, argc >= 2 ? ejsToString(ejs, argv[1]): ESV(empty));

    if (scmp(how, "default") == 0) {
        mode = MPR_EXIT_DEFAULT;
    } else if (scmp(how, "immediate") == 0) {
        mode = MPR_EXIT_IMMEDIATE;
    } else if (scmp(how, "graceful") == 0) {
        mode = MPR_EXIT_GRACEFUL;
    } else {
        mode = MPR_EXIT_NORMAL;
    }
    mprTerminate(mode, status);
    ejsAttention(ejs);
    return 0;
}
开发者ID:liexusong,项目名称:ejs-2,代码行数:30,代码来源:ejsApp.c


示例9: OSIncompatibleModulesLoaded

BOOL   STDCALL OSIncompatibleModulesLoaded()
{
    StringList  moduleList;
    
    //Modules that will likely cause OBS to crash because they hooked it.
    //This list is checked on stream start only.

    if (!OSGetLoadedModuleList(GetCurrentProcess(), moduleList))
        return 0;

    for(UINT i=0; i<moduleList.Num(); i++)
    {
        CTSTR moduleName = moduleList[i];

        if (!scmp(moduleName, TEXT("dxtorycore.dll")) ||        //DXTory
            !scmp(moduleName, TEXT("dxtorycore64.dll")) ||      //DXTory
            !scmp(moduleName, TEXT("dxtorymm.dll")) ||          //DXTory
            !scmp(moduleName, TEXT("dxtorymm64.dll")) ||        //DXTory
            !scmp(moduleName, TEXT("rtsshooks.dll")) ||         //EVGA Precision OSD
            !scmp(moduleName, TEXT("axonoverlay.dll")) ||       //Dolby Axon
            !scmp(moduleName, TEXT("action_x86.dll")) ||        //Action!
            !scmp(moduleName, TEXT("action_x64.dll")))          //Action!
        {
            return 1;
        }
        else if (!scmp(moduleName, TEXT("atkdx11disp.dll")))     //ASUS GamerOSD
        {
            //ASUS GamerOSD is so terrible we can't even cleanly shutdown once it loads, trying to unload D3D crashes too (!)
            CrashError (TEXT("ASUS GamerOSD has been detected. This program installs user mode driver hooks which will corrupt the Direct3D state and crash OBS. Please uninstall ASUS GamerOSD if you wish to use OBS."));
        }
    }

    return 0;
}
开发者ID:Eridia,项目名称:OBS,代码行数:34,代码来源:XT_Windows.cpp


示例10: GraphicsCaptureFindWindow

BOOL CALLBACK GraphicsCaptureFindWindow(HWND hwnd, LPARAM lParam)
{
    TCHAR windowClass[256];
    TCHAR windowExecutable[MAX_PATH];

    windowClass[_countof(windowClass)-1] = windowExecutable[MAX_PATH-1] = 0;

    FindWindowData *fwd = (FindWindowData *)lParam;

    if (!IsWindowVisible(hwnd))
        return TRUE;

    if (GetClassName(hwnd, windowClass, _countof(windowClass) - 1) && !scmp(windowClass, fwd->classname))
    {
        //handle old sources which lack an exe name
        if (fwd->exename.IsEmpty())
            return TRUE;

        DWORD processID;
        GetWindowThreadProcessId(hwnd, &processID);

        HANDLE hProc = fwd->pOpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID);
        if (hProc)
        {
            DWORD wLen = _countof(windowExecutable) - 1;
            if (QueryFullProcessImageName(hProc, 0, windowExecutable, &wLen))
            {
                TCHAR *p;
                p = wcsrchr(windowExecutable, '\\');
                if (p)
                    p++;
                else
                    p = windowExecutable;

                slwr(p);

                if (!scmp(p, fwd->exename))
                {
                    CloseHandle(hProc);
                    fwd->hwnd = hwnd;
                    return FALSE;
                }
            }
            else
            {
                RUNONCE Log(TEXT("OpenProcess worked but QueryFullProcessImageName returned %d for pid %d?"), GetLastError(), processID);
            }

            CloseHandle(hProc);
        }
    }

    return TRUE;
}
开发者ID:cha007,项目名称:obs_,代码行数:54,代码来源:GraphicsCaptureSource.cpp


示例11: val_compare

EXTERN int val_compare( value a, value b ) {
	char tmp_buf[32];
	switch( C(val_type(a),val_type(b)) ) {
	case C(VAL_INT,VAL_INT):
		return icmp(val_int(a),val_int(b));
	case C(VAL_INT32,VAL_INT):
		return icmp(val_int32(a),val_int(b));
	case C(VAL_INT,VAL_INT32):
		return icmp(val_int(a),val_int32(b));
	case C(VAL_INT32,VAL_INT32):
		return icmp(val_int32(a),val_int32(b));
	case C(VAL_INT,VAL_FLOAT):
		return fcmp(val_int(a),val_float(b));
	case C(VAL_INT32,VAL_FLOAT):
		return fcmp(val_int32(a),val_float(b));
	case C(VAL_INT,VAL_STRING):
		return scmp(tmp_buf,sprintf(tmp_buf,"%d",val_int(a)),val_string(b),val_strlen(b));
	case C(VAL_INT32,VAL_STRING):
		return scmp(tmp_buf,sprintf(tmp_buf,"%d",val_int32(a)),val_string(b),val_strlen(b));
	case C(VAL_FLOAT,VAL_INT):
		return fcmp(val_float(a),val_int(b));
	case C(VAL_FLOAT,VAL_INT32):
		return fcmp(val_float(a),val_int32(b));
	case C(VAL_FLOAT,VAL_FLOAT):
		return fcmp(val_float(a),val_float(b));
	case C(VAL_FLOAT,VAL_STRING):
		return scmp(tmp_buf,sprintf(tmp_buf,FLOAT_FMT,val_float(a)),val_string(b),val_strlen(b));
	case C(VAL_STRING,VAL_INT):
		return scmp(val_string(a),val_strlen(a),tmp_buf,sprintf(tmp_buf,"%d",val_int(b)));
	case C(VAL_STRING,VAL_INT32):
		return scmp(val_string(a),val_strlen(a),tmp_buf,sprintf(tmp_buf,"%d",val_int32(b)));
	case C(VAL_STRING,VAL_FLOAT):
		return scmp(val_string(a),val_strlen(a),tmp_buf,sprintf(tmp_buf,FLOAT_FMT,val_float(b)));
	case C(VAL_STRING,VAL_BOOL):
		return scmp(val_string(a),val_strlen(a),val_bool(b)?"true":"false",val_bool(b)?4:5);
	case C(VAL_BOOL,VAL_STRING):
		return scmp(val_bool(a)?"true":"false",val_bool(a)?4:5,val_string(b),val_strlen(b));
	case C(VAL_STRING,VAL_STRING):
		return scmp(val_string(a),val_strlen(a),val_string(b),val_strlen(b));
	case C(VAL_BOOL,VAL_BOOL):
		return (a == b) ? 0 : (val_bool(a) ? 1 : -1);
	case C(VAL_OBJECT,VAL_OBJECT):
		if( a == b )
			return 0;
		{
			value tmp = val_field(a,id_compare);
			if( tmp == val_null )
				return invalid_comparison;
			a = val_callEx(a,tmp,&b,1,NULL);
		}
		if( val_is_int(a) )
			return val_int(a);
		return invalid_comparison;
	default:
		if( a == b )
			return 0;
		return invalid_comparison;
	}
}
开发者ID:ConstNW,项目名称:neko,代码行数:59,代码来源:others.c


示例12: mprLookupKey

/*
    Get a password digest using the MD5 algorithm -- See RFC 2617 to understand this code.
 */ 
static char *calcDigest(HttpConn *conn, DigestData *dp, cchar *username)
{
    HttpAuth    *auth;
    char        *digestBuf, *ha1, *ha2;

    auth = conn->rx->route->auth;
    if (!conn->user) {
        conn->user = mprLookupKey(auth->userCache, username);
    }
    assert(conn->user && conn->user->password);
    if (conn->user == 0 || conn->user->password == 0) {
        return 0;
    }

    /*
        Compute HA1. Password is already expected to be in the HA1 format MD5(username:realm:password).
     */
    ha1 = sclone(conn->user->password);

    /*
        HA2
     */ 
    ha2 = mprGetMD5(sfmt("%s:%s", conn->rx->method, dp->uri));

    /*
        H(HA1:nonce:HA2)
     */
    if (scmp(dp->qop, "auth") == 0) {
        digestBuf = sfmt("%s:%s:%s:%s:%s:%s", ha1, dp->nonce, dp->nc, dp->cnonce, dp->qop, ha2);
    } else {
        digestBuf = sfmt("%s:%s:%s", ha1, dp->nonce, ha2);
    }
    return mprGetMD5(digestBuf);
}
开发者ID:adammendoza,项目名称:http,代码行数:37,代码来源:digest.c


示例13: makeAltBody

static void makeAltBody(HttpConn *conn, int status)
{
    HttpRx      *rx;
    HttpTx      *tx;
    cchar       *statusMsg, *msg;

    rx = conn->rx;
    tx = conn->tx;
    assert(rx && tx);

    statusMsg = httpLookupStatus(conn->http, status);
    msg = "";
    if (rx && (!rx->route || rx->route->flags & HTTP_ROUTE_SHOW_ERRORS)) {
        msg = conn->errorMsg;
    }
    if (rx && scmp(rx->accept, "text/plain") == 0) {
        tx->altBody = sfmt("Access Error: %d -- %s\r\n%s\r\n", status, statusMsg, msg);
    } else {
        tx->altBody = sfmt("<!DOCTYPE html>\r\n"
            "<head>\r\n"
            "    <title>%s</title>\r\n"
            "    <link rel=\"shortcut icon\" href=\"data:image/x-icon;,\" type=\"image/x-icon\">\r\n"
            "</head>\r\n"
            "<body>\r\n<h2>Access Error: %d -- %s</h2>\r\n<pre>%s</pre>\r\n</body>\r\n</html>\r\n",
            statusMsg, status, statusMsg, mprEscapeHtml(msg));
    }
    tx->length = slen(tx->altBody);
}
开发者ID:adammendoza,项目名称:http,代码行数:28,代码来源:error.c


示例14: httpReadString

/*  
    Return the value of a keyword in the content returned from the last request
    Format either: 
        KEYWORD=value<
        KEYWORD: value,
        "KEYWORD": value,
        "KEYWORD": value,
    Return 0 on errors. Caller must free result.
 */
char *lookupValue(MprTestGroup *gp, char *key)
{
    char    *nextToken, *bp, *result;

    if (gp->content == NULL) {
        gp->content = httpReadString(getConn(gp));
    }
    if (gp->content == 0 || (nextToken = strstr(gp->content, key)) == 0) {
        return 0;
    }
    nextToken += slen(key);
    if (*nextToken != '=' && *nextToken != ':' && *nextToken != '"') {
        return 0;
    }
    if (*nextToken == '"') {
        nextToken++;
    }
    if (*nextToken == ':') {
        nextToken += 2;
    } else {
        nextToken += 1;
    }
    result = sclone(nextToken);
    for (bp = result; *bp && *bp != '<' && *bp != ','; bp++) {
        ;
    }
    *bp++ = '\0';
    if (scmp(result, "null") == 0) {
        return 0;
    }
    return result;
}
开发者ID:cwhis,项目名称:appweb,代码行数:41,代码来源:testAppweb.c


示例15: Init

    bool Init(CTSTR lpFile)
    {
        strFile = lpFile;

        if(!fileOut.Open(lpFile, XFILE_CREATEALWAYS, 1024*1024))
            return false;

        fileOut.OutputDword(DWORD_BE(0x20));
        fileOut.OutputDword(DWORD_BE('ftyp'));
        fileOut.OutputDword(DWORD_BE('isom'));
        fileOut.OutputDword(DWORD_BE(0x200));
        fileOut.OutputDword(DWORD_BE('isom'));
        fileOut.OutputDword(DWORD_BE('iso2'));
        fileOut.OutputDword(DWORD_BE('avc1'));
        fileOut.OutputDword(DWORD_BE('mp41'));

        fileOut.OutputDword(DWORD_BE(0x8));
        fileOut.OutputDword(DWORD_BE('free'));

        mdatStart = fileOut.GetPos();
        fileOut.OutputDword(DWORD_BE(0x1));
        fileOut.OutputDword(DWORD_BE('mdat'));
#ifdef USE_64BIT_MP4
        fileOut.OutputQword(0);
#endif

        bMP3 = scmp(App->GetAudioEncoder()->GetCodec(), TEXT("MP3")) == 0;

        audioFrameSize = App->GetAudioEncoder()->GetFrameSize();

        bStreamOpened = true;

        return true;
    }
开发者ID:AaronMike,项目名称:OBS,代码行数:34,代码来源:MP4FileStream.cpp


示例16: main

int main() {
  int (*scmp)(char*,char*) = strcmp;

  assert(scmp("hello","hi") < 0);

  return 0;
}
开发者ID:0bliv10n,项目名称:s2e,代码行数:7,代码来源:IndirectCallToExternal.c


示例17: getname

int getname(char *s)
{
	    int i;
	    for(i=0;i<n;i++){
	          if(scmp(s,p[i].name))
			                return i;
	    }
}
开发者ID:HunL,项目名称:myACM,代码行数:8,代码来源:gift.c


示例18: main

int main()
{
    char s1[] = "ABCDEFGHabcdefgh123456";
    char s2[] = "ABCDEFGHabcdefgh123456          ";
    char dest[100];
    char dest2[STR_MAX_SIZE+1];
    int i, j, c;

    memset(dest, 0, sizeof(dest));

    strcpy(dest, s1);
    strncpy(dest2, s1, STR_MAX_SIZE);
    dest2[STR_MAX_SIZE] = '\0';
    printf("dest2 = %s\n", dest2);

    printf("scmp(s1, dest) = %d\n", scmp(s1, dest));
    printf("scmp(s2, dest) = %d\n", scmp(s2, dest));
    
    printf("before reverse: \"%s\"\n", dest);

    for (i = 0, j = strlen(dest)-1; i < j; i++, j--)
    {
        c = dest[i];
        dest[i] = dest[j];
        dest[j] = c;
    }

    printf("after reverse: \"%s\"\n", dest);
    
    scpy(dest, s2);

    printf("before trim: \"%s\"\n", dest);

    for (i = strlen(dest)-1; i >= 0; i--)
    {
        if (dest[i] != ' ' && dest[i] != '\t' && dest[i] != '\n')
            break;
        dest[i] = '\0';
    }

    printf("after trim: \"%s\"\n", dest);

    printf("slen(s1) = %d\n", slen(s1));
}
开发者ID:luafran,项目名称:exercises,代码行数:44,代码来源:strings.c


示例19: assure

/*
   Get a Digest value using the MD5 algorithm -- See RFC 2617 to understand this code.
*/
static char *calcDigest(Webs *wp, char *username, char *password)
{
    char  a1Buf[256], a2Buf[256], digestBuf[256];
    char  *ha1, *ha2, *method, *result;

    assure(wp);
    assure(username && *username);
    assure(password);

    /*
        Compute HA1. If username == 0, then the password is already expected to be in the HA1 format 
        (MD5(username:realm:password).
     */
    if (username == 0) {
        ha1 = sclone(password);
    } else {
        fmt(a1Buf, sizeof(a1Buf), "%s:%s:%s", username, wp->realm, password);
        ha1 = websMD5(a1Buf);
    }

    /*
        HA2
     */ 
    method = wp->method;
    fmt(a2Buf, sizeof(a2Buf), "%s:%s", method, wp->digestUri);
    ha2 = websMD5(a2Buf);

    /*
        H(HA1:nonce:HA2)
     */
    if (scmp(wp->qop, "auth") == 0) {
        fmt(digestBuf, sizeof(digestBuf), "%s:%s:%s:%s:%s:%s", ha1, wp->nonce, wp->nc, wp->cnonce, wp->qop, ha2);

    } else if (scmp(wp->qop, "auth-int") == 0) {
        fmt(digestBuf, sizeof(digestBuf), "%s:%s:%s:%s:%s:%s", ha1, wp->nonce, wp->nc, wp->cnonce, wp->qop, ha2);

    } else {
        fmt(digestBuf, sizeof(digestBuf), "%s:%s:%s", ha1, wp->nonce, ha2);
    }
    result = websMD5(digestBuf);
    wfree(ha1);
    wfree(ha2);
    return result;
}
开发者ID:kamihouse,项目名称:goahead,代码行数:47,代码来源:auth.c


示例20: AppWarning

void SceneItem::SetRender(bool render)
{
    element->SetInt(TEXT("render"), (int)((render)?1:0));
    bRender = render;
    CTSTR lpClass = element->GetString(TEXT("class"));

    if (bRender) {
        if (!lpClass) {
            AppWarning(TEXT("No class for source '%s' in scene '%s'"), element->GetName(), API->GetSceneElement()->GetName());
        } else {
            XElement *data = element->GetElement(TEXT("data"));
            source = API->CreateImageSource(lpClass, data);
            if(!source) {
                AppWarning(TEXT("Could not create image source '%s' in scene '%s'"), element->GetName(), API->GetSceneElement()->GetName());
            } else {
                API->EnterSceneMutex();
                if (parent && parent->bSceneStarted) {
                    source->BeginScene();

                    if(scmp(lpClass, L"GlobalSource") == 0)
                        source->GlobalSourceEnterScene();
                }
                API->LeaveSceneMutex();
            }
        }
    } else {
        if (source) {
            API->EnterSceneMutex();

            ImageSource *src = source;
            source = NULL;

            if(scmp(lpClass, L"GlobalSource") == 0)
                src->GlobalSourceLeaveScene();

            if (parent && parent->bSceneStarted)
                src->EndScene();
            delete src;

            API->LeaveSceneMutex();
        }
    }
}
开发者ID:373137461,项目名称:OBS,代码行数:43,代码来源:Scene.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ scnprintf函数代码示例发布时间:2022-05-30
下一篇:
C++ scm_to_utf8_string函数代码示例发布时间: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