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
9a1f0622
Commit
9a1f0622
authored
16 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add a quiet cterm option to disable all sound output.
parent
d9e35c0f
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/conio/cterm.c
+26
-15
26 additions, 15 deletions
src/conio/cterm.c
src/conio/cterm.h
+1
-0
1 addition, 0 deletions
src/conio/cterm.h
with
27 additions
and
15 deletions
src/conio/cterm.c
+
26
−
15
View file @
9a1f0622
...
...
@@ -250,6 +250,11 @@ void play_music(void)
struct
note_params
*
np
;
int
fore_count
;
if
(
cterm
.
quiet
)
cterm
.
music
=
0
;
cterm
.
musicbuf
[
0
]
=
0
;
return
;
}
p
=
cterm
.
musicbuf
;
fore_count
=
0
;
if
(
cterm
.
music
==
1
)
{
...
...
@@ -1581,11 +1586,13 @@ char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize,
cterm
.
escbuf
[
wherex
()]
=
1
;
break
;
case
253
:
/* Beep */
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
if
(
!
cterm
.
quiet
)
{
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
}
break
;
case
254
:
/* Delete Char */
j
=
wherex
();
...
...
@@ -1863,11 +1870,13 @@ char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize,
/* Extras */
case
7
:
/* Beep */
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
if
(
!
cterm
.
quiet
)
{
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
}
break
;
/* Translate to screen codes */
...
...
@@ -1948,11 +1957,13 @@ char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize,
prn
[
0
]
=
0
;
if
(
cterm
.
log
==
CTERM_LOG_ASCII
&&
cterm
.
logfile
!=
NULL
)
fputs
(
"
\x07
"
,
cterm
.
logfile
);
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
if
(
!
cterm
.
quiet
)
{
#ifdef __unix__
putch
(
7
);
#else
MessageBeep
(
MB_OK
);
#endif
}
break
;
case
12
:
/* ^L - Clear screen */
ctputs
(
prn
);
...
...
This diff is collapsed.
Click to expand it.
src/conio/cterm.h
+
1
−
0
View file @
9a1f0622
...
...
@@ -67,6 +67,7 @@ struct cterminal {
int
music_enable
;
char
musicbuf
[
1024
];
int
music
;
int
quiet
;
int
tempo
;
int
octave
;
int
notelen
;
...
...
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