您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vStringDelete函数代码示例

51自学网 2021-06-03 09:31:23
  C++
这篇教程C++ vStringDelete函数代码示例写得很实用,希望能帮到您。

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

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

示例1: emitRubyTag

/** Emits a tag for the given 'name' of kind 'kind' at the current nesting.*/static void emitRubyTag (vString* name, rubyKind kind){	tagEntryInfo tag;	vString* scope;	tagEntryInfo *parent;	rubyKind parent_kind = K_UNDEFINED;	NestingLevel *lvl;	const char *unqualified_name;	const char *qualified_name;	int r;        if (!RubyKinds[kind].enabled) {            return;        }	scope = nestingLevelsToScope (nesting);	lvl = nestingLevelsGetCurrent (nesting);	parent = getEntryOfNestingLevel (lvl);	if (parent)		parent_kind =  parent->kindIndex;	qualified_name = vStringValue (name);	unqualified_name = strrchr (qualified_name, SCOPE_SEPARATOR);	if (unqualified_name && unqualified_name[1])	{		if (unqualified_name > qualified_name)		{			if (vStringLength (scope) > 0)				vStringPut (scope, SCOPE_SEPARATOR);			vStringNCatS (scope, qualified_name,			              unqualified_name - qualified_name);			/* assume module parent type for a lack of a better option */			parent_kind = K_MODULE;		}		unqualified_name++;	}	else		unqualified_name = qualified_name;	initTagEntry (&tag, unqualified_name, kind);	if (vStringLength (scope) > 0) {		Assert (0 <= parent_kind &&		        (size_t) parent_kind < (ARRAY_SIZE (RubyKinds)));		tag.extensionFields.scopeKindIndex = parent_kind;		tag.extensionFields.scopeName = vStringValue (scope);	}	r = makeTagEntry (&tag);	nestingLevelsPush (nesting, r);	vStringClear (name);	vStringDelete (scope);}
开发者ID:masatake,项目名称:ctags,代码行数:57,


示例2: parseFunction

static void parseFunction (const unsigned char *line){	vString *name = vStringNew ();	/* boolean inFunction = FALSE; */	int scope;	const unsigned char *cp = line + 1;	if ((int) *++cp == 'n'	&&	(int) *++cp == 'c'	&&		(int) *++cp == 't'	&&	(int) *++cp == 'i'	&&		(int) *++cp == 'o'	&&	(int) *++cp == 'n')			++cp;	if ((int) *cp == '!')		++cp;	if (isspace ((int) *cp))	{		while (*cp && isspace ((int) *cp))			++cp;		if (*cp)		{			cp = skipPrefix (cp, &scope);			if (isupper ((int) *cp)  ||  					scope == 's'  ||  /* script scope */					scope == '<'  ||  /* script scope */					scope == 'd'  ||  /* dictionary */					scope == 'a')	  /* autoload */			{				do				{					vStringPut (name, (int) *cp);					++cp;				} while (isalnum ((int) *cp) ||  *cp == '_' ||	*cp == '.' ||  *cp == '#');				vStringTerminate (name);				makeSimpleTag (name, VimKinds, K_FUNCTION);				vStringClear (name);			}		}	}	/* TODO - update struct to indicate inside function */	while ((line = readVimLine ()) != NULL)	{		/* 		 * Vim7 added the for/endfo[r] construct, so we must first		 * check for an "endfo", before a "endf"		 */		if ( (!strncmp ((const char*) line, "endfo", (size_t) 5) == 0) && 				(strncmp ((const char*) line, "endf", (size_t) 4) == 0)   )			break;		/* TODO - call parseVimLine */	}	vStringDelete (name);}
开发者ID:Cognoscan,项目名称:ctags,代码行数:54,


示例3: findRustTags

static void findRustTags (void){	lexerState lexer;	vString* scope = vStringNew();	initLexer(&lexer);	parseBlock(&lexer, FALSE, K_NONE, scope);	vStringDelete(scope);	deInitLexer(&lexer);}
开发者ID:Dev0Null,项目名称:ctags,代码行数:11,


