[geany/geany] 580beb: Remove all unused code from main.c
Jiří Techet
git-noreply at xxxxx
Mon Dec 17 21:05:36 UTC 2018
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Sat, 08 Oct 2016 12:13:41 UTC
Commit: 580beba0c7fe8361afa52976901bb67d8d45b084
https://github.com/geany/geany/commit/580beba0c7fe8361afa52976901bb67d8d45b084
Log Message:
-----------
Remove all unused code from main.c
Modified Paths:
--------------
ctags/main/main.c
Modified: ctags/main/main.c
122 lines changed, 0 insertions(+), 122 deletions(-)
===================================================================
@@ -22,70 +22,15 @@
*/
#include "general.h" /* must always come first */
-/* To provide timings features if available.
- */
-#ifdef HAVE_CLOCK
-# ifdef HAVE_TIME_H
-# include <time.h>
-# endif
-#else
-# ifdef HAVE_TIMES
-# ifdef HAVE_SYS_TIMES_H
-# include <sys/times.h>
-# endif
-# endif
-#endif
-
-/* To provide directory searching for recursion feature.
- */
-
-#ifdef HAVE_DIRENT_H
-# ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* required by dirent.h */
-# endif
-# include <dirent.h> /* to declare opendir() */
-#endif
-#ifdef HAVE_DIRECT_H
-# include <direct.h> /* to _getcwd() */
-#endif
-#ifdef HAVE_DIR_H
-# include <dir.h> /* to declare findfirst() and findnext */
-#endif
-#ifdef HAVE_IO_H
-# include <io.h> /* to declare _findfirst() */
-#endif
-
#include <string.h>
-#include "debug.h"
-#include "entry.h"
-#include "keyword.h"
-#include "main.h"
#include "options.h"
-#include "read.h"
-#include "routines.h"
-/*
-* MACROS
-*/
-#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s")
-
-/*
-* DATA DEFINITIONS
-*/
-static struct { long files, lines, bytes; } Totals = { 0, 0, 0 };
-
-/*
-* FUNCTION DEFINITIONS
-*/
extern void addTotals (
const unsigned int files, const long unsigned int lines,
const long unsigned int bytes)
{
- Totals.files += files;
- Totals.lines += lines;
- Totals.bytes += bytes;
}
extern bool isDestinationStdout (void)
@@ -99,70 +44,3 @@ extern bool isDestinationStdout (void)
toStdout = true;
return toStdout;
}
-
-#if 0 /* Unused in Geany */
-
-#if defined (HAVE_CLOCK)
-# define CLOCK_AVAILABLE
-# ifndef CLOCKS_PER_SEC
-# define CLOCKS_PER_SEC 1000000
-# endif
-#elif defined (HAVE_TIMES)
-# define CLOCK_AVAILABLE
-# define CLOCKS_PER_SEC 60
-static clock_t clock (void)
-{
- struct tms buf;
-
- times (&buf);
- return (buf.tms_utime + buf.tms_stime);
-}
-#else
-# define clock() (clock_t)0
-#endif
-
-static void printTotals (const clock_t *const timeStamps)
-{
- const unsigned long totalTags = TagFile.numTags.added +
- TagFile.numTags.prev;
-
- fprintf (errout, "%ld file%s, %ld line%s (%ld kB) scanned",
- Totals.files, plural (Totals.files),
- Totals.lines, plural (Totals.lines),
- Totals.bytes/1024L);
-#ifdef CLOCK_AVAILABLE
- {
- const double interval = ((double) (timeStamps [1] - timeStamps [0])) /
- CLOCKS_PER_SEC;
-
- fprintf (errout, " in %.01f seconds", interval);
- if (interval != (double) 0.0)
- fprintf (errout, " (%lu kB/s)",
- (unsigned long) (Totals.bytes / interval) / 1024L);
- }
-#endif
- fputc ('\n', errout);
-
- fprintf (errout, "%lu tag%s added to tag file",
- TagFile.numTags.added, plural (TagFile.numTags.added));
- if (Option.append)
- fprintf (errout, " (now %lu tags)", totalTags);
- fputc ('\n', errout);
-
- if (totalTags > 0 && Option.sorted)
- {
- fprintf (errout, "%lu tag%s sorted", totalTags, plural (totalTags));
-#ifdef CLOCK_AVAILABLE
- fprintf (errout, " in %.02f seconds",
- ((double) (timeStamps [2] - timeStamps [1])) / CLOCKS_PER_SEC);
-#endif
- fputc ('\n', errout);
- }
-
-#ifdef DEBUG
- fprintf (errout, "longest tag line = %lu\n",
- (unsigned long) TagFile.max.line);
-#endif
-}
-
-#endif /* Unused in Geany */
--------------
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