mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Context
- Eliminated fileno() by using unistd.h STDOUT_FILENO. This is because fileno() is not visible with '--std=c++11'.
This commit is contained in:
parent
231e8ca913
commit
99ebf82c3a
1 changed files with 2 additions and 3 deletions
|
@ -30,7 +30,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -505,7 +504,7 @@ bool Context::color ()
|
||||||
use_color = config.getBoolean ("color");
|
use_color = config.getBoolean ("color");
|
||||||
|
|
||||||
// Only tty's support color.
|
// Only tty's support color.
|
||||||
if (! isatty (fileno (stdout)))
|
if (! isatty (STDOUT_FILENO))
|
||||||
{
|
{
|
||||||
// No ioctl.
|
// No ioctl.
|
||||||
config.set ("detection", "off");
|
config.set ("detection", "off");
|
||||||
|
@ -771,7 +770,7 @@ void Context::clear ()
|
||||||
// this output?'.
|
// this output?'.
|
||||||
void Context::updateXtermTitle ()
|
void Context::updateXtermTitle ()
|
||||||
{
|
{
|
||||||
if (config.getBoolean ("xterm.title") && isatty (fileno (stdout)))
|
if (config.getBoolean ("xterm.title") && isatty (STDOUT_FILENO))
|
||||||
{
|
{
|
||||||
std::string command = cli.getCommand ();
|
std::string command = cli.getCommand ();
|
||||||
std::string title;
|
std::string title;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue