当前位置: 首页>>代码示例>>C++>>正文


C++ EDEBUG函数代码示例

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


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

示例1: EDEBUG

void QmlCppEngine::setState(DebuggerState newState, bool forced)
{
    EDEBUG("SET MASTER STATE: " << newState);
    EDEBUG("  CPP STATE: " << m_cppEngine->state());
    EDEBUG("  QML STATE: " << m_qmlEngine->state());
    DebuggerEngine::setState(newState, forced);
}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:7,代码来源:qmlcppengine.cpp

示例2: add_myself

static void
add_myself(void)
{
	static const char myself[] = "/proc/self/exe";
	static const char moddir[] = PKGLIBDIR;
	static const char eprefix[] = "${exec_prefix}";
	static const char prefix[] = "${prefix}";
	const char *relmoddir;
	char wd[PATH_MAX], *dp;
	size_t sz;

	sz = readlink(myself, wd, sizeof(wd));
	wd[sz] = '\0';
	if ((dp = strrchr(wd, '/')) == NULL) {
		return;
	}
	/* add the path where the binary resides */
	*dp = '\0';
	EDEBUG("adding %s\n", wd);
	lt_dladdsearchdir(wd);

#define MEMCMPLIT(a, b)	memcmp((a), (b), sizeof(b) - 1)
	if (moddir[0] == '/') {
		/* absolute libdir, add him */
		lt_dladdsearchdir(moddir);
		return;
	} else if (moddir[0] == '.') {
		/* relative libdir? relative to what? */
		return;
	} else if (memcmp(moddir, eprefix, sizeof(eprefix) - 1) == 0) {
		/* take the bit after EPREFIX for catting later on */
		relmoddir = moddir + sizeof(eprefix) - 1;
	} else if (memcmp(moddir, prefix, sizeof(prefix) - 1) == 0) {
		/* take the bit after PREFIX for catting later on */
		relmoddir = moddir + sizeof(prefix) - 1;
	} else {
		/* don't know, i guess i'll leave ya to it */
		return;
	}

	/* go back one level in dp */
	if ((dp = strrchr(wd, '/')) == NULL) {
		return;
	} else if (strcmp(dp, "/bin") && strcmp(dp, "/sbin")) {
		/* dp doesn't end in /bin nor /sbin */
		return;
	}

	/* good, now we're ready to cat relmoddir to dp */
	strncpy(dp, relmoddir, sizeof(wd) - (dp - wd));
	EDEBUG("adding %s\n", wd);
	lt_dladdsearchdir(wd);
	return;
}
开发者ID:hroptatyr,项目名称:libfixc,代码行数:54,代码来源:engdso.c

示例3: do_regex

static int do_regex(REQUEST *request, char const *lhs, char const *rhs, bool iflag)
{
	int compare;
	int cflags = REG_EXTENDED;
	regex_t reg;
	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];

	if (iflag) cflags |= REG_ICASE;

	/*
	 *	Include substring matches.
	 */
	compare = regcomp(&reg, rhs, cflags);
	if (compare != 0) {
		if (debug_flag) {
			char errbuf[128];

			regerror(compare, &reg, errbuf, sizeof(errbuf));
			EDEBUG("Failed compiling regular expression: %s", errbuf);
		}
		EVAL_DEBUG("FAIL %d", __LINE__);
		return -1;
	}

	memset(&rxmatch, 0, sizeof(rxmatch));	/* regexec does not seem to initialise unused elements */
	compare = regexec(&reg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);
	regfree(&reg);
	rad_regcapture(request, compare, lhs, rxmatch);

	return (compare == 0);
}
开发者ID:arturmalinowski,项目名称:freeradius-server,代码行数:31,代码来源:evaluate.c

示例4: vdi_v_curright

void vdi_v_curright(VDI_Workstation *vwk)
{
  EDEBUG("v_curright: Call not implemented!\n");

  vdipb->contrl[N_PTSOUT] = 0;
  vdipb->contrl[N_INTOUT] = 0;
}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,代码来源:vdi_characters.c

示例5: vdi_v_hardcopy

void vdi_v_hardcopy(VDI_Workstation *vwk)
{
  EDEBUG("v_hardcopy: Call not implemented!\n");

  vdipb->contrl[N_PTSOUT] = 0;
  vdipb->contrl[N_INTOUT] = 0;
}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,代码来源:vdi_characters.c

示例6: vdi_vq_chcells

void vdi_vq_chcells(VDI_Workstation *vwk)
{
  EDEBUG("vq_chcells: Call not implemented!\n");

  vdipb->contrl[N_PTSOUT] = 0;
  vdipb->contrl[N_INTOUT] = 2;
}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,代码来源:vdi_characters.c

示例7: krb5_instantiate