示例4: setInputFileName

static void setInputFileName (const char *const fileName){	const char *const head = fileName;	const char *const tail = baseFilename (head);	if (File.name != NULL)		vStringDelete (File.name);	File.name = vStringNewInit (fileName);	if (File.path != NULL)		vStringDelete (File.path);	if (tail == head)		File.path = NULL;	else	{		const size_t length = tail - head - 1;		File.path = vStringNew ();		vStringNCopyS (File.path, fileName, length);	}}
开发者ID:0xeuclid,项目名称:vim_for_UEFI,代码行数:20,


示例5: getInterpreterLanguage

static langType getInterpreterLanguage (const char *const fileName){    langType result = LANG_IGNORE;    FILE* const fp = fopen (fileName, "r");    if (fp != NULL)    {	vString* const vLine = vStringNew ();	const char* const line = readLine (vLine, fp);	if (line != NULL  &&  line [0] == '#'  &&  line [1] == '!')	{	    const char* const lastSlash = strrchr (line, '/');	    const char *const cmd = lastSlash != NULL ? lastSlash+1 : line+2;	    vString* const interpreter = determineInterpreter (cmd);	    result = getExtensionLanguage (vStringValue (interpreter));	    vStringDelete (interpreter);	}	vStringDelete (vLine);	fclose (fp);    }    return result;}
开发者ID:att,项目名称:uwin,代码行数:21,


示例6: AutomakeMakeTag

static boolean AutomakeMakeTag (vString *const name, const char* suffix, boolean appending,			    int kindex, int rindex, struct sBlacklist *blacklist,			    void *data){	int *index = data;	size_t expected_len;	size_t len;	char* tail;	vString *subname;	int i;	len = vStringLength (name);	expected_len = strlen (suffix);	if (len <= expected_len)		return FALSE;	for (i = 0; blacklist[i].type != BL_END; i++)	{		if (bl_check (vStringValue(name), blacklist + i) == FALSE)			return FALSE;	}	tail = vStringValue (name) + len - expected_len;	if (strcmp (tail, suffix))		return FALSE;	subname = vStringNew();	/* ??? dist, nodist, nobase, notrans,... */	if (strncmp (vStringValue(name), "dist_", 5) == 0)		vStringNCopyS(subname, vStringValue(name) + 5, len - expected_len - 5);	else		vStringNCopyS(subname, vStringValue(name), len - expected_len);	if (rindex == ROLE_INDEX_DEFINITION)	{		*index = makeSimpleTag (subname, AutomakeKinds, kindex);		addAutomakeDirectory (subname, *index);	}	else	{		*index = CORK_NIL;		if (appending)			*index = lookupAutomakeDirectory (subname);		if ((!appending) || (*index == CORK_NIL))			*index = makeSimpleRefTag (subname, AutomakeKinds, kindex, rindex);	}	vStringDelete (subname);	return TRUE;}
开发者ID:Sirlsliang,项目名称:ctags,代码行数:53,


示例7: freeTgEntry

static tgTableEntry* freeTgEntry(tgTableEntry *entry){	tgTableEntry* r;	if (entry->corpus_file)	{		eFree (entry->tg_table);		entry->tg_table = NULL;		vStringDelete (entry->corpus_file);		entry->corpus_file = NULL;	}	vStringDelete (entry->spec);	entry->spec = NULL;	r = entry->next;	entry->next = NULL;	eFree(entry);	return r;}
开发者ID:b4n,项目名称:fishman-ctags,代码行数:21,


示例8: findTags

static void findTags (boolean startsInPhpMode){	tokenInfo *const token = newToken ();	InPhp = startsInPhpMode;	CurrentStatement.access = ACCESS_UNDEFINED;	CurrentStatement.impl = IMPL_UNDEFINED;	CurrentNamesapce = vStringNew ();	FullScope = vStringNew ();	AnonymousID = 0;	do	{		enterScope (token, NULL, -1);	}	while (token->type != TOKEN_EOF); /* keep going even with unmatched braces */	vStringDelete (FullScope);	vStringDelete (CurrentNamesapce);	deleteToken (token);}
开发者ID:blackb1rd,项目名称:ctags,代码行数:21,


