本文整理汇总了C++中debug0函数的典型用法代码示例。如果您正苦于以下问题:C++ debug0函数的具体用法?C++ debug0怎么用?C++ debug0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debug0函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: reedah_feed_subscription_prepare_update_request
static gboolean
reedah_feed_subscription_prepare_update_request (subscriptionPtr subscription,
struct updateRequest *request)
{
debug0 (DEBUG_UPDATE, "preparing Reedah feed subscription for update\n");
ReedahSourcePtr source = (ReedahSourcePtr) node_source_root_from_node (subscription->node)->data;
g_assert(source);
if (source->root->source->loginState == NODE_SOURCE_STATE_NONE) {
subscription_update (node_source_root_from_node (subscription->node)->subscription, 0) ;
return FALSE;
}
if (!metadata_list_get (subscription->metadata, "reedah-feed-id")) {
g_warning ("Skipping Reedah feed '%s' (%s) without id!", subscription->source, subscription->node->id);
return FALSE;
}
debug0 (DEBUG_UPDATE, "Setting cookies for a Reedah subscription");
gchar* source_escaped = g_uri_escape_string(metadata_list_get (subscription->metadata, "reedah-feed-id"), NULL, TRUE);
// FIXME: move to .h
// FIXME: do not use 30
gchar* newUrl = g_strdup_printf ("http://www.reedah.com/reader/api/0/stream/contents/%s?client=liferea&n=30", source_escaped);
update_request_set_source (request, newUrl);
g_free (newUrl);
g_free (source_escaped);
update_request_set_auth_value (request, source->root->source->authToken);
return TRUE;
}
开发者ID:814ckf0x,项目名称:liferea,代码行数:30,代码来源:reedah_source_feed.c
示例2: ttrss_feed_subscription_prepare_update_request
static gboolean
ttrss_feed_subscription_prepare_update_request (subscriptionPtr subscription,
struct updateRequest *request)
{
debug0 (DEBUG_UPDATE, "ttrss_feed_subscription_prepare_update_request()");
nodePtr root = node_source_root_from_node (subscription->node);
ttrssSourcePtr source = (ttrssSourcePtr) root->data;
const gchar *feed_id;
gchar *source_name;
debug0 (DEBUG_UPDATE, "preparing tt-rss feed subscription for update");
g_assert(source);
if (source->loginState == TTRSS_SOURCE_STATE_NONE) {
subscription_update (root->subscription, 0);
return FALSE;
}
feed_id = metadata_list_get (subscription->metadata, "ttrss-feed-id");
if (!feed_id) {
g_warning ("tt-rss feed without id! (%s)", subscription->node->title);
return FALSE;
}
request->postdata = g_strdup_printf (TTRSS_JSON_HEADLINES, source->session_id, feed_id, 15 /* items to fetch */ );
source_name = g_strdup_printf (TTRSS_URL, metadata_list_get (root->subscription->metadata, "ttrss-url"));
update_request_set_source (request, source_name);
g_free (source_name);
return TRUE;
}
开发者ID:skagedal,项目名称:liferea,代码行数:30,代码来源:ttrss_source_feed.c
示例3: ttrss_subscription_prepare_update_request
static gboolean
ttrss_subscription_prepare_update_request (subscriptionPtr subscription, struct updateRequest *request)
{
ttrssSourcePtr source = (ttrssSourcePtr) subscription->node->data;
gchar *source_uri;
debug0 (DEBUG_UPDATE, "ttrss_subscription_prepare_update_request");
g_assert (source);
if (source->loginState == TTRSS_SOURCE_STATE_NONE) {
debug0 (DEBUG_UPDATE, "TinyTinyRSS login");
ttrss_source_login (source, 0);
return FALSE;
}
debug1 (DEBUG_UPDATE, "TinyTinyRSS updating subscription (node id %s)", subscription->node->id);
/* Updating the TinyTinyRSS subscription means updating the list
of categories and the list of feeds in 2 requests and if the
installation is not self-updating to run a remote update for
each feed before fetching it's items */
source_uri = g_strdup_printf (TTRSS_URL, source->url);
update_request_set_source (request, source_uri);
g_free (source_uri);
request->postdata = g_strdup_printf (TTRSS_JSON_CATEGORIES_LIST, source->session_id);
return TRUE;
}
开发者ID:hfiguiere,项目名称:liferea,代码行数:28,代码来源:ttrss_source_feed_list.c
示例4: PDF_LinkCheck
static void PDF_LinkCheck()
{
debug0(DPF, D, "PDF_LinkCheck()");
/* still to do */
debug0(DPF, D, "PDF_LinkCheck returning.");
} /* end PDF_LinkCheck */
开发者ID:5432935,项目名称:crossbridge,代码行数:8,代码来源:z50.c
示例5: PDF_PrintGraphicInclude
void PDF_PrintGraphicInclude(OBJECT x, FULL_LENGTH colmark, FULL_LENGTH rowmark)
{ OBJECT y;
debug0(DPF, D, "PDF_PrintGraphicInclude(x)");
Child(y, Down(x));
Error(50, 4, "cannot include EPS file in PDF output; EPS file %s ignored",
WARN, &fpos(x), string(y));
debug0(DPF, D, "PDF_PrintGraphicInclude returning.");
} /* end PDF_PrintGraphicInclude */
开发者ID:5432935,项目名称:crossbridge,代码行数:8,代码来源:z50.c
示例6: StartMoment
OBJECT StartMoment(void)
{ OBJECT res;
debug0(DTK, D, "StartMoment()");
assert(current_moment != nilobj, "StartMoment: current_moment == nilobj!");
res = CopyObject(current_moment, no_fpos);
debug0(DTK, D, "StartMoment returning");
ifdebug(DTK, D, DebugObject(res));
return res;
}
开发者ID:thektulu,项目名称:lout,代码行数:9,代码来源:z35.c
示例7: PDF_RestoreGraphicState
void PDF_RestoreGraphicState(void)
{ debug0(DPF, D, "PDF_RestoreGraphicState()");
PDFPage_Pop(out_fp);
currentfont = gs_stack[gs_stack_top].gs_font;
currentcolour = gs_stack[gs_stack_top].gs_colour;
cpexists = gs_stack[gs_stack_top].gs_cpexists;
currenty = gs_stack[gs_stack_top].gs_currenty;
currentxheight2 = gs_stack[gs_stack_top].gs_xheight2;
gs_stack_top--;
debug0(DPF, D, "PDF_RestoreGraphicState returning.");
} /* end PDF_RestoreGraphicState */
开发者ID:5432935,项目名称:crossbridge,代码行数:11,代码来源:z50.c
示例8: InitTime
void InitTime(void)
{ time_t raw_time; struct tm *now;
FULL_CHAR buff[20]; OBJECT par, tmp, sym, env;
OBJECT tag, second, minute, hour, weekday,
monthday, yearday, month, year, century, dst;
debug0(DTK, D, "InitTime()");
/* define @Moment symbol with its host of named parameters */
MomentSym = load(KW_MOMENT, LOCAL, StartSym);
tag = load(KW_TAG, NPAR, MomentSym);
second = load(KW_SECOND, NPAR, MomentSym);
minute = load(KW_MINUTE, NPAR, MomentSym);
hour = load(KW_HOUR, NPAR, MomentSym);
monthday = load(KW_DAY, NPAR, MomentSym);
month = load(KW_MONTH, NPAR, MomentSym);
year = load(KW_YEAR, NPAR, MomentSym);
century = load(KW_CENTURY, NPAR, MomentSym);
weekday = load(KW_WEEKDAY, NPAR, MomentSym);
yearday = load(KW_YEARDAY, NPAR, MomentSym);
dst = load(KW_DAYLIGHTSAVING, NPAR, MomentSym);
/* get current time and convert to ASCII */
if( time(&raw_time) == -1 )
Error(35, 1, "unable to obtain the current time", WARN, no_fpos);
now = localtime(&raw_time);
StringCopy(time_string, AsciiToFull(asctime(now)));
time_string[StringLength(time_string) - 1] = '\0';
/* start of current_moment */
New(current_moment, CLOSURE);
actual(current_moment) = MomentSym;
/* attach its many parameters */
add_par("%s", KW_NOW, tag);
add_par("%.2d", now->tm_sec, second);
add_par("%.2d", now->tm_min, minute);
add_par("%.2d", now->tm_hour, hour);
add_par("%d", now->tm_mday, monthday);
add_par("%d", now->tm_mon + 1, month);
add_par("%.2d", now->tm_year % 100, year);
add_par("%d", (now->tm_year+1900) / 100, century);
add_par("%d", now->tm_wday + 1, weekday);
add_par("%d", now->tm_yday, yearday);
add_par("%d", now->tm_isdst, dst);
/* add a null environment */
New(env, ENV);
AttachEnv(env, current_moment);
debug0(DTK, D, "InitTime() returning.");
debug0(DTK, DD, "current_moment =");
ifdebug(DTK, DD, DebugObject(current_moment));
} /* end InitTime */
开发者ID:thektulu,项目名称:lout,代码行数:52,代码来源:z35.c
示例9: ParentFlush
static void ParentFlush(BOOLEAN prnt_flush, OBJECT dest_index, BOOLEAN kill)
{ OBJECT prnt;
debug3(DGF, DD, "ParentFlush(%s, %s, %s)",
bool(prnt_flush), EchoIndex(dest_index), bool(kill));
if( prnt_flush )
{ Parent(prnt, Up(dest_index));
if( kill ) DeleteNode(dest_index);
debug0(DGF, DD, " calling FlushGalley from ParentFlush");
FlushGalley(prnt);
}
else if( kill ) DeleteNode(dest_index)
debug0(DGF, DD, "ParentFlush returning.");
} /* end ParentFlush */
开发者ID:5432935,项目名称:crossbridge,代码行数:13,代码来源:z20.c
示例10: EnvInit
void EnvInit(void)
{ int i;
debug0(DET, DD, "EnvInit()");
stat_reads = 0;
stat_read_hits = 0;
stat_writes = 0;
stat_write_hits = 0;
New(env_cache, ACAT);
cache_count = 0;
for( i = 0; i < TAB_SIZE; i++ )
{ tab[i] = nilobj;
}
debug0(DET, DD, "EnvInit returning");
} /* end EnvInit */
开发者ID:thektulu,项目名称:lout,代码行数:14,代码来源:z47.c
示例11: PDF_PrintInitialize
static void PDF_PrintInitialize(FILE *fp)
{
debug0(DPF, DD, "PDF_PrintInitialize(fp)");
out_fp = fp;
prologue_done = FALSE;
gs_stack_top = -1;
currentfont = NO_FONT;
currentcolour = NO_COLOUR;
cpexists = FALSE;
wordcount = pagecount = 0;
New(needs, ACAT);
New(supplied, ACAT);
debug0(DPF, DD, "PDF_PrintInitialize returning.");
} /* end PDF_PrintInitialize */
开发者ID:5432935,项目名称:crossbridge,代码行数:14,代码来源:z50.c
示例12: PDF_SaveGraphicState
void PDF_SaveGraphicState(OBJECT x)
{ debug0(DPF, D, "PDF_SaveGraphicState()");
PDFPage_Push(out_fp);
gs_stack_top++;
if( gs_stack_top >= MAX_GS )
Error(50, 1, "rotations, graphics etc. too deeply nested (max is %d)",
FATAL, &fpos(x), MAX_GS);
gs_stack[gs_stack_top].gs_font = currentfont;
gs_stack[gs_stack_top].gs_colour = currentcolour;
gs_stack[gs_stack_top].gs_cpexists = cpexists;
gs_stack[gs_stack_top].gs_currenty = currenty;
gs_stack[gs_stack_top].gs_xheight2 = currentxheight2;
debug0(DPF, D, "PDF_SaveGraphicState returning.");
} /* end PDF_SaveGraphicState */
开发者ID:5432935,项目名称:crossbridge,代码行数:14,代码来源:z50.c
示例13: rdbi_col_getW
int rdbi_col_getW(
rdbi_context_def *context,
wchar_t *column_name,
wchar_t *type,
int *length,
int *scale,
int *nullable,
int *is_autoincrement,
int *position,
int *eof)
{
int status;
debug_on("rdbi_col_getW");
status = (*(context->dispatch.col_getW))(context->drvr, column_name, type, length, scale, nullable, is_autoincrement,
position, eof);
context->rdbi_last_status = status;
debug_area()
{
if (*eof)
{
debug0("eof=TRUE");
}
else
{
debug6("column='%ls', type='%ls', length=%d, scale=%d, nullable=%s, position=%d",
ISNULL(column_name), ISNULL(type), *length, *scale, ISTRUE(*nullable), *position);
}
}
debug_return(NULL, status);
}
开发者ID:johanvdw,项目名称:fdo-git-mirror,代码行数:34,代码来源:col_.c
示例14: db_search_folder_add_items
void
db_search_folder_add_items (const gchar *id, GSList *items)
{
sqlite3_stmt *stmt;
GSList *iter;
gint res;
debug2 (DEBUG_DB, "add %d items to search folder node \"%s\"", g_slist_length (items), id);
stmt = db_get_statement ("itemUpdateSearchFoldersStmt");
iter = items;
while (iter) {
itemPtr item = (itemPtr)iter->data;
sqlite3_reset (stmt);
sqlite3_bind_text (stmt, 1, id, -1, SQLITE_TRANSIENT);
sqlite3_bind_text (stmt, 2, item->nodeId, -1, SQLITE_TRANSIENT);
sqlite3_bind_int (stmt, 3, item->id);
res = sqlite3_step (stmt);
if (SQLITE_DONE != res)
g_error ("db_search_folder_add_items: sqlite3_step (error code %d)!", res);
iter = g_slist_next (iter);
}
sqlite3_finalize (stmt);
debug0 (DEBUG_DB, "adding items to search folder finished");
}
开发者ID:skagedal,项目名称:liferea,代码行数:31,代码来源:db.c
示例15: AttachEnv
void AttachEnv(OBJECT env, OBJECT x)
{ debug2(DCE, DD, "AttachEnv( %s, %s )", EchoObject(env), EchoObject(x));
assert( env != nilobj && type(env) == ENV, "AttachEnv: type(env) != ENV!" );
assert( type(x) == CLOSURE || type(x) == ENV_OBJ, "AttachEnv: type(x)!" );
Link(x, env);
debug0(DCE, DD, "AttachEnv returning.");
} /* end AttachEnv */
开发者ID:thektulu,项目名称:lout,代码行数:7,代码来源:z09.c
示例16: PDF_DefineGraphicNames
void PDF_DefineGraphicNames(OBJECT x)
{ assert( type(x) == GRAPHIC, "PrintGraphic: type(x) != GRAPHIC!" );
debug1(DPF, D, "DefineGraphicNames( %s )", EchoObject(x));
debug1(DPF, DD, " style = %s", EchoStyle(&save_style(x)));
/* if font is different to previous word then print change */
if( font(save_style(x)) != currentfont )
{ currentfont = font(save_style(x));
if( currentfont > 0 )
{ currentxheight2 = FontHalfXHeight(currentfont);
PDFFont_Set(out_fp, FontSize(currentfont, x), FontName(currentfont));
}
}
/* if colour is different to previous word then print change */
if( colour(save_style(x)) != currentcolour )
{ currentcolour = colour(save_style(x));
if( currentcolour > 0 )
{ char str[256];
sprintf(str, "%s ", ColourCommand(currentcolour));
PDFPage_Write(out_fp, str);
}
}
PDFPage_SetVars(size(x, COLM), size(x, ROWM), back(x, COLM), fwd(x, ROWM),
currentfont <= 0 ? 12*PT : FontSize(currentfont, x),
width(line_gap(save_style(x))), width(space_gap(save_style(x))));
debug0(DPF, D, "PDF_DefineGraphicNames returning.");
} /* end PDF_DefineGraphicNames */
开发者ID:5432935,项目名称:crossbridge,代码行数:30,代码来源:z50.c
示例17: feed_parser_auto_discover
/**
* This function tries to find a feed link for a given HTTP URI. It
* tries to download it. If it finds a valid feed source it parses
* this source instead into the given feed parsing context. It also
* replaces the HTTP URI with the found feed source.
*/
static void
feed_parser_auto_discover (feedParserCtxtPtr ctxt)
{
gchar *source;
if (ctxt->feed->parseErrors)
g_string_truncate (ctxt->feed->parseErrors, 0);
else
ctxt->feed->parseErrors = g_string_new(NULL);
debug1 (DEBUG_UPDATE, "Starting feed auto discovery (%s)", subscription_get_source (ctxt->subscription));
source = html_auto_discover_feed (ctxt->data, subscription_get_source (ctxt->subscription));
/* FIXME: we only need the !g_str_equal as a workaround after a 404 */
if (source && !g_str_equal (source, subscription_get_source (ctxt->subscription))) {
debug1 (DEBUG_UPDATE, "Discovered link: %s", source);
ctxt->failed = FALSE;
subscription_set_source (ctxt->subscription, source);
/* The feed that was processed wasn't the correct one, we need to redownload it.
* Cancel the update in case there's one in progress */
subscription_cancel_update (ctxt->subscription);
subscription_update (ctxt->subscription, FEED_REQ_RESET_TITLE);
g_free (source);
} else {
debug0 (DEBUG_UPDATE, "No feed link found!");
g_string_append (ctxt->feed->parseErrors, _("The URL you want Liferea to subscribe to points to a webpage and the auto discovery found no feeds on this page. Maybe this webpage just does not support feed auto discovery."));
}
}
开发者ID:814ckf0x,项目名称:liferea,代码行数:36,代码来源:feed_parser.c
示例18: message_received_cb
static UniqueResponse
message_received_cb (UniqueApp *app,
UniqueCommand command,
UniqueMessageData *message,
guint time_,
gpointer user_data)
{
UniqueResponse res;
gchar *feed;
debug1(DEBUG_GUI, "libunique command received >>>%d<<<", command);
switch (command)
{
case UNIQUE_ACTIVATE:
/* Raise the liferea window */
debug0 (DEBUG_GUI, "-> raise window requested");
liferea_shell_present ();
res = UNIQUE_RESPONSE_OK;
break;
case COMMAND_ADD_FEED:
feed = unique_message_data_get_text (message);
feedlist_add_subscription (feed, NULL, NULL, 0);
res = UNIQUE_RESPONSE_OK;
break;
default:
g_warning ("Received unknown libunique command: >>>%d<<<", command);
res = UNIQUE_RESPONSE_OK;
break;
}
return res;
}
开发者ID:LMephisto,项目名称:liferea,代码行数:34,代码来源:main.c
示例19: EnvWriteRetrieve
BOOLEAN EnvWriteRetrieve(OBJECT env, FILE_NUM fnum, int *offset, int *lnum)
{ unsigned int pos; OBJECT link, y, z;
debug2(DET, DD, "EnvWriteRetrieve(env %d, %s)", (int) env, FileName(fnum));
debug1(DET, DDD, " %s", EchoObject(env));
stat_writes++;
hash1(pos, env, fnum);
if( tab[pos] != nilobj )
{
for( link = Down(tab[pos]); link != tab[pos]; link = NextDown(link) )
{ Child(y, link);
Child(z, Down(y));
if( env_fnum(y) == fnum && z == env && !env_read(y) )
{ MoveLink(LastUp(y), env_cache, PARENT);
*offset = env_offset(y);
*lnum = env_lnum(y);
stat_write_hits++;
debug2(DET, DD, "EnvWriteRetrieve returning TRUE (offset %d, lnum %d)",
*offset, *lnum);
return TRUE;
}
}
}
debug0(DET, DD, "EnvWriteRetrieve returning FALSE");
return FALSE;
} /* end EnvWriteRetrieve */
开发者ID:thektulu,项目名称:lout,代码行数:25,代码来源:z47.c
示例20: debug0
/* do_seennick():
* takes a seen-dataset and produces the corresponding reply basically
* by referencing to the lang entry with the same number as the seen-type.
*/
static char *do_seennick(seendat *l)
{
// char buf[256], *msg;
int stype;
Context;
if (!l) {
debug0("ERROR! Tryed to do a seennick on a NULL pointer!");
return "ERROR! seendat == NULL!!!";
}
glob_seendat = l;
// l->type is the basic language-entry-number
stype = l->type + 100;
// in some cases, we might need a special reply, so modify the
// number if neccessary
switch (l->type) {
case SEEN_JOIN:
if (!onchan(l->nick, l->chan))
stype += 20;
break;
case SEEN_PART:
/* nothing to do here */
break;
case SEEN_SIGN:
/* nothing again */
break;
case SEEN_NICK:
if (!onchan(l->msg, l->chan))
stype += 20;
break;
case SEEN_NCKF:
if (!onchan(l->nick, l->chan))
stype += 20;
break;
case SEEN_KICK:
/* msg = buf;
strncpy(buf, l->msg, 255);
msg[255] = 0;
sglobpunisher = newsplit(&msg);
sglobreason = msg; */
break;
case SEEN_SPLT:
/* nothing to do here */
break;
case SEEN_REJN:
if (!onchan(l->nick, l->chan))
stype += 20;
break;
case SEEN_CHJN:
case SEEN_CHPT:
if (!strcmp(l->chan, "0"))
stype += 20;
break;
default:
stype = 140;
}
return getslang(stype);
}
开发者ID:Abysim,项目名称:NyanLion,代码行数:62,代码来源:do_seen.c
注:本文中的debug0函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论