static int krb5_instantiate(CONF_SECTION *conf, void *instance)
{
	rlm_krb5_t *inst = instance;
	krb5_error_code ret;
	krb5_keytab keytab;
	char keytab_name[200];
	char *princ_name;

#ifdef HEIMDAL_KRB5
	DEBUG("Using Heimdal Kerberos library");
#else
	DEBUG("Using MIT Kerberos library");
#endif

#ifndef KRB5_IS_THREAD_SAFE
	if (!krb5_is_thread_safe()) {
		DEBUGI("libkrb5 is not threadsafe, recompile it with thread support enabled");
		WDEBUG("rlm_krb5 will run in single threaded mode, performance may be degraded");
	} else {
		WDEBUG("Build time libkrb5 was not threadsafe, but run time library claims to be");
		WDEBUG("Reconfigure and recompile rlm_krb5 to enable thread support");
	}
#endif

	inst->xlat_name = cf_section_name2(conf);
	if (!inst->xlat_name) {
		inst->xlat_name = cf_section_name1(conf);
	}
	
	ret = krb5_init_context(&inst->context);
	if (ret) {
		EDEBUG("rlm_krb5 (%s): Context initialisation failed: %s", inst->xlat_name, error_message(ret));

		return -1;
	}
	
	DEBUG("rlm_krb5 (%s): Context initialised successfully", inst->xlat_name);

	/*
	 *	Split service principal into service and host components
	 *	they're needed to build the server principal in MIT,
	 *	and to set the validation service in Heimdal.
	 */
	if (inst->service_princ) {
		size_t len;
		/* Service principal appears to contain a host component */
		inst->hostname = strchr(inst->service_princ, '/');
		if (inst->hostname) {	
			len = (inst->hostname - inst->service_princ);			
			inst->hostname++;
		} else {
			len = strlen(inst->service_princ);
		}
		
		if (len) {
			inst->service = talloc_array(inst, char, (len + 1));
			strlcpy(inst->service, inst->service_princ, len + 1);
		}
	}
开发者ID:dpocock,项目名称:freeradius-server,代码行数:59,代码来源:rlm_krb5.c

示例8: vdi_characters

void vdi_characters(VDI_Workstation *vwk)
{
  if(vdi_charfuncs[vdipb->contrl[SUBROUTINE]] && 
     (vdipb->contrl[SUBROUTINE] <= 17) && (vdipb->contrl[SUBROUTINE] >= 0))
    vdi_charfuncs[vdipb->contrl[SUBROUTINE]](vwk);
  else
    EDEBUG("vdi_characters: Subroutine %d doesn't exist!\n",vdipb->contrl[SUBROUTINE]);
}
开发者ID:e8johan,项目名称:ovdisis,代码行数:8,代码来源:vdi_characters.c

示例9: EDEBUG

void QmlCppEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result)
{
    EDEBUG("MASTER REMOTE SETUP FINISHED");
    DebuggerEngine::notifyEngineRemoteSetupFinished(result);

    cppEngine()->notifyEngineRemoteSetupFinished(result);
    qmlEngine()->notifyEngineRemoteSetupFinished(result);
}
开发者ID:acacid,项目名称:qt-creator,代码行数:8,代码来源:qmlcppengine.cpp

示例10: do_regex

static int do_regex(REQUEST *request, const char *lhs, const char *rhs, int iflag)
{
	int i, compare;
	int cflags = REG_EXTENDED;
	regex_t reg;
	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];

	if (iflag) cflags |= REG_ICASE;

	/*
	 *	Include substring matches.
	 */
	compare = regcomp(&reg, rhs, cflags);
	if (compare != 0) {
		if (debug_flag) {
			char errbuf[128];

			regerror(compare, &reg, errbuf, sizeof(errbuf));
			EDEBUG("Failed compiling regular expression: %s", errbuf);
		}
		EVAL_DEBUG("FAIL %d", __LINE__);
		return -1;
	}
	
	compare = regexec(&reg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);
	regfree(&reg);

	/*
	 *	Add new %{0}, %{1}, etc.
	 */
	if (compare == 0) for (i = 0; i <= REQUEST_MAX_REGEX; i++) {
		char *r;
			
		free(request_data_get(request, request,
				      REQUEST_DATA_REGEX | i));
		
		/*
		 *	No %{i}, skip it.
		 *	We MAY have %{2} without %{1}.
		 */
		if (rxmatch[i].rm_so == -1) continue;
		
		/*
		 *	Copy substring into allocated buffer
		 */
		r = rad_malloc(rxmatch[i].rm_eo -rxmatch[i].rm_so + 1);
		memcpy(r, lhs + rxmatch[i].rm_so,
		       rxmatch[i].rm_eo - rxmatch[i].rm_so);
		r[rxmatch[i].rm_eo - rxmatch[i].rm_so] = '\0';

		request_data_add(request, request,
				 REQUEST_DATA_REGEX | i,
				 r, free);
		}
	return (compare == 0);
}
开发者ID:ehayon,项目名称:freeradius-server,代码行数:56,代码来源:evaluate.c

示例11: EDEBUG

void NotifyBox::show(void) {
	if(shown())
		return;

	EDEBUG(ESTRLOC ": %i %i\n", x(), y());
	resize_all();

	Fl_Window::show();
	is_shown = true;
	Fl::add_timeout(TIME_SHOWN, visible_timeout_cb, this);
}
开发者ID:edeproject,项目名称:svn,代码行数:11,代码来源:NotifyBox.cpp

