这篇教程C++ CTRACE函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CTRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ CTRACE函数的具体用法?C++ CTRACE怎么用?C++ CTRACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CTRACE函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CTRACE/* * Find the EXTERNAL command which matches the given name 'param'. If there is * more than one possibility, make a popup menu of the matching commands and * allow the user to select one. Return the selected command. */static char *lookup_external(char *param, int only_overriders){ int pass, num_disabled, num_matched, num_choices, cur_choice; size_t length = 0; char *cmdbuf = NULL; char **actions = 0; char **choices = 0; lynx_list_item_type *ptr = 0; for (pass = 0; pass < 2; pass++) { num_disabled = 0; num_matched = 0; num_choices = 0; for (ptr = externals; ptr != 0; ptr = ptr->next) { if (match_item_by_name(ptr, param, only_overriders)) { ++num_matched; CTRACE((tfp, "EXTERNAL: '%s' <==> '%s'/n", ptr->name, param)); if (no_externals && !ptr->always_enabled && !only_overriders) { ++num_disabled; } else { if (pass == 0) { length++; } else if (pass != 0) { cmdbuf = format_command(ptr->command, param); if (length > 1) { actions[num_choices] = cmdbuf; choices[num_choices] = format_command(ptr->menu_name, param); } } num_choices++; } } } if (length > 1) { if (pass == 0) { actions = typecallocn(char *, length + 1); choices = typecallocn(char *, length + 1); if (actions == 0 || choices == 0) outofmem(__FILE__, "lookup_external"); } else { actions[num_choices] = 0; choices[num_choices] = 0; } }
开发者ID:ThomasDickey,项目名称:lynx-snapshots,代码行数:53,
示例2: ARGS1int HTLoadRules ARGS1(CONST char *, filename){ FILE * fp = fopen(filename, "r"); char line[LINE_LENGTH+1]; if (!fp) { CTRACE(stderr, "HTRules: Can't open rules file %s/n", filename); return -1; /* File open error */ } for(;;) { if (!fgets(line, LINE_LENGTH+1, fp)) break; /* EOF or error */ (void) HTSetConfiguration(line); } fclose(fp); return 0; /* No error or syntax errors ignored */}
开发者ID:kotohvost,项目名称:yui,代码行数:16,
示例3: ARGS2/* Create a chunk with a certain allocation unit and ensured size** --------------*/PUBLIC HTChunk * HTChunkCreate2 ARGS2 (int,grow, size_t, needed){ HTChunk * ch = typecalloc(HTChunk); if (ch == NULL) outofmem(__FILE__, "HTChunkCreate2"); HTChunkInit (ch, grow); if (needed > 0) { ch->allocated = needed-1 - ((needed-1) % ch->growby) + ch->growby; /* Round up */ CTRACE((tfp, "HTChunkCreate2: requested %d, allocate %d/n", (int) needed, ch->allocated)); ch->data = typecallocn(char, ch->allocated); if (!ch->data) outofmem(__FILE__, "HTChunkCreate2 data"); }
开发者ID:avsm,项目名称:openbsd-lynx,代码行数:19,
示例4: ARGS1PRIVATE int HTCloseGzFile ARGS1( gzFile, gzfp){ int gzres; if (gzfp == NULL) return 0; gzres = gzclose(gzfp); if (TRACE) { if (gzres == Z_ERRNO) { perror("gzclose "); } else if (gzres != Z_OK) { CTRACE((tfp, "gzclose : error number %d/n", gzres)); } } return(gzres);}
开发者ID:avsm,项目名称:openbsd-lynx,代码行数:16,
示例5: NXPrintfHTStyleSheet *HTStyleSheetWrite(HTStyleSheet *self, NXStream * stream){ int numStyles = 0; HTStyle *style; for (style = self->styles; style; style = style->next) numStyles++; NXPrintf(stream, "%d/n", numStyles); CTRACE((tfp, "StyleSheet: Writing %d styles/n", numStyles)); for (style = self->styles; style; style = style->next) { NXPrintf(stream, "%s ", style->name); (void) HTStyleWrite(style, stream); } return self;}
开发者ID:AaronDP,项目名称:lynx_adbshell,代码行数:16,
示例6: jthread_set_wait_monitorstatic void jthread_set_wait_monitor(jobject monitor){ vm_thread_t vm_thread = jthread_self_vm_thread(); assert(vm_thread); jvmti_thread_t jvmti_thread = &vm_thread->jvmti_thread; if (!jvmti_thread) { // nothing to do return; } CTRACE(("TM: set wait monitor: %x", monitor)); int disable_count = hythread_reset_suspend_disable(); jvmti_thread->wait_monitor = vm_thread->jni_env->NewGlobalRef(monitor); hythread_set_suspend_disable(disable_count);} // jthread_set_wait_monitor
开发者ID:dacut,项目名称:juliet,代码行数:16,
示例7: CTRACEBufferMapper* BufferManager::map(DataBuffer& buffer){ bool ret; BufferMapper* mapper; CTRACE(); Mutex::Autolock _l(mLock); //try to get mapper from pool mapper = mBufferPool->getMapper(buffer.getKey()); if (mapper) { // increase mapper ref count mapper->incRef(); return mapper; } // create a new buffer mapper and add it to pool do { VLOGTRACE("new buffer, will add it"); mapper = createBufferMapper(buffer); if (!mapper) { ELOGTRACE("failed to allocate mapper"); break; } ret = mapper->map(); if (!ret) { ELOGTRACE("failed to map"); delete mapper; mapper = NULL; break; } ret = mBufferPool->addMapper(buffer.getKey(), mapper); if (!ret) { ELOGTRACE("failed to add mapper"); break; } // increase mapper ref count mapper->incRef(); return mapper; } while (0); // error handling if (mapper) { mapper->unmap(); delete mapper; } return NULL;}
开发者ID:MIPS,项目名称:hardware-intel-img-hwcomposer,代码行数:47,
示例8: _check_cbstatic void_check_cb(UNUSED EV_P_ UNUSED ev_check *w, UNUSED int revents){ int npending; npending = ev_pending_count(the_loop);#ifdef TRACE_VERBOSE CTRACE("ev_pending_count=%d", npending);#endif if (npending <= 0) { //CTRACE("Breaking loop? ..."); //ev_break(the_loop, EVBREAK_ALL); } timecounter_now = (uint64_t)(ev_now(the_loop) * 1000000000.); //CTRACE("revents=%08x", revents);}
开发者ID:mkushnir,项目名称:mrkthr,代码行数:17,
示例9: test0static voidtest0(void){ int res; struct sigaction act = { .sa_flags = SA_SIGINFO, }; UNUSED mrkthr_ctx_t *cli; //mrkthr_ctx_t *srv; sigemptyset(&(act.sa_mask)); act.sa_sigaction = (void (*)(int, siginfo_t *, void *))sigterm_handler; sigaction(SIGTERM, &act, NULL); sigaction(SIGINT, &act, NULL); mrkthr_init(); shutdown_timer_ctx = mrkthr_new("tm", shut_me_down, 0); //CTRACE(); //if (pipe(read_pipe) != 0) { // FAIL("pipe"); //} //CTRACE(); //if (pipe(write_pipe) != 0) { // FAIL("pipe"); //} //CTRACE(); //srv = mrkthr_spawn("qwe", qwe, 2, read_pipe[0], write_pipe[1]); //cli = mrkthr_spawn("asd", asd, 2, write_pipe[0], read_pipe[1]); cli = mrkthr_spawn("bar", bar, 0); res = mrkthr_loop(); mrkthr_fini(); CTRACE("res=%d", res);}
开发者ID:mkushnir,项目名称:mrkthr,代码行数:46,
示例10: ARGS2/* Match maintype to any MIME type starting with maintype, * for example: image/gif should match image */PRIVATE int half_match ARGS2(char *,trial_type, char *,target){ char *cp = strchr(trial_type, '/'); /* if no '/' or no '*' */ if (!cp || *(cp+1) != '*') return 0; CTRACE((tfp, "HTFormat: comparing %s and %s for half match/n", trial_type, target)); /* main type matches */ if (!strncmp(trial_type, target, (cp-trial_type)-1)) return 1; return 0;}
开发者ID:avsm,项目名称:openbsd-lynx,代码行数:20,
示例11: ARGS3PRIVATE void syntax_error ARGS3(FILE *, fp, char *, msg, LexItem, lex_item){ char buffer[41]; int cnt = 0; int ch; while ((ch = getc(fp)) != EOF && ch != '/n') if (cnt < 40) buffer[cnt++] = ch; buffer[cnt] = (char)0; CTRACE(tfp, "%s %d before: '%s'/nHTGroup.c: %s (got %s)/n", "HTGroup.c: Syntax error in rule file at line", HTlex_line, buffer, msg, lex_verbose(lex_item)); HTlex_line++;}
开发者ID:OS2World,项目名称:APP-INTERNET-Lynx,代码行数:17,
示例12: mrkthr_wait_for_readintmrkthr_wait_for_read(int fd){ int res; UNUSED ev_item_t *ev, *ev1; ev = ev_io_item_get(fd, EV_READ); //ev_io_set(&ev->ev.io, fd, EV_READ); me->pdata.ev = ev; /* * check if there is another thread waiting for the same event. */ if (ev->ev.io.data == NULL) { ev->ev.io.data = me; } else if (ev->ev.io.data != me) { /* * in this case we are not allowed to wait for this event, * sorry. */ me->co.rc = MRKTHR_CO_RC_SIMULTANEOUS; return -1; }#ifdef TRACE_VERBOSE CTRACE(FBBLUE("starting ev_io %d/%s"), ev->ev.io.fd, EV_STR(ev->ev.io.events));#endif ev_io_start(the_loop, &ev->ev.io); /* wait for an event */ me->co.state = CO_STATE_READ; res = yield(); ev1 = ev_io_item_get(fd, EV_READ); assert(ev == ev1); assert(ev->ev.io.data == me); ev->ev.io.data = NULL; me->pdata.ev = NULL; return res;}
开发者ID:mkushnir,项目名称:mrkthr,代码行数:46,
示例13: psbWsbmDestroyTTMBufferint psbWsbmDestroyTTMBuffer(void * buf){ CTRACE(); if(!buf) { ETRACE("invalid ttm buffer"); return -EINVAL; } /*FIXME: should I unmap this buffer object first?*/ wsbmBOUnmap((struct _WsbmBufferObject *)buf); wsbmBOUnreference((struct _WsbmBufferObject **)&buf); XTRACE(); return 0;}
开发者ID:MIPS,项目名称:hardware-intel-img-hwcomposer,代码行数:18,
示例14: CTRACEbool DisplayPlane::initialize(uint32_t bufferCount){ CTRACE(); if (bufferCount < MIN_DATA_BUFFER_COUNT) { WLOGTRACE("buffer count %d is too small", bufferCount); bufferCount = MIN_DATA_BUFFER_COUNT; } // create buffer cache, adding few extra slots as buffer rendering is async // buffer could still be queued in the display pipeline such that they // can't be unmapped] mCacheCapacity = bufferCount; mDataBuffers.setCapacity(bufferCount); mActiveBuffers.setCapacity(MIN_DATA_BUFFER_COUNT); mInitialized = true; return true;}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_hardware_intel,代码行数:18,
示例15: ARGS2/* * Put the AddHrefs in a list. It can be used for indexing to * present special filetypes through a CGI. */PUBLIC void HTAddHref ARGS2(char *, url, char *, type_templ){ HTHrefNode * node; if (!url || !type_templ) return; node = (HTHrefNode*)calloc(1,sizeof(HTHrefNode)); if (!node) outofmem(__FILE__, "HTAddHref"); if (url) StrAllocCopy(node->href_url, url); if (type_templ) StrAllocCopy(node->type_templ, type_templ); if (!hrefs) hrefs = HTList_new(); HTList_addObject(hrefs, (void*)node); CTRACE(stderr, "AddHref..... %s => URL=/"%s/" /n",type_templ,url);}
开发者ID:tjgillies,项目名称:cern-httpd,代码行数:22,
示例16: LYpop/* * Pop the previous filename, link and line number from the history list. */void LYpop(DocInfo *doc){ if (nhist > 0) { clean_extra_history(); nhist--; LYFreeDocInfo(doc); *doc = HDOC(nhist);#ifdef DISP_PARTIAL /* assume we pop the 'doc' to show it soon... */ LYSetNewline(doc->line); /* reinitialize */#endif /* DISP_PARTIAL */ CTRACE((tfp, "LYpop[%d]: address:%s/n title:%s/n", nhist, doc->address, doc->title)); }}
开发者ID:ThomasDickey,项目名称:lynx-snapshots,代码行数:21,
示例17: _shutdownstatic int_shutdown(UNUSED int argc, UNUSED void **argv){ if (run_thread != NULL) { (void)mrkthr_set_interrupt_and_join(run_thread); run_thread = NULL; } if (monitor_thread != NULL) { (void)mrkthr_set_interrupt_and_join(monitor_thread); monitor_thread = NULL; } /* cleanup */ if (host != NULL) { free(host); host = NULL; } port = 0; if (user != NULL) { free(user); user = NULL; } if (password != NULL) { free(password); password = NULL; } if (vhost != NULL) { free(vhost); vhost = NULL; } if (exchange != NULL) { free(exchange); exchange = NULL; } if (routing_key != NULL) { free(routing_key); routing_key = NULL; } mrkthr_shutdown(); CTRACE("...shutdown OK"); return 0;}
开发者ID:mkushnir,项目名称:mrkamqp,代码行数:43,
示例18: typecalloc/* Create a chunk with a certain allocation unit and ensured size * -------------- */HTChunk *HTChunkCreate2(int grow, size_t needed){ HTChunk *ch = typecalloc(HTChunk); if (ch == NULL) outofmem(__FILE__, "HTChunkCreate2"); HTChunkInit(ch, grow); if (needed > 0) { /* Round up */ ch->allocated = (int) (needed - 1 - ((needed - 1) % ch->growby) + (unsigned) ch->growby); CTRACE((tfp, "HTChunkCreate2: requested %d, allocate %u/n", (int) needed, (unsigned) ch->allocated)); ch->data = typecallocn(char, (unsigned) ch->allocated); if (!ch->data) outofmem(__FILE__, "HTChunkCreate2 data"); }
开发者ID:sribits,项目名称:lynx,代码行数:22,
示例19: HTList_addObject/* Add object to START of list (so it is pointed to by the head).*/void HTList_addObject(HTList *me, void *newObject){ HTList *newNode; if (me) { if ((newNode = typeMalloc(HTList)) == NULL) outofmem(__FILE__, "HTList_addObject"); newNode->object = newObject; newNode->next = me->next; me->next = newNode; } else { CTRACE((tfp, "HTList: Trying to add object %p to a nonexisting list/n", newObject)); } return;}
开发者ID:ThomasDickey,项目名称:lynx-snapshots,代码行数:21,
示例20: message_has_contentstatic BOOLEAN message_has_content(const char *filename, BOOLEAN *nonspaces){ FILE *fp; char *buffer = NULL; BOOLEAN in_headers = TRUE; *nonspaces = FALSE; if (!filename || (fp = fopen(filename, "r")) == NULL) { CTRACE((tfp, "Failed to open file %s for reading!/n", NONNULL(filename))); return FALSE; } while (LYSafeGets(&buffer, fp) != NULL) { char *cp = buffer; char firstnonblank = '/0'; LYTrimNewline(cp); for (; *cp; cp++) { if (!firstnonblank && isgraph(UCH(*cp))) { firstnonblank = *cp; } else if (!isspace(UCH(*cp))) { *nonspaces = TRUE; } } if (firstnonblank && firstnonblank != '>') { if (!in_headers) { LYCloseInput(fp); FREE(buffer); return TRUE; } } if (!firstnonblank) { in_headers = FALSE; } } FREE(buffer); LYCloseInput(fp); return FALSE;}
开发者ID:Distrotech,项目名称:lynx,代码行数:41,
示例21: StrAllocCopystatic char *suggested_filename(DocInfo *newdoc){ char *sug_filename = 0; int rootlen; /* * Load the suggested filename string. - FM */ if (HText_getSugFname() != 0) StrAllocCopy(sug_filename, HText_getSugFname()); /* must be freed */ else StrAllocCopy(sug_filename, newdoc->address); /* must be freed */ /* * Strip suffix for compressed-files, if present. */ if (HTCompressFileType(sug_filename, ".", &rootlen) != cftNone) sug_filename[rootlen] = '/0'; CTRACE((tfp, "suggest %s/n", sug_filename)); return sug_filename;}
开发者ID:iwonasado,项目名称:android_real_web_server,代码行数:21,
示例22: CTRACE/* Append a list to another. * * If successful, the second list will become empty but not freed. */HTList *HTList_appendList(HTList *start, HTList *tail){ HTList *temp = start; if (!start) { CTRACE((tfp, "HTList: Trying to append list %p to a nonexisting list/n", (void *) tail)); return NULL; } if (!(tail && tail->next)) return start; while (temp->next) temp = temp->next; temp->next = tail->next; tail->next = NULL; /* tail is now an empty list */ return start;}
开发者ID:AaronDP,项目名称:lynx_adbshell,代码行数:25,
示例23: ARGS2/* * Find the EXTERNAL command which matches the given name 'param'. If there is * more than one possibility, make a popup menu of the matching commands and * allow the user to select one. Return the selected command. */PRIVATE char *lookup_external ARGS2( char *, param, BOOL, only_overriders){ int pass, num_disabled, num_matched, num_choices, cur_choice; int length = 0; char *cmdbuf = NULL; char **choices = 0; lynx_list_item_type *ptr = 0; for (pass = 0; pass < 2; pass++) { num_disabled = 0; num_matched = 0; num_choices = 0; for (ptr = externals; ptr != 0; ptr = ptr->next) { if (match_item_by_name(ptr, param, only_overriders)) { ++num_matched; CTRACE((tfp, "EXTERNAL: '%s' <==> '%s'/n", ptr->name, param)); if (no_externals && !ptr->always_enabled && !only_overriders) { ++num_disabled; } else { if (pass == 0) { length++; } else if (pass != 0) { cmdbuf = format_command(ptr->command, param); if (length > 1) choices[num_choices] = cmdbuf; } num_choices++; } } } if (length > 1) { if (pass == 0) { choices = typecallocn(char *, length + 1); } else { choices[num_choices] = 0; } }
开发者ID:avsm,项目名称:openbsd-lynx,代码行数:45,
示例24: ARGS4/* Create a filter stack** ---------------------**** If a wildcard match is made, a temporary HTPresentation** structure is made to hold the destination format while the** new stack is generated. This is just to pass the out format to** MIME so far. Storing the format of a stream in the stream might** be a lot neater.***/PUBLIC HTStream * HTStreamStack ARGS4( HTFormat, rep_in, HTFormat, rep_out, HTStream*, sink, HTParentAnchor*, anchor){ HTPresentation temp; HTPresentation *match; HTStream *result; CTRACE((tfp, "HTFormat: Constructing stream stack for %s to %s/n", HTAtom_name(rep_in), HTAtom_name(rep_out))); /* don't return on WWW_SOURCE some people might like * to make use of the source!!!! LJM */#if 0 if (rep_out == WWW_SOURCE || rep_out == rep_in) return sink; /* LJM */#endif if (rep_out == rep_in) { result = sink; } else if ((match = HTFindPresentation(rep_in, rep_out, &temp))) { if (match == &temp) { CTRACE((tfp, "StreamStack: Using %s/n", HTAtom_name(temp.rep_out))); } else { CTRACE((tfp, "StreamStack: found exact match: %s/n", HTAtom_name(match->rep))); } result = (*match->converter)(match, anchor, sink); } else { result = NULL; } if (TRACE) { if (result && result->isa && result->isa->name) { CTRACE((tfp, "StreamStack: Returning /"%s/"/n", result->isa->name)); } else if (result) { CTRACE((tfp, "StreamStack: Returning *unknown* stream!/n")); } else { CTRACE((tfp, "StreamStack: Returning NULL!/n")); CTRACE_FLUSH(tfp); /* a crash may be imminent... - kw */ } } return result;}
开发者ID:avsm,项目名称:openbsd-lynx,代码行数:57,
示例25: CTRACEbool TTMBufferMapper::map(){ void *wsbmBufferObject = 0; buffer_handle_t handle; void *virtAddr; uint32_t gttOffsetInPage; CTRACE(); handle = getHandle(); bool ret = mWsbm.wrapTTMBuffer((int64_t)handle, &wsbmBufferObject); if (ret == false) { ETRACE("failed to map TTM buffer"); return false; } // TODO: review this later ret = mWsbm.waitIdleTTMBuffer(wsbmBufferObject); if (ret == false) { ETRACE("failed to wait ttm buffer idle"); return false; } virtAddr = mWsbm.getCPUAddress(wsbmBufferObject); gttOffsetInPage = mWsbm.getGttOffset(wsbmBufferObject); if (!gttOffsetInPage || !virtAddr) { WTRACE("offset = %#x, addr = %p.", gttOffsetInPage, virtAddr); return false; } // update parameters mBufferObject = wsbmBufferObject; mGttOffsetInPage = gttOffsetInPage; mCpuAddress = virtAddr; mSize = 0; return true;}
开发者ID:MIPS,项目名称:hardware-intel-img-hwcomposer,代码行数:39,
示例26: HTAssocList_addvoid HTAssocList_add(HTAssocList *alist, const char *name, const char *value){ HTAssoc *assoc; if (alist) { if (!(assoc = (HTAssoc *) malloc(sizeof(HTAssoc)))) outofmem(__FILE__, "HTAssoc_add"); assoc->name = NULL; assoc->value = NULL; if (name) StrAllocCopy(assoc->name, name); if (value) StrAllocCopy(assoc->value, value); HTList_addObject(alist, (void *) assoc); } else { CTRACE((tfp, "HTAssoc_add: ERROR: assoc list NULL!!/n")); }}
开发者ID:Distrotech,项目名称:lynx,代码行数:22,
示例27: NXScanf/* Read a stylesheet from a typed stream * ------------------------------------- * * Reads a style sheet from a stream. If new styles have the same names * as existing styles, they replace the old ones without changing the ids. */#ifdef NEXT_SUPRESS /* Only on the NeXT */HTStyleSheet *HTStyleSheetRead(HTStyleSheet *self, NXStream * stream){ int numStyles; int i; HTStyle *style; char styleName[80]; NXScanf(stream, " %d ", &numStyles); CTRACE((tfp, "Stylesheet: Reading %d styles/n", numStyles)); for (i = 0; i < numStyles; i++) { NXScanf(stream, "%s", styleName); style = HTStyleNamed(self, styleName); if (!style) { style = HTStyleNewNamed(styleName); (void) HTStyleSheetAddStyle(self, style); } (void) HTStyleRead(style, stream); if (TRACE) HTStyleDump(style); } return self;}
开发者ID:AaronDP,项目名称:lynx_adbshell,代码行数:30,
示例28: CTRACEHTStyle *HTStyleForRun(HTStyleSheet *self, NXRun * run){ HTStyle *scan; HTStyle *best = 0; int bestMatch = 0; NXTextStyle *rp = run->paraStyle; for (scan = self->styles; scan; scan = scan->next) if (scan->paragraph == run->paraStyle) return scan; /* Exact */ for (scan = self->styles; scan; scan = scan->next) { NXTextStyle *sp = scan->paragraph; if (sp) { int match = 0; if (sp->indent1st == rp->indent1st) match = match + 1; if (sp->indent2nd == rp->indent2nd) match = match + 2; if (sp->lineHt == rp->lineHt) match = match + 1; if (sp->numTabs == rp->numTabs) match = match + 1; if (sp->alignment == rp->alignment) match = match + 3; if (scan->font == run->font) match = match + 10; if (match > bestMatch) { best = scan; bestMatch = match; } } } CTRACE((tfp, "HTStyleForRun: Best match for style is %d out of 18/n", bestMatch)); return best;}
开发者ID:AaronDP,项目名称:lynx_adbshell,代码行数:39,
示例29: StrAllocCopy/* PUBLIC HTAA_makeProtectionTemplate() * CREATE A PROTECTION TEMPLATE FOR THE FILES * IN THE SAME DIRECTORY AS THE GIVEN FILE * (Used by server if there is no fancier way for * it to tell the client, and by browser if server * didn't send WWW-ProtectionTemplate: field) * ON ENTRY: * docname is the document pathname (from URL). * * ON EXIT: * returns a template matching docname, and other files * files in that directory. * * E.g. /foo/bar/x.html => /foo/bar/ * * ^ * Space only to prevent it from * being a comment marker here, * there really isn't any space. */char *HTAA_makeProtectionTemplate(const char *docname){ char *ctemplate = NULL; char *slash = NULL; if (docname) { StrAllocCopy(ctemplate, docname); slash = strrchr(ctemplate, '/'); if (slash) slash++; else slash = ctemplate; *slash = '/0'; StrAllocCat(ctemplate, "*"); } else StrAllocCopy(ctemplate, "*"); CTRACE((tfp, "make_template: made template `%s' for file `%s'/n", ctemplate, docname)); return ctemplate;}
开发者ID:ThomasDickey,项目名称:lynx-snapshots,代码行数:41,
注:本文中的CTRACE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CTRL函数代码示例 C++ CTR4函数代码示例 |