Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Main
Synchronet
Commits
804b7341
Commit
804b7341
authored
21 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Added textcolor(), textbackground(), clreol(), and putch() for better
conio compatability.
parent
f4849ba2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/uifc/ciowrap.c
+20
-0
20 additions, 0 deletions
src/uifc/ciowrap.c
src/uifc/ciowrap.h
+4
-0
4 additions, 0 deletions
src/uifc/ciowrap.h
with
24 additions
and
0 deletions
src/uifc/ciowrap.c
+
20
−
0
View file @
804b7341
...
...
@@ -331,6 +331,26 @@ void textattr(unsigned char attr)
bkgdset
(
colour
);
}
void
textbackground
(
int
colour
)
{
unsigned
char
attr
;
attr
=
lastattr
;
attr
&=
143
;
attr
|=
(
colour
<<
4
);
textattr
(
attr
);
}
void
textcolor
(
int
colour
)
{
unsigned
char
attr
;
attr
=
lastattr
;
attr
&=
240
;
attr
|=
colour
;
textattr
(
attr
);
}
int
kbhit
(
void
)
{
struct
timeval
timeout
;
...
...
This diff is collapsed.
Click to expand it.
src/uifc/ciowrap.h
+
4
−
0
View file @
804b7341
...
...
@@ -48,6 +48,8 @@ struct text_info {
unsigned
char
screenwidth
;
};
#define clreol() clrtoeol()
#define putch(x) echochar(x)
short
curses_color
(
short
color
);
int
puttext
(
int
sx
,
int
sy
,
int
ex
,
int
ey
,
unsigned
char
*
fill
);
#define gettext(x1,y1,x2,y2,z) cio_gettext(x1,y1,x2,y2,z)
...
...
@@ -67,3 +69,5 @@ void clrscr(void);
void
initciowrap
(
long
inmode
);
void
gettextinfo
(
struct
text_info
*
info
);
void
_setcursortype
(
int
type
);
void
textbackground
(
int
colour
);
void
textcolor
(
int
colour
);
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