示例12: do_regex

static int do_regex(REQUEST *request, value_pair_map_t const *map, bool iflag)
{
	int compare, rcode;
	int cflags = REG_EXTENDED;
	regex_t reg, *preg;
	char *lhs, *rhs;
	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];

	if (iflag) cflags |= REG_ICASE;

	/*
	 *	Expand and then compile it.
	 */
	if (map->src->type == VPT_TYPE_REGEX) {
		rcode = radius_expand_tmpl(&rhs, request, map->src);
		if (rcode < 0) {
			EVAL_DEBUG("FAIL %d", __LINE__);
			return -1;
		}
		rad_assert(rhs != NULL);

		compare = regcomp(&reg, rhs, cflags);
		if (compare != 0) {
			if (debug_flag) {
				char errbuf[128];

				regerror(compare, &reg, errbuf, sizeof(errbuf));
				EDEBUG("Failed compiling regular expression: %s", errbuf);
			}
			EVAL_DEBUG("FAIL %d", __LINE__);
			return -1;
		}

		preg = &reg;
	} else {
		preg = map->src->vpt_preg;
	}

	rcode = radius_expand_tmpl(&lhs, request, map->dst);
	if (rcode < 0) {
		EVAL_DEBUG("FAIL %d", __LINE__);
		return -1;
	}
	rad_assert(lhs != NULL);

	memset(&rxmatch, 0, sizeof(rxmatch));	/* regexec does not seem to initialise unused elements */
	compare = regexec(preg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);
	rad_regcapture(request, compare, lhs, rxmatch);

	return (compare == 0);
}
开发者ID:capone1992,项目名称:freeradius-server,代码行数:51,代码来源:evaluate.c

示例13: pairadd_sv

/*
 *
 *     Verify that a Perl SV is a string and save it in FreeRadius
 *     Value Pair Format
 *
 */
static int pairadd_sv(TALLOC_CTX *ctx, VALUE_PAIR **vps, char *key, SV *sv, FR_TOKEN op)
{
	char	    *val;
	VALUE_PAIR      *vp;

	if (SvOK(sv)) {
		val = SvPV_nolen(sv);
		vp = pairmake(ctx, vps, key, val, op);
		if (vp != NULL) {
			DEBUG("rlm_perl: Added pair %s = %s", key, val);
			return 1;
		} else {
			EDEBUG("rlm_perl: Failed to create pair %s = %s", key, val);
		}
	}
	return 0;
}
开发者ID:archsh,项目名称:freeradius-server,代码行数:23,代码来源:rlm_perl.c

示例14: rlm_sql_fetch_row

/*************************************************************************
 *
 *	Function: rlm_sql_fetch_row
 *
 *	Purpose: call the module's sql_fetch_row and implement re-connect
 *
 *************************************************************************/
int rlm_sql_fetch_row(rlm_sql_handle_t **handle, rlm_sql_t *inst)
{
	int ret;

	if (!*handle || !(*handle)->conn) {
		return -1;
	}

	/*
	 * We can't implement reconnect logic here, because the caller may require
	 * the original connection to free up queries or result sets associated with
	 * that connection.
	 */
	ret = (inst->module->sql_fetch_row)(*handle, inst->config);
	if (ret < 0) {
		char const *error = (inst->module->sql_error)(*handle, inst->config);
		EDEBUG("rlm_sql (%s): Error fetching row: %s",
		       inst->config->xlat_name, error ? error : "<UNKNOWN>");
	}

	return ret;
}
开发者ID:olivierbeytrison,项目名称:freeradius-server,代码行数:29,代码来源:sql.c

示例15: eapttls_gen_challenge

/*
 *	Generate the TTLS challenge
 *
 *	It's in the TLS module simply because it's only a few lines
 *	of code, and it needs access to the TLS PRF functions.
 */
void eapttls_gen_challenge(SSL *s, uint8_t *buffer, size_t size)
{
	uint8_t out[32], buf[32];
	uint8_t seed[sizeof(FR_TLS_PRF_CHALLENGE)-1 + 2*SSL3_RANDOM_SIZE];
	uint8_t *p = seed;

	if (!s->s3) {
		EDEBUG("No SSLv3 information");
		return;
	}

	memcpy(p, FR_TLS_PRF_CHALLENGE, sizeof(FR_TLS_PRF_CHALLENGE)-1);
	p += sizeof(FR_TLS_PRF_CHALLENGE)-1;
	memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE);
	p += SSL3_RANDOM_SIZE;
	memcpy(p, s->s3->server_random, SSL3_RANDOM_SIZE);

	PRF(s->session->master_key, s->session->master_key_length,
	    seed, sizeof(seed), out, buf, sizeof(out));

	memcpy(buffer, out, size);
}
开发者ID:AlainRomeyer,项目名称:freeradius-server,代码行数:28,代码来源:mppe_keys.c


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