mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
util: Migrated optionalBlankLine from text
This commit is contained in:
parent
026a8aa9a1
commit
ec84d0f372
15 changed files with 21 additions and 22 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <Context.h>
|
||||
#include <format.h>
|
||||
#include <shared.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <i18n.h>
|
||||
#include <shared.h>
|
||||
#include <format.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <utf8.h>
|
||||
#include <main.h>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <ViewText.h>
|
||||
#include <Color.h>
|
||||
#include <shared.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
#include <main.h>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <ViewText.h>
|
||||
#include <Command.h>
|
||||
#include <ColString.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <i18n.h>
|
||||
#include <format.h>
|
||||
#include <shared.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <i18n.h>
|
||||
#include <format.h>
|
||||
#include <shared.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <main.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <ViewText.h>
|
||||
#include <main.h>
|
||||
#include <format.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
#include <ISO8601.h>
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <main.h>
|
||||
#include <shared.h>
|
||||
#include <format.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <cmake.h>
|
||||
#include <CmdLogo.h>
|
||||
#include <Context.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <Context.h>
|
||||
#include <ViewText.h>
|
||||
#include <format.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <Filter.h>
|
||||
#include <ViewText.h>
|
||||
#include <format.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
extern Context context;
|
||||
|
|
|
@ -43,13 +43,4 @@
|
|||
|
||||
extern Context context;
|
||||
|
||||
static const char* newline = "\n";
|
||||
static const char* noline = "";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const char* optionalBlankLine ()
|
||||
{
|
||||
return context.verbose ("blank") ? newline : noline;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
#include <vector>
|
||||
|
||||
// text.cpp, Non-UTF-8 aware.
|
||||
const char* optionalBlankLine ();
|
||||
int strippedLength (const std::string&);
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
|
||||
extern Context context;
|
||||
|
||||
static const char* newline = "\n";
|
||||
static const char* noline = "";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static void signal_handler (int s)
|
||||
{
|
||||
|
@ -355,3 +358,9 @@ int strippedLength (const std::string& input)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const char* optionalBlankLine ()
|
||||
{
|
||||
return context.verbose ("blank") ? newline : noline;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -64,6 +64,7 @@ std::string osName ();
|
|||
const std::string obfuscateText (const std::string&);
|
||||
bool nontrivial (const std::string&);
|
||||
int strippedLength (const std::string&);
|
||||
const char* optionalBlankLine ();
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue