From 0c8beef4f2a42af4e162b078123dd76bf776eb68 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Mon, 4 Nov 2024 03:21:45 +0900 Subject: [PATCH] treewide: delete more unwated files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #4098 Suggested by Jiří Techet (@techee). Signed-off-by: Masatake YAMATO --- parsers/cython.c | 34 ------------ parsers/desktopentry.c | 121 ----------------------------------------- 2 files changed, 155 deletions(-) delete mode 100644 parsers/cython.c delete mode 100644 parsers/desktopentry.c diff --git a/parsers/cython.c b/parsers/cython.c deleted file mode 100644 index 0767483f67..0000000000 --- a/parsers/cython.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2000-2003, Darren Hiebert -* Copyright (c) 2014-2016, Colomban Wendling -* -* This source code is released for free distribution under the terms of the -* GNU General Public License version 2 or (at your option) any later version. -* -* This module contains functions for generating tags for Cython language -* files. -* -* References: -* - https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html -*/ - -#include "general.h" /* must always come first */ - -extern parserDefinition* CythonParser (void) -{ - static const char *const extensions[] = { "pyx", "pxd", "pxi", NULL }; - parserDefinition *def = parserNew ("Cython"); - def->kindTable = CythonKinds; - def->kindCount = ARRAY_SIZE (CythonKinds); - def->extensions = extensions; - def->parser = findCythonTags; - def->initialize = initialize; - def->finalize = finalize; - def->keywordTable = CythonKeywordTable; - def->keywordCount = ARRAY_SIZE (CythonKeywordTable); - def->fieldTable = CythonFields; - def->fieldCount = ARRAY_SIZE (CythonFields); - def->useCork = CORK_QUEUE; - def->requestAutomaticFQTag = true; - return def; -} diff --git a/parsers/desktopentry.c b/parsers/desktopentry.c deleted file mode 100644 index 43800823bf..0000000000 --- a/parsers/desktopentry.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * desktopentry.c - * - * Copyright (c) 2016, Masatake YAMATO - * Copyright (c) 2016, Red Hat, K.K. - * - * This source code is released for free distribution under the terms of the - * GNU General Public License version 2 or (at your option) any later version. - * - * This module contains functions for generating tags for "desktop entries" - * described in: - * - * https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html - * - */ - -/* -* INCLUDE FILES -*/ -#include "general.h" /* must always come first */ - -#include "entry.h" -#include "iniconf.h" -#include "kind.h" -#include "parse.h" -#include "read.h" -#include "routines.h" -#include - -/* -* DATA DEFINITIONS -*/ -typedef enum { - K_NAME, - K_ACTION, -} desktopEntryKind; - -static kindDefinition DesktopEntriyKinds [] = { - { true, 'n', "name", "names" }, - { true, 'a', "action", "actions" }, -}; - -struct sDesktopEntrySubparser { - iniconfSubparser iniconf; -}; - -static void newDataCallback (iniconfSubparser *iniconf, - const char *section, const char *key, const char *value) -{ - tagEntryInfo e; - - if (section && (strncmp (LOGGER_PREFIX, section, LOGGER_LEN) == 0)) - { - if (key == NULL && value == NULL) - { - const char *logger = section + LOGGER_LEN; - if (logger [0] == '\0') - goto out; - - initTagEntry (&e, logger, K_LOGGER_SECTION); - ((struct sDesktopEntrySubparser *)iniconf)->index = makeTagEntry (&e); - } - else if (key && (strcmp (key, "qualname") == 0) - && value && value[0] != '\0') - { - initTagEntry (&e, value, K_LOGGER_QUALNAME); - e.extensionFields.scopeIndex = ((struct sDesktopEntrySubparser*)iniconf)->index; - makeTagEntry (&e); - } - } - -out: - return; -} - -static bool probeLanguage (const char *section, const char *key CTAGS_ATTR_UNUSED, const char *value CTAGS_ATTR_UNUSED) -{ - if (section && (strncmp (LOGGER_PREFIX, section, LOGGER_LEN) == 0)) - return true; - else - return false; -} - - -static void exclusiveSubparserChosenCallback (subparser *s, void *data CTAGS_ATTR_UNUSED) -{ - ((struct sDesktopEntrySubparser *)s)->index = CORK_NIL; -} - -static void findDesktopEntryTags (void) -{ - scheduleRunningBaseparser (0); -} - -extern parserDefinition* DesktopEntryParser (void) -{ - static struct sDesktopEntrySubparser desktopEntrySubparser = { - .iniconf = { - .subparser = { - .direction = SUBPARSER_BI_DIRECTION, - .exclusiveSubparserChosenNotify = exclusiveSubparserChosenCallback, - }, - .probeLanguage = probeLanguage, - .newDataNotify = newDataCallback, - }, - }; - static parserDependency dependencies [] = { - [0] = { DEPTYPE_SUBPARSER, "Iniconf", &desktopEntrySubparser }, - }; - - parserDefinition* const def = parserNew ("DesktopEntry"); - def->dependencies = dependencies; - def->dependencyCount = ARRAY_SIZE (dependencies); - - def->kindTable = DesktopEntryKinds; - def->kindCount = ARRAY_SIZE (DesktopEntryKinds); - def->parser = findDesktopEntryTags; - def->useCork = CORK_QUEUE; - - return def; -}