Ok, here you go. I looked into the mystery that is devc-con, and I found a way to modify the beep.
The unfortunate side is that it only works if you are running devc-con in QNX mode, so you will either have to do that (by passing the -Q option) or suffer with the loud beeps (for now)
Ok, so go change your build file, and make sure your TERM env var is qnx
So we need to emit an escape sequence, which can be done thusly…
# printf “%cs%c%c%c” 0x1b, <c1>, <c2>, <c3>
Where c1 c2 and c3 are the parameters…
Here’s a snippet of the state machine…
case STATE_QNX4_11:Â Â Â Â /* esc_beep_set */ s->beep_ticks = (c <= ' ') ? 6 : c - ' '; s->esc_flag = STATE_QNX4_12; break; case STATE_QNX4_12: s->xpos = c - ' '; s->esc_flag = STATE_QNX4_13; break; case STATE_QNX4_13: n = (s->xpos % 192) + ((c - ' ') % 192) * 192; if(!n) s->beep_counter = 0x0606; else s->beep_counter = (n < 19) ? 0xffff : (unsigned)(1193180L / (long)n); break;
The default values for beep_ticks and beep_counter are 6 and 0x0606, respectively.
I haven’t quite worked out the optimimum, but basically if you screw it up, the beep is gone anyways, so I’m alright with that. You guys can have fun playing.
I’ll try and work a nobeep facility into the next version of devc-con.
Sorry this is brief, I’m running out of time today. I’ll try and elaborate more on exactly WHAT these things mean later (or maybe Thomas will…)