示例9: extractZshAutoloadTag

static vString* extractZshAutoloadTag(FILE* input){	vString* const vLine = vStringNew ();	const char* const line = readLine (vLine, input);	vString* mode = NULL;	if (line)		mode = determineZshAutoloadTag (line);	vStringDelete (vLine);	return mode;}
开发者ID:relaxdiego,项目名称:ctags,代码行数:12,


示例10: findOcamlTags

static void findOcamlTags (void){	vString *name = vStringNew ();	lexingState st;	ocaToken tok;	initStack ();	computeModuleName ();	tempIdent = vStringNew ();	lastModule = vStringNew ();	lastClass = vStringNew ();	voidName = vStringNew ();	vStringCopyS (voidName, "_");	st.name = vStringNew ();	st.cp = fileReadLine ();	toDoNext = &globalScope;	tok = lex (&st);	while (tok != Tok_EOF)	{		(*toDoNext) (st.name, tok);		tok = lex (&st);	}	vStringDelete (st.name);	vStringDelete (name);	vStringDelete (voidName);	vStringDelete (tempIdent);	vStringDelete (lastModule);	vStringDelete (lastClass);	clearStack ();}
开发者ID:b4n,项目名称:fishman-ctags,代码行数:32,


示例11: parseEscapedCharacter

static int parseEscapedCharacter (void){	int d = '/0';	int c = fileGetc ();	switch (c)	{		case 'A':  d = '@';   break;		case 'B':  d = '/b';  break;		case 'C':  d = '^';   break;		case 'D':  d = '$';   break;		case 'F':  d = '/f';  break;		case 'H':  d = '//';  break;		case 'L':  d = '~';   break;		case 'N':  d = '/n';  break;#ifdef QDOS		case 'Q':  d = 0x9F;  break;#else		case 'Q':  d = '`';   break;#endif		case 'R':  d = '/r';  break;		case 'S':  d = '#';   break;		case 'T':  d = '/t';  break;		case 'U':  d = '/0';  break;		case 'V':  d = '|';   break;		case '%':  d = '%';   break;		case '/'': d = '/'';  break;		case '"':  d = '"';   break;		case '(':  d = '[';   break;		case ')':  d = ']';   break;		case '<':  d = '{';   break;		case '>':  d = '}';   break;		case '/n': skipToCharacter ('%'); break;		case '/':		{			vString *string = parseInteger ('/0');			const char *value = vStringValue (string);			const unsigned long ascii = atol (value);			vStringDelete (string);			c = fileGetc ();			if (c == '/'  &&  ascii < 256)				d = ascii;			break;		}		default: break;	}	return d;}
开发者ID:Twinside,项目名称:CTagSpotlight,代码行数:52,


示例12: match_colon_label

/* Match a "label:" style label. */static void match_colon_label (char const *p){	char const *end = p + strlen (p) - 1;	while (isspace (*end))		end--;	if (*end == ':')	{		vString *name = vStringNew ();		vStringNCatS (name, p, end - p);		makeSimpleTag (name, BasicKinds, K_LABEL);		vStringDelete (name);	}}
开发者ID:FabianInostroza,项目名称:geany,代码行数:14,


示例13: recurseIntoDirectory

static boolean recurseIntoDirectory (const char *const dirName){    boolean resize = FALSE;    if (isRecursiveLink (dirName))	verbose ("ignoring /"%s/" (recursive link)/n", dirName);    else if (! Option.recurse)	verbose ("ignoring /"%s/" (directory)/n", dirName);    else    {	verbose ("RECURSING into directory /"%s/"/n", dirName);#if defined (HAVE_OPENDIR)	resize = recurseUsingOpendir (dirName);#elif defined (HAVE_FINDFIRST) || defined (HAVE__FINDFIRST)	{	    vString *const pattern = vStringNew ();	    vStringCopyS (pattern, dirName);	    vStringPut (pattern, OUTPUT_PATH_SEPARATOR);	    vStringCatS (pattern, "*.*");	    resize = createTagsForWildcardUsingFindfirst (vStringValue (pattern));	    vStringDelete (pattern);	}#elif defined (AMIGA)	{	    vString *const pattern = vStringNew ();	    if (*dirName != '/0'  &&  strcmp (dirName, ".") != 0)	    {		vStringCopyS (pattern, dirName);		if (dirName [strlen (dirName) - 1] != '/')		    vStringPut (pattern, '/');	    }	    vStringCatS (pattern, "#?");	    resize = createTagsForAmigaWildcard (vStringValue (pattern));	    vStringDelete (pattern);	}#endif    }    return resize;}
开发者ID:att,项目名称:uwin,代码行数:38,


示例14: match_keyword

/* Match a keyword starting at p (case insensitive). */static int match_keyword (const char *p, KeyWord const *kw){	vString *name;	size_t i;	int j;	const char *old_p;	for (i = 0; i < strlen (kw->token); i++)	{		if (tolower (p[i]) != kw->token[i])			return 0;	}	name = vStringNew ();	p += i;	if (kw == &freebasic_keywords[0] ||		kw == &freebasic_keywords[1] ||		kw == &freebasic_keywords[2])		return extract_dim (p, name, kw->kind); /* extract_dim adds the found tag(s) */	old_p = p;	while (isspace (*p))		p++;	/* create tags only if there is some space between the keyword and the identifier */	if (old_p == p)	{		vStringDelete (name);		return 0;	}	for (j = 0; j < 1; j++)	{		p = extract_name (p, name);	}	makeSimpleTag (name, BasicKinds, kw->kind);	vStringDelete (name);	return 1;}
开发者ID:terfect,项目名称:Geany-plus,代码行数:39,


示例15: setInputFileParametersCommon

static void setInputFileParametersCommon (inputFileInfo *finfo, vString *const fileName,					  const langType language, stringList *holder){	if (finfo->name != NULL)		vStringDelete (finfo->name);	finfo->name = fileName;	if (finfo->tagPath != NULL)	{		if (holder)			stringListAdd (holder, finfo->tagPath);		else			vStringDelete (finfo->tagPath);	}	if (! Option.tagRelative || isAbsolutePath (vStringValue (fileName)))		finfo->tagPath = vStringNewCopy (fileName);	else		finfo->tagPath =				vStringNewOwn (relativeFilename (vStringValue (fileName), TagFile.directory));	finfo->isHeader = isIncludeFile (vStringValue (fileName));	finfo->language = language;}
开发者ID:acarlson1029,项目名称:ctags,代码行数:23,


示例16: findSmlTags

static void findSmlTags (void){    vString *const identifier = vStringNew ();    const unsigned char *line;    smlKind lastTag = K_NONE;    while ((line = fileReadLine ()) != NULL)    {        const unsigned char *cp = skipSpace (line);        do        {            smlKind foundTag;            if (CommentLevel != 0)            {                cp = (const unsigned char *) strstr ((const char *) cp, "*)");                if (cp == NULL)                    continue;                else                {                    --CommentLevel;                    cp += 2;                }            }            foundTag = findNextIdentifier (&cp);            if (foundTag != K_NONE)            {                cp = skipSpace (cp);                cp = parseIdentifier (cp, identifier);                if (foundTag == K_AND)                {                    if (lastTag != K_NONE)                        makeSmlTag (lastTag, identifier);                }                else                {                    makeSmlTag (foundTag, identifier);                    lastTag = foundTag;                }            }            if (strstr ((const char *) cp, "(*") != NULL)            {                cp += 2;                cp = (const unsigned char *) strstr ((const char *) cp, "*)");                if (cp == NULL)                    ++CommentLevel;            }        } while (cp != NULL  &&  strcmp ((const char *) cp, "") != 0);    }    vStringDelete (identifier);}
开发者ID:shigio,项目名称:ctags,代码行数:50,


示例17: findVhdlTags

static void findVhdlTags (void){    volatile boolean newStatement = TRUE;    volatile int c = '/0';    exception_t exception = (exception_t) setjmp (Exception);	Name = vStringNew ();    Lastname = vStringNew ();    Keyword = vStringNew ();    TagName = vStringNew ();    if (exception == ExceptionNone) while (c != EOF)    {		c = vGetc ();		switch (c)		{			case ';':			case '/n':			newStatement = TRUE;			break;			case ' ':			case '/t':			break;			default:			if (newStatement && readIdentifier (Name, c)) {				findTag (Name);				}			newStatement = FALSE;			break;		}    }    vStringDelete (Name);    vStringDelete (Lastname);    vStringDelete (Keyword);    vStringDelete (TagName);}
开发者ID:Fordi,项目名称:geany,代码行数:37,


示例18: setInputFileParametersCommon

static void setInputFileParametersCommon (inputFileInfo *finfo, vString *const fileName,					  const langType language,					  void (* setLang) (inputLangInfo *, langType),					  stringList *holder){	if (finfo->name != NULL)		vStringDelete (finfo->name);	finfo->name = fileName;	if (finfo->tagPath != NULL)	{		if (holder)			stringListAdd (holder, finfo->tagPath);		else			vStringDelete (finfo->tagPath);	}	if (0)		;	else if (  Option.tagRelative == TREL_ALWAYS )		finfo->tagPath =			vStringNewOwn (relativeFilename (vStringValue (fileName),							 getTagFileDirectory ()));	else if ( Option.tagRelative == TREL_NEVER )		finfo->tagPath =			vStringNewOwn (absoluteFilename (vStringValue (fileName)));	else if ( Option.tagRelative == TREL_NO || isAbsolutePath (vStringValue (fileName)) )		finfo->tagPath = vStringNewCopy (fileName);	else		finfo->tagPath =			vStringNewOwn (relativeFilename (vStringValue (fileName),							 getTagFileDirectory ()));	finfo->isHeader = isIncludeFile (vStringValue (fileName));	setLang (& (finfo->langInfo), language);}
开发者ID:qzhuyan,项目名称:ctags,代码行数:37,


示例19: makeTexTag

static void makeTexTag (tokenInfo *const token, texKind kind){	if (TexKinds [kind].enabled)	{		const char *const name = vStringValue (token->string);		vString *parentKind = vStringNew();		vString *parentName = vStringNew();		tagEntryInfo e;		initTagEntry (&e, name, &(TexKinds [kind]));		e.lineNumber   = token->lineNumber;		e.filePosition = token->filePosition;		getScopeInfo(kind, parentKind, parentName);		if (vStringLength(parentKind) > 0) {			e.extensionFields.scopeKind = kindFromName (vStringValue(parentKind));			e.extensionFields.scopeName = vStringValue(parentName);		}		makeTagEntry (&e);		vStringDelete (parentKind);		vStringDelete (parentName);	}}
开发者ID:shunlir,项目名称:ctags,代码行数:24,


示例20: found_tag_cb

static void found_tag_cb (const char *line,			  const regexMatch *matches,			  unsigned int count,			  void *userData){	if (count > 0)	{		vString *name = vStringNew ();		vStringNCopyS (name, line + matches[1].start, matches[1].length);		makeSimpleTag (name, RpmSpecKinds, K_TAG);		if (count > 1)		{			if (strcasecmp (vStringValue (name), "name") == 0)			{				vString *package = vStringNew ();				vStringNCopyS (package, line + matches[2].start, matches[2].length);				*((int *)userData) = makeSimpleTag (package, RpmSpecKinds, K_PACKAGE);				vStringDelete (package);			}		}		vStringDelete (name);	}}
开发者ID:dkearns,项目名称:ctags,代码行数:24,


示例21: findShTags

static void findShTags (void){	vString *name = vStringNew ();	const unsigned char *line;	while ((line = fileReadLine ()) != NULL)	{		const unsigned char* cp = line;		boolean functionFound = FALSE;		if (line [0] == '#')			continue;		while (isspace (*cp))			cp++;		if (strncmp ((const char*) cp, "function", (size_t) 8) == 0  &&			isspace ((int) cp [8]))		{			functionFound = TRUE;			cp += 8;			if (! isspace ((int) *cp))				continue;			while (isspace ((int) *cp))				++cp;		}		if (! (isalnum ((int) *cp) || *cp == '_'))			continue;		while (isalnum ((int) *cp)  ||  *cp == '_')		{			vStringPut (name, (int) *cp);			++cp;		}		vStringTerminate (name);		while (isspace ((int) *cp))			++cp;		if (*cp++ == '(')		{			while (isspace ((int) *cp))				++cp;			if (*cp == ')'  && ! hackReject (name))				functionFound = TRUE;		}		if (functionFound)			makeSimpleTag (name, ShKinds, K_FUNCTION);		vStringClear (name);	}	vStringDelete (name);}
开发者ID:ALPHAMARIOX,项目名称:pn,代码行数:48,


示例22: matchTagPattern

static void matchTagPattern (const vString* const line,		const regexPattern* const patbuf,		const regmatch_t* const pmatch){	vString *const name = substitute (vStringValue (line),			patbuf->u.tag.name_pattern, BACK_REFERENCE_COUNT, pmatch);	vStringStripLeading (name);	vStringStripTrailing (name);	if (vStringLength (name) > 0)		makeRegexTag (name, &patbuf->u.tag.kind);	else		error (WARNING, "%s:%ld: null expansion of name pattern /"%s/"",			getInputFileName (), getInputLineNumber (),			patbuf->u.tag.name_pattern);	vStringDelete (name);}
开发者ID:0xeuclid,项目名称:vim_for_UEFI,代码行数:16,


示例23: findHtmlTags

static void findHtmlTags (void){	tokenInfo token;	token.string = vStringNew ();	do	{		readToken (&token, true);		if (token.type == TOKEN_TAG_START)			readTag (&token, NULL, 0);	}	while (token.type != TOKEN_EOF);	vStringDelete (token.string);}
开发者ID:qzhuyan,项目名称:ctags,代码行数:16,


示例24: findNextIdentifier

static smlKind findNextIdentifier (const unsigned char **cp){	smlKind result = K_NONE;	vString *const identifier = vStringNew ();	unsigned int count = sizeof (SmlKeywordTypes) / sizeof (SmlKeywordTypes [0]);	unsigned int i;	*cp = parseIdentifier (*cp, identifier);	for (i = 0  ;  i < count  &&  result == K_NONE ;  ++i)	{		const char *id = vStringValue (identifier);		if (strcmp (id, SmlKeywordTypes [i].keyword) == 0)			result = SmlKeywordTypes [i].kind;	}	vStringDelete (identifier);	return result;}
开发者ID:0xeuclid,项目名称:vim_for_UEFI,代码行数:16,


示例25: createTagsForWildcardEntry

static boolean createTagsForWildcardEntry (		const char *const pattern, const size_t dirLength,		const char *const entryName){	boolean resize = FALSE;	/* we must not recurse into the directories "." or ".." */	if (strcmp (entryName, ".") != 0  &&  strcmp (entryName, "..") != 0)	{		vString *const filePath = vStringNew ();		vStringNCopyS (filePath, pattern, dirLength);		vStringCatS (filePath, entryName);		resize = createTagsForEntry (vStringValue (filePath));		vStringDelete (filePath);	}	return resize;}
开发者ID:koron,项目名称:ctags,代码行数:16,


示例26: parseFunction

static void parseFunction (tokenInfo *const token){	tokenInfo *const name = newToken ();	vString *const signature = vStringNew ();	boolean is_class = FALSE;	/*	 * This deals with these formats	 *	   function validFunctionTwo(a,b) {}	 */	readToken (name);	if (!isType (name, TOKEN_IDENTIFIER))		goto cleanUp;	/* Add scope in case this is an INNER function */	addToScope(name, token->scope);	readToken (token);	while (isType (token, TOKEN_PERIOD))	{		readToken (token);		if ( isKeyword(token, KEYWORD_NONE) )		{			addContext (name, token);			readToken (token);		}	}	if ( isType (token, TOKEN_OPEN_PAREN) )		skipArgumentList(token, FALSE, signature);	if ( isType (token, TOKEN_OPEN_CURLY) )	{		is_class = parseBlock (token, name);		if ( is_class )			makeClassTag (name, signature);		else			makeFunctionTag (name, signature);	}	findCmdTerm (token, FALSE, FALSE); cleanUp:	vStringDelete (signature);	deleteToken (name);}
开发者ID:Dev0Null,项目名称:ctags,代码行数:47,


示例27: found_package_cb

static void found_package_cb (const char *line,			      const regexMatch *matches,			      unsigned int count,			      void *userData){	if (count > 0)	{		vString *name = vStringNew ();		tagEntryInfo tag;		vStringNCopyS (name, line + matches[1].start, matches[1].length);		initTagEntry (&tag, vStringValue (name), RpmSpecKinds + K_PACKAGE);		tag.extensionFields.scopeIndex = *(int *)userData;		makeTagEntry (&tag);		vStringDelete (name);	}}
开发者ID:dkearns,项目名称:ctags,代码行数:17,


示例28: cxxTokenForceDestroy

void cxxTokenForceDestroy(CXXToken * t){	if(!t)		return;	if(t->pChain)	{		cxxTokenChainDestroy(t->pChain);		t->pChain = NULL;	}	CXX_DEBUG_ASSERT(t->pszWord,"There should be a word here");	vStringDelete(t->pszWord);	eFree(t);}
开发者ID:Dev0Null,项目名称:ctags,代码行数:17,


示例29: parseFunction

static void parseFunction (const unsigned char *line){	vString *name = vStringNew ();	/* boolean inFunction = FALSE; */	int scope;	const unsigned char *cp = line;	if ((int) *cp == '!')		++cp;	if (isspace ((int) *cp))	{		while (*cp && isspace ((int) *cp))			++cp;		if (*cp)		{			cp = skipPrefix (cp, &scope);			if (isupper ((int) *cp)  ||  					scope == 's'  ||  /* script scope */					scope == '<'  ||  /* script scope */					scope == 'd'  ||  /* dictionary */					scope == 'a')	  /* autoload */			{				do				{					vStringPut (name, (int) *cp);					++cp;				} while (isalnum ((int) *cp) ||  *cp == '_' ||	*cp == '.' ||  *cp == '#');				vStringTerminate (name);				makeSimpleTag (name, VimKinds, K_FUNCTION);				vStringClear (name);			}		}	}	/* TODO - update struct to indicate inside function */	while ((line = readVimLine ()) != NULL)	{		if (wordMatchLen (line, "endfunction", 4))			break;		parseVimLine(line, TRUE);	}	vStringDelete (name);}
开发者ID:Monits,项目名称:ctags,代码行数:45,


示例30: findLispTags

/* Algorithm adapted from from GNU etags. */static void findLispTags (void){	vString *name = vStringNew ();	const unsigned char* p;	while ((p = fileReadLine ()) != NULL)	{		if (*p == '(')		{			if (L_isdef (p))			{				while (*p != '/0' && !isspace ((int) *p))					p++;				while (isspace ((int) *p))					p++;				L_getit (name, p);			}			else			{				/* Check for (foo::defmumble name-defined ... */				do					p++;				while (*p != '/0' && !isspace ((int) *p)						&& *p != ':' && *p != '(' && *p != ')');				if (*p == ':')				{					do						p++;					while (*p == ':');					if (L_isdef (p - 1))					{						while (*p != '/0' && !isspace ((int) *p))							p++;						while (isspace (*p))							p++;						L_getit (name, p);					}				}			}		}	}	vStringDelete (name);}
开发者ID:Twinside,项目名称:CTagSpotlight,代码行数:47,



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


C++ vStringLength函数代码示例
C++ vStringCopy函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。