[geany/geany] 20ad9a: Make getArglistFromStr() static
Jiří Techet
git-noreply at xxxxx
Sat Sep 10 07:26:27 UTC 2016
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Sun, 07 Aug 2016 16:31:30 UTC
Commit: 20ad9ad4285b93ee80757408fa3a9d8d0d7dd9b9
https://github.com/geany/geany/commit/20ad9ad4285b93ee80757408fa3a9d8d0d7dd9b9
Log Message:
-----------
Make getArglistFromStr() static
Modified Paths:
--------------
ctags/main/lcpp.c
ctags/main/lcpp.h
ctags/parsers/python.c
Modified: ctags/main/lcpp.c
60 lines changed, 30 insertions(+), 30 deletions(-)
===================================================================
@@ -840,35 +840,6 @@ extern int cppGetc (void)
return c;
}
-extern char *getArglistFromFilePos(MIOPos startPosition, const char *tokenName)
-{
- MIOPos originalPosition;
- char *result = NULL;
- char *arglist = NULL;
- long pos1, pos2;
-
- pos2 = mio_tell(File.mio);
-
- mio_getpos(File.mio, &originalPosition);
- mio_setpos(File.mio, &startPosition);
- pos1 = mio_tell(File.mio);
-
- if (pos2 > pos1)
- {
- size_t len = pos2 - pos1;
-
- result = (char *) g_malloc(len + 1);
- if (result != NULL && (len = mio_read(File.mio, result, 1, len)) > 0)
- {
- result[len] = '\0';
- arglist = getArglistFromStr(result, tokenName);
- }
- g_free(result);
- }
- mio_setpos(File.mio, &originalPosition);
- return arglist;
-}
-
typedef enum
{
st_none_t,
@@ -957,7 +928,7 @@ static void stripCodeBuffer(char *buf)
return;
}
-extern char *getArglistFromStr(char *buf, const char *name)
+static char *getArglistFromStr(char *buf, const char *name)
{
char *start, *end;
int level;
@@ -981,4 +952,33 @@ extern char *getArglistFromStr(char *buf, const char *name)
return strdup(start);
}
+extern char *getArglistFromFilePos(MIOPos startPosition, const char *tokenName)
+{
+ MIOPos originalPosition;
+ char *result = NULL;
+ char *arglist = NULL;
+ long pos1, pos2;
+
+ pos2 = mio_tell(File.mio);
+
+ mio_getpos(File.mio, &originalPosition);
+ mio_setpos(File.mio, &startPosition);
+ pos1 = mio_tell(File.mio);
+
+ if (pos2 > pos1)
+ {
+ size_t len = pos2 - pos1;
+
+ result = (char *) g_malloc(len + 1);
+ if (result != NULL && (len = mio_read(File.mio, result, 1, len)) > 0)
+ {
+ result[len] = '\0';
+ arglist = getArglistFromStr(result, tokenName);
+ }
+ g_free(result);
+ }
+ mio_setpos(File.mio, &originalPosition);
+ return arglist;
+}
+
/* vi:set tabstop=4 shiftwidth=4: */
Modified: ctags/main/lcpp.h
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -47,7 +47,6 @@ extern void cppUngetc (const int c);
extern int cppGetc (void);
extern int cppSkipOverCComment (void);
extern char *getArglistFromFilePos(MIOPos startPosition, const char *tokenName);
-extern char *getArglistFromStr(char *buf, const char *name);
#endif /* CTAGS_MAIN_GET_H */
Modified: ctags/parsers/python.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -362,7 +362,7 @@ static void parseImports (const char *cp)
vStringDelete (name_next);
}
-/* modified from get.c getArglistFromStr().
+/* modified from lcpp.c getArglistFromStr().
* warning: terminates rest of string past arglist!
* note: does not ignore brackets inside strings! */
static char *parseArglist(const char *buf)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list