Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Willers
KWSys
Commits
2586bc8d
Commit
2586bc8d
authored
18 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Fixed uninitialized variable when not building with windows console support.
parent
1eec41db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Terminal.c
+7
-8
7 additions, 8 deletions
Terminal.c
with
7 additions
and
8 deletions
Terminal.c
+
7
−
8
View file @
2586bc8d
...
@@ -62,24 +62,23 @@ static void kwsysTerminalSetConsoleColor(HANDLE hOut,
...
@@ -62,24 +62,23 @@ static void kwsysTerminalSetConsoleColor(HANDLE hOut,
void
kwsysTerminal_cfprintf
(
int
color
,
FILE
*
stream
,
const
char
*
format
,
...)
void
kwsysTerminal_cfprintf
(
int
color
,
FILE
*
stream
,
const
char
*
format
,
...)
{
{
/* Setup the stream with the given color if possible. */
/* Setup the stream with the given color if possible. */
int
pipeIsConsole
;
int
pipeIsConsole
=
0
;
int
pipeIsVT100
;
int
pipeIsVT100
=
0
;
int
default_vt100
=
color
&
kwsysTerminal_Color_AssumeTTY
;
int
default_vt100
=
color
&
kwsysTerminal_Color_AssumeTTY
;
int
default_tty
=
color
&
kwsysTerminal_Color_AssumeTTY
;
int
default_tty
=
color
&
kwsysTerminal_Color_AssumeTTY
;
#if defined(KWSYS_TERMINAL_SUPPORT_CONSOLE)
#if defined(KWSYS_TERMINAL_SUPPORT_CONSOLE)
CONSOLE_SCREEN_BUFFER_INFO
hOutInfo
;
CONSOLE_SCREEN_BUFFER_INFO
hOutInfo
;
HANDLE
hOut
=
kwsysTerminalGetStreamHandle
(
stream
);
HANDLE
hOut
=
kwsysTerminalGetStreamHandle
(
stream
);
pipeIsConsole
=
GetConsoleScreenBufferInfo
(
hOut
,
&
hOutInfo
);
if
(
GetConsoleScreenBufferInfo
(
hOut
,
&
hOutInfo
))
if
(
pipeIsConsole
)
{
{
pipeIsConsole
=
1
;
kwsysTerminalSetConsoleColor
(
hOut
,
&
hOutInfo
,
stream
,
color
);
kwsysTerminalSetConsoleColor
(
hOut
,
&
hOutInfo
,
stream
,
color
);
}
}
#endif
#endif
pipeIsVT100
=
(
!
pipeIsConsole
&&
if
(
!
pipeIsConsole
&&
kwsysTerminalStreamIsVT100
(
stream
,
kwsysTerminalStreamIsVT100
(
stream
,
default_vt100
,
default_tty
))
default_vt100
,
default_tty
));
if
(
pipeIsVT100
)
{
{
pipeIsVT100
=
1
;
kwsysTerminalSetVT100Color
(
stream
,
color
);
kwsysTerminalSetVT100Color
(
stream
,
color
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment