aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/eicon
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
commit48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch)
treeda3aa535c98cc0957851354ceb0fbff7482d7a9d /drivers/isdn/hardware/eicon
parent1a1689344add3333d28d1b5495d8043a3877d01c (diff)
parent4409d28140d9a6e6e3f4f1fdaf7234c4b965d954 (diff)
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'drivers/isdn/hardware/eicon')
-rw-r--r--drivers/isdn/hardware/eicon/capifunc.c4
-rw-r--r--drivers/isdn/hardware/eicon/debug.c30
-rw-r--r--drivers/isdn/hardware/eicon/di.c16
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c2
-rw-r--r--drivers/isdn/hardware/eicon/message.c383
-rw-r--r--drivers/isdn/hardware/eicon/os_pri.c4
-rw-r--r--drivers/isdn/hardware/eicon/platform.h12
10 files changed, 222 insertions, 235 deletions
diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
index 0afd7633556..ff284aeb8fb 100644
--- a/drivers/isdn/hardware/eicon/capifunc.c
+++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -187,7 +187,7 @@ static diva_card *find_card_by_ctrl(word controller)
187 */ 187 */
188void *TransmitBufferSet(APPL * appl, dword ref) 188void *TransmitBufferSet(APPL * appl, dword ref)
189{ 189{
190 appl->xbuffer_used[ref] = TRUE; 190 appl->xbuffer_used[ref] = true;
191 DBG_PRV1(("%d:xbuf_used(%d)", appl->Id, ref + 1)) 191 DBG_PRV1(("%d:xbuf_used(%d)", appl->Id, ref + 1))
192 return (void *) ref; 192 return (void *) ref;
193} 193}
@@ -202,7 +202,7 @@ void *TransmitBufferGet(APPL * appl, void *p)
202 202
203void TransmitBufferFree(APPL * appl, void *p) 203void TransmitBufferFree(APPL * appl, void *p)
204{ 204{
205 appl->xbuffer_used[(dword) p] = FALSE; 205 appl->xbuffer_used[(dword) p] = false;
206 DBG_PRV1(("%d:xbuf_free(%d)", appl->Id, ((dword) p) + 1)) 206 DBG_PRV1(("%d:xbuf_free(%d)", appl->Id, ((dword) p) + 1))
207} 207}
208 208
diff --git a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c
index d835e74ecf1..0db9cc661e2 100644
--- a/drivers/isdn/hardware/eicon/debug.c
+++ b/drivers/isdn/hardware/eicon/debug.c
@@ -287,7 +287,7 @@ void* diva_maint_finit (void) {
287 } 287 }
288 external_dbg_queue = 0; 288 external_dbg_queue = 0;
289 289
290 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 290 for (i = 1; i < ARRAY_SIZE(clients); i++) {
291 if (clients[i].pmem) { 291 if (clients[i].pmem) {
292 diva_os_free (0, clients[i].pmem); 292 diva_os_free (0, clients[i].pmem);
293 } 293 }
@@ -391,7 +391,7 @@ static void DI_register (void *arg) {
391 391
392 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register"); 392 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register");
393 393
394 for (id = 1; id < (sizeof(clients)/sizeof(clients[0])); id++) { 394 for (id = 1; id < ARRAY_SIZE(clients); id++) {
395 if (clients[id].hDbg == hDbg) { 395 if (clients[id].hDbg == hDbg) {
396 /* 396 /*
397 driver already registered 397 driver already registered
@@ -494,7 +494,7 @@ static void DI_deregister (pDbgHandle hDbg) {
494 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read"); 494 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read");
495 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read"); 495 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read");
496 496
497 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 497 for (i = 1; i < ARRAY_SIZE(clients); i++) {
498 if (clients[i].hDbg == hDbg) { 498 if (clients[i].hDbg == hDbg) {
499 diva_dbg_entry_head_t* pmsg; 499 diva_dbg_entry_head_t* pmsg;
500 char tmp[256]; 500 char tmp[256];
@@ -736,7 +736,7 @@ int diva_get_driver_info (dword id, byte* data, int data_length) {
736 int to_copy; 736 int to_copy;
737 737
738 if (!data || !id || (data_length < 17) || 738 if (!data || !id || (data_length < 17) ||
739 (id >= (sizeof(clients)/sizeof(clients[0])))) { 739 (id >= ARRAY_SIZE(clients))) {
740 return (-1); 740 return (-1);
741 } 741 }
742 742
@@ -786,7 +786,7 @@ int diva_get_driver_dbg_mask (dword id, byte* data) {
786 diva_os_spin_lock_magic_t old_irql; 786 diva_os_spin_lock_magic_t old_irql;
787 int ret = -1; 787 int ret = -1;
788 788
789 if (!data || !id || (id >= (sizeof(clients)/sizeof(clients[0])))) { 789 if (!data || !id || (id >= ARRAY_SIZE(clients))) {
790 return (-1); 790 return (-1);
791 } 791 }
792 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "driver info"); 792 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "driver info");
@@ -809,7 +809,7 @@ int diva_set_driver_dbg_mask (dword id, dword mask) {
809 int ret = -1; 809 int ret = -1;
810 810
811 811
812 if (!id || (id >= (sizeof(clients)/sizeof(clients[0])))) { 812 if (!id || (id >= ARRAY_SIZE(clients))) {
813 return (-1); 813 return (-1);
814 } 814 }
815 815
@@ -887,7 +887,7 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
887 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); 887 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "register");
888 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register"); 888 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register");
889 889
890 for (id = 1; id < (sizeof(clients)/sizeof(clients[0])); id++) { 890 for (id = 1; id < ARRAY_SIZE(clients); id++) {
891 if (clients[id].hDbg && (clients[id].request == d->request)) { 891 if (clients[id].hDbg && (clients[id].request == d->request)) {
892 diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); 892 diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register");
893 diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); 893 diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register");
@@ -1037,7 +1037,7 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) {
1037 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read"); 1037 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read");
1038 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read"); 1038 diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read");
1039 1039
1040 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 1040 for (i = 1; i < ARRAY_SIZE(clients); i++) {
1041 if (clients[i].hDbg && (clients[i].request == d->request)) { 1041 if (clients[i].hDbg && (clients[i].request == d->request)) {
1042 diva_dbg_entry_head_t* pmsg; 1042 diva_dbg_entry_head_t* pmsg;
1043 char tmp[256]; 1043 char tmp[256];
@@ -1115,7 +1115,7 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) {
1115void* SuperTraceOpenAdapter (int AdapterNumber) { 1115void* SuperTraceOpenAdapter (int AdapterNumber) {
1116 int i; 1116 int i;
1117 1117
1118 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 1118 for (i = 1; i < ARRAY_SIZE(clients); i++) {
1119 if (clients[i].hDbg && clients[i].request && (clients[i].logical == AdapterNumber)) { 1119 if (clients[i].hDbg && clients[i].request && (clients[i].logical == AdapterNumber)) {
1120 return (&clients[i]); 1120 return (&clients[i]);
1121 } 1121 }
@@ -1508,7 +1508,7 @@ static void diva_maint_state_change_notify (void* user_context,
1508 int ch = TraceFilterChannel; 1508 int ch = TraceFilterChannel;
1509 int id = TraceFilterIdent; 1509 int id = TraceFilterIdent;
1510 1510
1511 if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && 1511 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) &&
1512 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { 1512 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) {
1513 if (ch != (int)modem->ChannelNumber) { 1513 if (ch != (int)modem->ChannelNumber) {
1514 break; 1514 break;
@@ -1555,7 +1555,7 @@ static void diva_maint_state_change_notify (void* user_context,
1555 int ch = TraceFilterChannel; 1555 int ch = TraceFilterChannel;
1556 int id = TraceFilterIdent; 1556 int id = TraceFilterIdent;
1557 1557
1558 if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && 1558 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) &&
1559 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { 1559 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) {
1560 if (ch != (int)fax->ChannelNumber) { 1560 if (ch != (int)fax->ChannelNumber) {
1561 break; 1561 break;
@@ -1803,7 +1803,7 @@ static void diva_maint_trace_notify (void* user_context,
1803 /* 1803 /*
1804 Selective trace 1804 Selective trace
1805 */ 1805 */
1806 if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && 1806 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) &&
1807 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { 1807 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) {
1808 const char* p = NULL; 1808 const char* p = NULL;
1809 int ch_value = -1; 1809 int ch_value = -1;
@@ -1925,7 +1925,7 @@ int diva_mnt_shutdown_xdi_adapters (void) {
1925 byte * pmem; 1925 byte * pmem;
1926 1926
1927 1927
1928 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 1928 for (i = 1; i < ARRAY_SIZE(clients); i++) {
1929 pmem = NULL; 1929 pmem = NULL;
1930 1930
1931 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "unload"); 1931 diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "unload");
@@ -2006,7 +2006,7 @@ int diva_set_trace_filter (int filter_length, const char* filter) {
2006 2006
2007 on = (TraceFilter[0] == 0); 2007 on = (TraceFilter[0] == 0);
2008 2008
2009 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 2009 for (i = 1; i < ARRAY_SIZE(clients); i++) {
2010 if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request) { 2010 if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request) {
2011 client_b_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0); 2011 client_b_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0);
2012 client_atap_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0); 2012 client_atap_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0);
@@ -2017,7 +2017,7 @@ int diva_set_trace_filter (int filter_length, const char* filter) {
2017 } 2017 }
2018 } 2018 }
2019 2019
2020 for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 2020 for (i = 1; i < ARRAY_SIZE(clients); i++) {
2021 if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request && clients[i].request_pending) { 2021 if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request && clients[i].request_pending) {
2022 diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "write_filter"); 2022 diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "write_filter");
2023 clients[i].request_pending = 0; 2023 clients[i].request_pending = 0;
diff --git a/drivers/isdn/hardware/eicon/di.c b/drivers/isdn/hardware/eicon/di.c
index e1df8d98c31..ce8df387890 100644
--- a/drivers/isdn/hardware/eicon/di.c
+++ b/drivers/isdn/hardware/eicon/di.c
@@ -173,16 +173,16 @@ void pr_out(ADAPTER * a)
173 xdi_xlog_request (XDI_A_NR(a), this->Id, this->ReqCh, this->MInd, 173 xdi_xlog_request (XDI_A_NR(a), this->Id, this->ReqCh, this->MInd,
174 a->IdTypeTable[this->No]); 174 a->IdTypeTable[this->No]);
175 a->ram_out(a, &ReqOut->Req, this->MInd); 175 a->ram_out(a, &ReqOut->Req, this->MInd);
176 more = TRUE; 176 more = true;
177 } 177 }
178 else { 178 else {
179 xdi_xlog_request (XDI_A_NR(a), this->Id, this->ReqCh, this->Req, 179 xdi_xlog_request (XDI_A_NR(a), this->Id, this->ReqCh, this->Req,
180 a->IdTypeTable[this->No]); 180 a->IdTypeTable[this->No]);
181 this->More |=XMOREF; 181 this->More |=XMOREF;
182 a->ram_out(a, &ReqOut->Req, this->Req); 182 a->ram_out(a, &ReqOut->Req, this->Req);
183 more = FALSE; 183 more = false;
184 if (a->FlowControlIdTable[this->ReqCh] == this->Id) 184 if (a->FlowControlIdTable[this->ReqCh] == this->Id)
185 a->FlowControlSkipTable[this->ReqCh] = TRUE; 185 a->FlowControlSkipTable[this->ReqCh] = true;
186 /* 186 /*
187 Note that remove request was sent to the card 187 Note that remove request was sent to the card
188 */ 188 */
@@ -311,7 +311,7 @@ byte pr_dpc(ADAPTER * a)
311 /* are marked RNR */ 311 /* are marked RNR */
312 if(RNRId && RNRId==a->ram_in(a, &IndIn->IndId)) { 312 if(RNRId && RNRId==a->ram_in(a, &IndIn->IndId)) {
313 a->ram_out(a, &IndIn->Ind, 0); 313 a->ram_out(a, &IndIn->Ind, 0);
314 a->ram_out(a, &IndIn->RNR, TRUE); 314 a->ram_out(a, &IndIn->RNR, true);
315 } 315 }
316 else { 316 else {
317 Ind = a->ram_in(a, &IndIn->Ind); 317 Ind = a->ram_in(a, &IndIn->Ind);
@@ -331,7 +331,7 @@ byte pr_dpc(ADAPTER * a)
331 dtrc(dprintf("RNR")); 331 dtrc(dprintf("RNR"));
332 a->ram_out(a, &IndIn->Ind, 0); 332 a->ram_out(a, &IndIn->Ind, 0);
333 RNRId = a->ram_in(a, &IndIn->IndId); 333 RNRId = a->ram_in(a, &IndIn->IndId);
334 a->ram_out(a, &IndIn->RNR, TRUE); 334 a->ram_out(a, &IndIn->RNR, true);
335 } 335 }
336 } 336 }
337 } 337 }
@@ -340,7 +340,7 @@ byte pr_dpc(ADAPTER * a)
340 } 340 }
341 a->ram_out(a, &PR_RAM->IndOutput, 0); 341 a->ram_out(a, &PR_RAM->IndOutput, 0);
342 } 342 }
343 return FALSE; 343 return false;
344} 344}
345byte scom_test_int(ADAPTER * a) 345byte scom_test_int(ADAPTER * a)
346{ 346{
@@ -399,7 +399,7 @@ byte isdn_rc(ADAPTER * a,
399 return (0); 399 return (0);
400 } 400 }
401 if (extended_info_type == DIVA_RC_TYPE_REMOVE_COMPLETE) 401 if (extended_info_type == DIVA_RC_TYPE_REMOVE_COMPLETE)
402 a->RcExtensionSupported = TRUE; 402 a->RcExtensionSupported = true;
403 } 403 }
404 a->misc_flags_table[e_no] &= ~DIVA_MISC_FLAGS_REMOVE_PENDING; 404 a->misc_flags_table[e_no] &= ~DIVA_MISC_FLAGS_REMOVE_PENDING;
405 a->misc_flags_table[e_no] &= ~DIVA_MISC_FLAGS_NO_RC_CANCELLING; 405 a->misc_flags_table[e_no] &= ~DIVA_MISC_FLAGS_NO_RC_CANCELLING;
@@ -428,7 +428,7 @@ byte isdn_rc(ADAPTER * a,
428 } 428 }
429 if (Rc==OK_FC) { 429 if (Rc==OK_FC) {
430 a->FlowControlIdTable[Ch] = Id; 430 a->FlowControlIdTable[Ch] = Id;
431 a->FlowControlSkipTable[Ch] = FALSE; 431 a->FlowControlSkipTable[Ch] = false;
432 this->Rc = Rc; 432 this->Rc = Rc;
433 this->More &= ~(XBUSY | XMOREC); 433 this->More &= ~(XBUSY | XMOREC);
434 this->complete=0xff; 434 this->complete=0xff;
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 77155d9f399..6b2940ed077 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -164,7 +164,7 @@ static ssize_t divas_maint_read(struct file *file, char __user *buf,
164 return (maint_read_write(buf, (int) count)); 164 return (maint_read_write(buf, (int) count));
165} 165}
166 166
167static struct file_operations divas_maint_fops = { 167static const struct file_operations divas_maint_fops = {
168 .owner = THIS_MODULE, 168 .owner = THIS_MODULE,
169 .llseek = no_llseek, 169 .llseek = no_llseek,
170 .read = divas_maint_read, 170 .read = divas_maint_read,
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index fff0d89c806..556b19615bc 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -131,7 +131,7 @@ static void remove_um_idi_proc(void)
131 } 131 }
132} 132}
133 133
134static struct file_operations divas_idi_fops = { 134static const struct file_operations divas_idi_fops = {
135 .owner = THIS_MODULE, 135 .owner = THIS_MODULE,
136 .llseek = no_llseek, 136 .llseek = no_llseek,
137 .read = um_idi_read, 137 .read = um_idi_read,
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 91fc92c01af..b365e44072c 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -663,7 +663,7 @@ static unsigned int divas_poll(struct file *file, poll_table * wait)
663 return (POLLIN | POLLRDNORM); 663 return (POLLIN | POLLRDNORM);
664} 664}
665 665
666static struct file_operations divas_fops = { 666static const struct file_operations divas_fops = {
667 .owner = THIS_MODULE, 667 .owner = THIS_MODULE,
668 .llseek = no_llseek, 668 .llseek = no_llseek,
669 .read = divas_read, 669 .read = divas_read,
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index 6a4373a4f1e..0632a260699 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -113,7 +113,7 @@ static int divas_close(struct inode *inode, struct file *file)
113 return (0); 113 return (0);
114} 114}
115 115
116static struct file_operations divas_fops = { 116static const struct file_operations divas_fops = {
117 .owner = THIS_MODULE, 117 .owner = THIS_MODULE,
118 .llseek = no_llseek, 118 .llseek = no_llseek,
119 .read = divas_read, 119 .read = divas_read,
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index f9b00f19afd..784232a144c 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -253,7 +253,7 @@ extern APPL * application;
253 253
254 254
255 255
256static byte remove_started = FALSE; 256static byte remove_started = false;
257static PLCI dummy_plci; 257static PLCI dummy_plci;
258 258
259 259
@@ -456,12 +456,12 @@ word api_put(APPL * appl, CAPI_MSG * msg)
456 456
457 return _QUEUE_FULL; 457 return _QUEUE_FULL;
458 } 458 }
459 c = FALSE; 459 c = false;
460 if ((((byte *) msg) < ((byte *)(plci->msg_in_queue))) 460 if ((((byte *) msg) < ((byte *)(plci->msg_in_queue)))
461 || (((byte *) msg) >= ((byte *)(plci->msg_in_queue)) + sizeof(plci->msg_in_queue))) 461 || (((byte *) msg) >= ((byte *)(plci->msg_in_queue)) + sizeof(plci->msg_in_queue)))
462 { 462 {
463 if (plci->msg_in_write_pos != plci->msg_in_read_pos) 463 if (plci->msg_in_write_pos != plci->msg_in_read_pos)
464 c = TRUE; 464 c = true;
465 } 465 }
466 if (msg->header.command == _DATA_B3_R) 466 if (msg->header.command == _DATA_B3_R)
467 { 467 {
@@ -506,13 +506,13 @@ word api_put(APPL * appl, CAPI_MSG * msg)
506 506
507 return _QUEUE_FULL; 507 return _QUEUE_FULL;
508 } 508 }
509 c = TRUE; 509 c = true;
510 } 510 }
511 } 511 }
512 else 512 else
513 { 513 {
514 if (plci->req_in || plci->internal_command) 514 if (plci->req_in || plci->internal_command)
515 c = TRUE; 515 c = true;
516 else 516 else
517 { 517 {
518 plci->command = msg->header.command; 518 plci->command = msg->header.command;
@@ -626,10 +626,10 @@ word api_parse(byte * msg, word length, byte * format, API_PARSE * parms)
626 break; 626 break;
627 } 627 }
628 628
629 if(p>length) return TRUE; 629 if(p>length) return true;
630 } 630 }
631 if(parms) parms[i].info = NULL; 631 if(parms) parms[i].info = NULL;
632 return FALSE; 632 return false;
633} 633}
634 634
635void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out) 635void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out)
@@ -687,7 +687,7 @@ word api_remove_start(void)
687 word j; 687 word j;
688 688
689 if(!remove_started) { 689 if(!remove_started) {
690 remove_started = TRUE; 690 remove_started = true;
691 for(i=0;i<max_adapter;i++) { 691 for(i=0;i<max_adapter;i++) {
692 if(adapter[i].request) { 692 if(adapter[i].request) {
693 for(j=0;j<adapter[i].max_plci;j++) { 693 for(j=0;j<adapter[i].max_plci;j++) {
@@ -1080,7 +1080,7 @@ static void plci_remove(PLCI * plci)
1080 send_req(plci); 1080 send_req(plci);
1081 } 1081 }
1082 } 1082 }
1083 ncci_remove (plci, 0, FALSE); 1083 ncci_remove (plci, 0, false);
1084 plci_free_msg_in_queue (plci); 1084 plci_free_msg_in_queue (plci);
1085 1085
1086 plci->channels = 0; 1086 plci->channels = 0;
@@ -1226,7 +1226,7 @@ byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1226 Id = ((word)1<<8)|a->Id; 1226 Id = ((word)1<<8)|a->Id;
1227 sendf(appl,_CONNECT_R|CONFIRM,Id,Number,"w",0); 1227 sendf(appl,_CONNECT_R|CONFIRM,Id,Number,"w",0);
1228 sendf(appl, _DISCONNECT_I, Id, 0, "w", _L1_ERROR); 1228 sendf(appl, _DISCONNECT_I, Id, 0, "w", _L1_ERROR);
1229 return FALSE; 1229 return false;
1230 } 1230 }
1231 Info = _OUT_OF_PLCI; 1231 Info = _OUT_OF_PLCI;
1232 if((i=get_plci(a))) 1232 if((i=get_plci(a)))
@@ -1330,7 +1330,7 @@ byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1330 plci->command = _CONNECT_R; 1330 plci->command = _CONNECT_R;
1331 plci->number = Number; 1331 plci->number = Number;
1332 /* x.31 or D-ch free SAPI in LinkLayer? */ 1332 /* x.31 or D-ch free SAPI in LinkLayer? */
1333 if(ch==1 && LinkLayer!=3 && LinkLayer!=12) noCh = TRUE; 1333 if(ch==1 && LinkLayer!=3 && LinkLayer!=12) noCh = true;
1334 if((ch==0 || ch==2 || noCh || ch==3 || ch==4) && !Info) 1334 if((ch==0 || ch==2 || noCh || ch==3 || ch==4) && !Info)
1335 { 1335 {
1336 /* B-channel used for B3 connections (ch==0), or no B channel */ 1336 /* B-channel used for B3 connections (ch==0), or no B channel */
@@ -1381,7 +1381,7 @@ byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1381 plci->command = 0; 1381 plci->command = 0;
1382 dbug(1,dprintf("Spoof")); 1382 dbug(1,dprintf("Spoof"));
1383 send_req(plci); 1383 send_req(plci);
1384 return FALSE; 1384 return false;
1385 } 1385 }
1386 if(ch==4)add_p(plci,CHI,p_chi); 1386 if(ch==4)add_p(plci,CHI,p_chi);
1387 add_s(plci,CPN,&parms[1]); 1387 add_s(plci,CPN,&parms[1]);
@@ -1395,11 +1395,11 @@ byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1395 plci->appl = appl; 1395 plci->appl = appl;
1396 sig_req(plci,LISTEN_REQ,0); 1396 sig_req(plci,LISTEN_REQ,0);
1397 send_req(plci); 1397 send_req(plci);
1398 return FALSE; 1398 return false;
1399 } 1399 }
1400 } 1400 }
1401 send_req(plci); 1401 send_req(plci);
1402 return FALSE; 1402 return false;
1403 } 1403 }
1404 plci->Id = 0; 1404 plci->Id = 0;
1405 } 1405 }
@@ -1571,7 +1571,7 @@ byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1571byte connect_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1571byte connect_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
1572{ 1572{
1573 dbug(1,dprintf("connect_a_res")); 1573 dbug(1,dprintf("connect_a_res"));
1574 return FALSE; 1574 return false;
1575} 1575}
1576 1576
1577byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1577byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
@@ -1624,9 +1624,9 @@ byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
1624 } 1624 }
1625 } 1625 }
1626 1626
1627 if(!appl) return FALSE; 1627 if(!appl) return false;
1628 sendf(appl, _DISCONNECT_R|CONFIRM, Id, Number, "w",Info); 1628 sendf(appl, _DISCONNECT_R|CONFIRM, Id, Number, "w",Info);
1629 return FALSE; 1629 return false;
1630} 1630}
1631 1631
1632byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1632byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
@@ -1702,7 +1702,7 @@ byte listen_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, A
1702 "w",Info); 1702 "w",Info);
1703 1703
1704 if (a) listen_check(a); 1704 if (a) listen_check(a);
1705 return FALSE; 1705 return false;
1706} 1706}
1707 1707
1708byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1708byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
@@ -1739,7 +1739,7 @@ byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APP
1739 add_s(plci,KEY,&ai_parms[1]); 1739 add_s(plci,KEY,&ai_parms[1]);
1740 sig_req(plci,INFO_REQ,0); 1740 sig_req(plci,INFO_REQ,0);
1741 send_req(plci); 1741 send_req(plci);
1742 return FALSE; 1742 return false;
1743 } 1743 }
1744 1744
1745 if(plci->State && ai_parms[2].length) 1745 if(plci->State && ai_parms[2].length)
@@ -1769,7 +1769,7 @@ byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APP
1769 if((i=get_plci(a))) 1769 if((i=get_plci(a)))
1770 { 1770 {
1771 rc_plci = &a->plci[i-1]; 1771 rc_plci = &a->plci[i-1];
1772 appl->NullCREnable = TRUE; 1772 appl->NullCREnable = true;
1773 rc_plci->internal_command = C_NCR_FAC_REQ; 1773 rc_plci->internal_command = C_NCR_FAC_REQ;
1774 rc_plci->appl = appl; 1774 rc_plci->appl = appl;
1775 add_p(rc_plci,CAI,"\x01\x80"); 1775 add_p(rc_plci,CAI,"\x01\x80");
@@ -1788,7 +1788,7 @@ byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APP
1788 add_ai(rc_plci, &msg[1]); 1788 add_ai(rc_plci, &msg[1]);
1789 sig_req(rc_plci,NCR_FACILITY,0); 1789 sig_req(rc_plci,NCR_FACILITY,0);
1790 send_req(rc_plci); 1790 send_req(rc_plci);
1791 return FALSE; 1791 return false;
1792 /* for application controlled supplementary services */ 1792 /* for application controlled supplementary services */
1793 } 1793 }
1794 } 1794 }
@@ -1811,13 +1811,13 @@ byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APP
1811 Number, 1811 Number,
1812 "w",Info); 1812 "w",Info);
1813 } 1813 }
1814 return FALSE; 1814 return false;
1815} 1815}
1816 1816
1817byte info_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1817byte info_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
1818{ 1818{
1819 dbug(1,dprintf("info_res")); 1819 dbug(1,dprintf("info_res"));
1820 return FALSE; 1820 return false;
1821} 1821}
1822 1822
1823byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 1823byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
@@ -1828,7 +1828,7 @@ byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, AP
1828 dbug(1,dprintf("alert_req")); 1828 dbug(1,dprintf("alert_req"));
1829 1829
1830 Info = _WRONG_IDENTIFIER; 1830 Info = _WRONG_IDENTIFIER;
1831 ret = FALSE; 1831 ret = false;
1832 if(plci) { 1832 if(plci) {
1833 Info = _ALERT_IGNORED; 1833 Info = _ALERT_IGNORED;
1834 if(plci->State!=INC_CON_ALERT) { 1834 if(plci->State!=INC_CON_ALERT) {
@@ -1922,7 +1922,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1922 rplci->appl = appl; 1922 rplci->appl = appl;
1923 sig_req(rplci,S_SUPPORTED,0); 1923 sig_req(rplci,S_SUPPORTED,0);
1924 send_req(rplci); 1924 send_req(rplci);
1925 return FALSE; 1925 return false;
1926 break; 1926 break;
1927 1927
1928 case S_LISTEN: 1928 case S_LISTEN:
@@ -1972,7 +1972,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1972 add_s(plci,CAI,&ss_parms[1]); 1972 add_s(plci,CAI,&ss_parms[1]);
1973 sig_req(plci,CALL_HOLD,0); 1973 sig_req(plci,CALL_HOLD,0);
1974 send_req(plci); 1974 send_req(plci);
1975 return FALSE; 1975 return false;
1976 } 1976 }
1977 else Info = 0x3010; /* wrong state */ 1977 else Info = 0x3010; /* wrong state */
1978 break; 1978 break;
@@ -1997,13 +1997,13 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
1997 plci->internal_command = BLOCK_PLCI; 1997 plci->internal_command = BLOCK_PLCI;
1998 plci->command = 0; 1998 plci->command = 0;
1999 dbug(1,dprintf("Spoof")); 1999 dbug(1,dprintf("Spoof"));
2000 return FALSE; 2000 return false;
2001 } 2001 }
2002 else 2002 else
2003 { 2003 {
2004 sig_req(plci,CALL_RETRIEVE,0); 2004 sig_req(plci,CALL_RETRIEVE,0);
2005 send_req(plci); 2005 send_req(plci);
2006 return FALSE; 2006 return false;
2007 } 2007 }
2008 } 2008 }
2009 else Info = 0x3010; /* wrong state */ 2009 else Info = 0x3010; /* wrong state */
@@ -2123,7 +2123,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2123 add_p(plci,CAI,cai); 2123 add_p(plci,CAI,cai);
2124 sig_req(plci,S_SERVICE,0); 2124 sig_req(plci,S_SERVICE,0);
2125 send_req(plci); 2125 send_req(plci);
2126 return FALSE; 2126 return false;
2127 } 2127 }
2128 else Info = 0x3010; /* wrong state */ 2128 else Info = 0x3010; /* wrong state */
2129 break; 2129 break;
@@ -2265,7 +2265,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2265 add_p(rplci,CAI,cai); 2265 add_p(rplci,CAI,cai);
2266 sig_req(rplci,S_SERVICE,0); 2266 sig_req(rplci,S_SERVICE,0);
2267 send_req(rplci); 2267 send_req(rplci);
2268 return FALSE; 2268 return false;
2269 } 2269 }
2270 else 2270 else
2271 { 2271 {
@@ -2291,14 +2291,14 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2291 ss_parms[3].info[3] = (byte)GET_WORD(&(ss_parms[2].info[0])); 2291 ss_parms[3].info[3] = (byte)GET_WORD(&(ss_parms[2].info[0]));
2292 plci->command = 0; 2292 plci->command = 0;
2293 plci->internal_command = CD_REQ_PEND; 2293 plci->internal_command = CD_REQ_PEND;
2294 appl->CDEnable = TRUE; 2294 appl->CDEnable = true;
2295 cai[0] = 1; 2295 cai[0] = 1;
2296 cai[1] = CALL_DEFLECTION; 2296 cai[1] = CALL_DEFLECTION;
2297 add_p(plci,CAI,cai); 2297 add_p(plci,CAI,cai);
2298 add_p(plci,CPN,ss_parms[3].info); 2298 add_p(plci,CPN,ss_parms[3].info);
2299 sig_req(plci,S_SERVICE,0); 2299 sig_req(plci,S_SERVICE,0);
2300 send_req(plci); 2300 send_req(plci);
2301 return FALSE; 2301 return false;
2302 break; 2302 break;
2303 2303
2304 case S_CALL_FORWARDING_START: 2304 case S_CALL_FORWARDING_START:
@@ -2337,7 +2337,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2337 add_p(rplci,CPN,ss_parms[6].info); 2337 add_p(rplci,CPN,ss_parms[6].info);
2338 sig_req(rplci,S_SERVICE,0); 2338 sig_req(rplci,S_SERVICE,0);
2339 send_req(rplci); 2339 send_req(rplci);
2340 return FALSE; 2340 return false;
2341 break; 2341 break;
2342 2342
2343 case S_INTERROGATE_DIVERSION: 2343 case S_INTERROGATE_DIVERSION:
@@ -2456,7 +2456,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2456 2456
2457 sig_req(rplci,S_SERVICE,0); 2457 sig_req(rplci,S_SERVICE,0);
2458 send_req(rplci); 2458 send_req(rplci);
2459 return FALSE; 2459 return false;
2460 break; 2460 break;
2461 2461
2462 case S_MWI_ACTIVATE: 2462 case S_MWI_ACTIVATE:
@@ -2472,7 +2472,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2472 { 2472 {
2473 rplci = &a->plci[i-1]; 2473 rplci = &a->plci[i-1];
2474 rplci->appl = appl; 2474 rplci->appl = appl;
2475 rplci->cr_enquiry=TRUE; 2475 rplci->cr_enquiry=true;
2476 add_p(rplci,CAI,"\x01\x80"); 2476 add_p(rplci,CAI,"\x01\x80");
2477 add_p(rplci,UID,"\x06\x43\x61\x70\x69\x32\x30"); 2477 add_p(rplci,UID,"\x06\x43\x61\x70\x69\x32\x30");
2478 sig_req(rplci,ASSIGN,DSIG_ID); 2478 sig_req(rplci,ASSIGN,DSIG_ID);
@@ -2487,7 +2487,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2487 else 2487 else
2488 { 2488 {
2489 rplci = plci; 2489 rplci = plci;
2490 rplci->cr_enquiry=FALSE; 2490 rplci->cr_enquiry=false;
2491 } 2491 }
2492 2492
2493 rplci->command = 0; 2493 rplci->command = 0;
@@ -2509,7 +2509,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2509 add_p(rplci,UID,ss_parms[10].info); /* Time */ 2509 add_p(rplci,UID,ss_parms[10].info); /* Time */
2510 sig_req(rplci,S_SERVICE,0); 2510 sig_req(rplci,S_SERVICE,0);
2511 send_req(rplci); 2511 send_req(rplci);
2512 return FALSE; 2512 return false;
2513 2513
2514 case S_MWI_DEACTIVATE: 2514 case S_MWI_DEACTIVATE:
2515 if(api_parse(&parms->info[1],(word)parms->length,"wbwwss",ss_parms)) 2515 if(api_parse(&parms->info[1],(word)parms->length,"wbwwss",ss_parms))
@@ -2524,7 +2524,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2524 { 2524 {
2525 rplci = &a->plci[i-1]; 2525 rplci = &a->plci[i-1];
2526 rplci->appl = appl; 2526 rplci->appl = appl;
2527 rplci->cr_enquiry=TRUE; 2527 rplci->cr_enquiry=true;
2528 add_p(rplci,CAI,"\x01\x80"); 2528 add_p(rplci,CAI,"\x01\x80");
2529 add_p(rplci,UID,"\x06\x43\x61\x70\x69\x32\x30"); 2529 add_p(rplci,UID,"\x06\x43\x61\x70\x69\x32\x30");
2530 sig_req(rplci,ASSIGN,DSIG_ID); 2530 sig_req(rplci,ASSIGN,DSIG_ID);
@@ -2539,7 +2539,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2539 else 2539 else
2540 { 2540 {
2541 rplci = plci; 2541 rplci = plci;
2542 rplci->cr_enquiry=FALSE; 2542 rplci->cr_enquiry=false;
2543 } 2543 }
2544 2544
2545 rplci->command = 0; 2545 rplci->command = 0;
@@ -2556,7 +2556,7 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2556 add_p(rplci,OAD,ss_parms[5].info); /* Controlling User Number */ 2556 add_p(rplci,OAD,ss_parms[5].info); /* Controlling User Number */
2557 sig_req(rplci,S_SERVICE,0); 2557 sig_req(rplci,S_SERVICE,0);
2558 send_req(rplci); 2558 send_req(rplci);
2559 return FALSE; 2559 return false;
2560 2560
2561 default: 2561 default:
2562 Info = 0x300E; /* not supported */ 2562 Info = 0x300E; /* not supported */
@@ -2597,13 +2597,13 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
2597 Id, 2597 Id,
2598 Number, 2598 Number,
2599 "wws",Info,selector,SSparms); 2599 "wws",Info,selector,SSparms);
2600 return FALSE; 2600 return false;
2601} 2601}
2602 2602
2603byte facility_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) 2603byte facility_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
2604{ 2604{
2605 dbug(1,dprintf("facility_res")); 2605 dbug(1,dprintf("facility_res"));
2606 return FALSE; 2606 return false;
2607} 2607}
2608 2608
2609byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 2609byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -2649,7 +2649,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2649 Id, 2649 Id,
2650 Number, 2650 Number,
2651 "w",Info); 2651 "w",Info);
2652 return FALSE; 2652 return false;
2653 } 2653 }
2654 plci->requested_options_conn = 0; 2654 plci->requested_options_conn = 0;
2655 2655
@@ -2684,7 +2684,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2684 || (fax_feature_bits & T30_FEATURE_BIT_MORE_DOCUMENTS)) 2684 || (fax_feature_bits & T30_FEATURE_BIT_MORE_DOCUMENTS))
2685 { 2685 {
2686 len = (byte)(&(((T30_INFO *) 0)->universal_6)); 2686 len = (byte)(&(((T30_INFO *) 0)->universal_6));
2687 fax_info_change = FALSE; 2687 fax_info_change = false;
2688 if (ncpi->length >= 4) 2688 if (ncpi->length >= 4)
2689 { 2689 {
2690 w = GET_WORD(&ncpi->info[3]); 2690 w = GET_WORD(&ncpi->info[3]);
@@ -2693,7 +2693,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2693 ((T30_INFO *)(plci->fax_connect_info_buffer))->resolution = 2693 ((T30_INFO *)(plci->fax_connect_info_buffer))->resolution =
2694 (byte)((((T30_INFO *)(plci->fax_connect_info_buffer))->resolution & ~T30_RESOLUTION_R8_0770_OR_200) | 2694 (byte)((((T30_INFO *)(plci->fax_connect_info_buffer))->resolution & ~T30_RESOLUTION_R8_0770_OR_200) |
2695 ((w & 0x0001) ? T30_RESOLUTION_R8_0770_OR_200 : 0)); 2695 ((w & 0x0001) ? T30_RESOLUTION_R8_0770_OR_200 : 0));
2696 fax_info_change = TRUE; 2696 fax_info_change = true;
2697 } 2697 }
2698 fax_control_bits &= ~(T30_CONTROL_BIT_REQUEST_POLLING | T30_CONTROL_BIT_MORE_DOCUMENTS); 2698 fax_control_bits &= ~(T30_CONTROL_BIT_REQUEST_POLLING | T30_CONTROL_BIT_MORE_DOCUMENTS);
2699 if (w & 0x0002) /* Fax-polling request */ 2699 if (w & 0x0002) /* Fax-polling request */
@@ -2709,7 +2709,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2709 if (((byte) w) != ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format) 2709 if (((byte) w) != ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format)
2710 { 2710 {
2711 ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format = (byte) w; 2711 ((T30_INFO *)(plci->fax_connect_info_buffer))->data_format = (byte) w;
2712 fax_info_change = TRUE; 2712 fax_info_change = true;
2713 } 2713 }
2714 2714
2715 if ((a->man_profile.private_options & (1L << PRIVATE_FAX_SUB_SEP_PWD)) 2715 if ((a->man_profile.private_options & (1L << PRIVATE_FAX_SUB_SEP_PWD))
@@ -2781,13 +2781,13 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2781 { 2781 {
2782 len = (byte)(&(((T30_INFO *) 0)->universal_6)); 2782 len = (byte)(&(((T30_INFO *) 0)->universal_6));
2783 } 2783 }
2784 fax_info_change = TRUE; 2784 fax_info_change = true;
2785 2785
2786 } 2786 }
2787 if (fax_control_bits != GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low)) 2787 if (fax_control_bits != GET_WORD(&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low))
2788 { 2788 {
2789 PUT_WORD (&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low, fax_control_bits); 2789 PUT_WORD (&((T30_INFO *)plci->fax_connect_info_buffer)->control_bits_low, fax_control_bits);
2790 fax_info_change = TRUE; 2790 fax_info_change = true;
2791 } 2791 }
2792 } 2792 }
2793 if (Info == GOOD) 2793 if (Info == GOOD)
@@ -2798,12 +2798,12 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2798 if (fax_feature_bits & T30_FEATURE_BIT_MORE_DOCUMENTS) 2798 if (fax_feature_bits & T30_FEATURE_BIT_MORE_DOCUMENTS)
2799 { 2799 {
2800 start_internal_command (Id, plci, fax_connect_info_command); 2800 start_internal_command (Id, plci, fax_connect_info_command);
2801 return FALSE; 2801 return false;
2802 } 2802 }
2803 else 2803 else
2804 { 2804 {
2805 start_internal_command (Id, plci, fax_adjust_b23_command); 2805 start_internal_command (Id, plci, fax_adjust_b23_command);
2806 return FALSE; 2806 return false;
2807 } 2807 }
2808 } 2808 }
2809 } 2809 }
@@ -2820,7 +2820,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2820 for (w = 0; w < ncpi->length; w++) 2820 for (w = 0; w < ncpi->length; w++)
2821 plci->internal_req_buffer[2+w] = ncpi->info[1+w]; 2821 plci->internal_req_buffer[2+w] = ncpi->info[1+w];
2822 start_internal_command (Id, plci, rtp_connect_b3_req_command); 2822 start_internal_command (Id, plci, rtp_connect_b3_req_command);
2823 return FALSE; 2823 return false;
2824 } 2824 }
2825 2825
2826 if(!Info) 2826 if(!Info)
@@ -2837,7 +2837,7 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2837 Id, 2837 Id,
2838 Number, 2838 Number,
2839 "w",Info); 2839 "w",Info);
2840 return FALSE; 2840 return false;
2841} 2841}
2842 2842
2843byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 2843byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -2909,7 +2909,7 @@ byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2909 plci->fax_connect_info_length = len; 2909 plci->fax_connect_info_length = len;
2910 ((T30_INFO *)(plci->fax_connect_info_buffer))->code = 0; 2910 ((T30_INFO *)(plci->fax_connect_info_buffer))->code = 0;
2911 start_internal_command (Id, plci, fax_connect_ack_command); 2911 start_internal_command (Id, plci, fax_connect_ack_command);
2912 return FALSE; 2912 return false;
2913 } 2913 }
2914 } 2914 }
2915 2915
@@ -2932,7 +2932,7 @@ byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2932 for (w = 0; w < ncpi->length; w++) 2932 for (w = 0; w < ncpi->length; w++)
2933 plci->internal_req_buffer[2+w] = ncpi->info[1+w]; 2933 plci->internal_req_buffer[2+w] = ncpi->info[1+w];
2934 start_internal_command (Id, plci, rtp_connect_b3_res_command); 2934 start_internal_command (Id, plci, rtp_connect_b3_res_command);
2935 return FALSE; 2935 return false;
2936 } 2936 }
2937 2937
2938 else 2938 else
@@ -2945,14 +2945,14 @@ byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc
2945 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"s",""); 2945 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
2946 if (plci->adjust_b_restore) 2946 if (plci->adjust_b_restore)
2947 { 2947 {
2948 plci->adjust_b_restore = FALSE; 2948 plci->adjust_b_restore = false;
2949 start_internal_command (Id, plci, adjust_b_restore); 2949 start_internal_command (Id, plci, adjust_b_restore);
2950 } 2950 }
2951 } 2951 }
2952 return 1; 2952 return 1;
2953 } 2953 }
2954 } 2954 }
2955 return FALSE; 2955 return false;
2956} 2956}
2957 2957
2958byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 2958byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -2972,7 +2972,7 @@ byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
2972 channel_xmit_xon (plci); 2972 channel_xmit_xon (plci);
2973 } 2973 }
2974 } 2974 }
2975 return FALSE; 2975 return false;
2976} 2976}
2977 2977
2978byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 2978byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3004,7 +3004,7 @@ byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI *
3004 { 3004 {
3005 plci->send_disc = (byte)ncci; 3005 plci->send_disc = (byte)ncci;
3006 plci->command = 0; 3006 plci->command = 0;
3007 return FALSE; 3007 return false;
3008 } 3008 }
3009 else 3009 else
3010 { 3010 {
@@ -3028,7 +3028,7 @@ byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI *
3028 Id, 3028 Id,
3029 Number, 3029 Number,
3030 "w",Info); 3030 "w",Info);
3031 return FALSE; 3031 return false;
3032} 3032}
3033 3033
3034byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3034byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3084,7 +3084,7 @@ byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI *
3084 } 3084 }
3085 } 3085 }
3086 } 3086 }
3087 return FALSE; 3087 return false;
3088} 3088}
3089 3089
3090byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3090byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3140,7 +3140,7 @@ byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3140 } 3140 }
3141 3141
3142 send_data(plci); 3142 send_data(plci);
3143 return FALSE; 3143 return false;
3144 } 3144 }
3145 } 3145 }
3146 if (appl) 3146 if (appl)
@@ -3161,7 +3161,7 @@ byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3161 Number, 3161 Number,
3162 "ww",GET_WORD(parms[2].info),Info); 3162 "ww",GET_WORD(parms[2].info),Info);
3163 } 3163 }
3164 return FALSE; 3164 return false;
3165} 3165}
3166 3166
3167byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3167byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3194,7 +3194,7 @@ byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3194 } 3194 }
3195 } 3195 }
3196 } 3196 }
3197 return FALSE; 3197 return false;
3198} 3198}
3199 3199
3200byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3200byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3235,7 +3235,7 @@ byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3235 Id, 3235 Id,
3236 Number, 3236 Number,
3237 "w",Info); 3237 "w",Info);
3238 return FALSE; 3238 return false;
3239} 3239}
3240 3240
3241byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3241byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3254,12 +3254,12 @@ byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3254 { 3254 {
3255 a->ncci_state[ncci] = CONNECTED; 3255 a->ncci_state[ncci] = CONNECTED;
3256 nl_req_ncci(plci,N_RESET_ACK,(byte)ncci); 3256 nl_req_ncci(plci,N_RESET_ACK,(byte)ncci);
3257 return TRUE; 3257 return true;
3258 } 3258 }
3259 break; 3259 break;
3260 } 3260 }
3261 } 3261 }
3262 return FALSE; 3262 return false;
3263} 3263}
3264 3264
3265byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3265byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3292,7 +3292,7 @@ byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI
3292 return 1; 3292 return 1;
3293 } 3293 }
3294 } 3294 }
3295 return FALSE; 3295 return false;
3296} 3296}
3297 3297
3298 3298
@@ -3378,7 +3378,7 @@ byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3378 plci->internal_command = BLOCK_PLCI; /* lock other commands */ 3378 plci->internal_command = BLOCK_PLCI; /* lock other commands */
3379 plci->command = 0; 3379 plci->command = 0;
3380 dbug(1,dprintf("continue if codec loaded")); 3380 dbug(1,dprintf("continue if codec loaded"));
3381 return FALSE; 3381 return false;
3382 } 3382 }
3383 } 3383 }
3384 } 3384 }
@@ -3407,12 +3407,12 @@ byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
3407 else if (plci->call_dir & CALL_DIR_IN) 3407 else if (plci->call_dir & CALL_DIR_IN)
3408 plci->call_dir = CALL_DIR_IN | CALL_DIR_ANSWER; 3408 plci->call_dir = CALL_DIR_IN | CALL_DIR_ANSWER;
3409 start_internal_command (Id, plci, select_b_command); 3409 start_internal_command (Id, plci, select_b_command);
3410 return FALSE; 3410 return false;
3411 } 3411 }
3412 } 3412 }
3413 } 3413 }
3414 sendf(appl, _SELECT_B_REQ|CONFIRM, Id, Number, "w", Info); 3414 sendf(appl, _SELECT_B_REQ|CONFIRM, Id, Number, "w", Info);
3415 return FALSE; 3415 return false;
3416} 3416}
3417 3417
3418byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) 3418byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
@@ -3489,7 +3489,7 @@ byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3489 } 3489 }
3490 3490
3491 plci->State = LOCAL_CONNECT; 3491 plci->State = LOCAL_CONNECT;
3492 plci->manufacturer = TRUE; 3492 plci->manufacturer = true;
3493 plci->command = _MANUFACTURER_R; 3493 plci->command = _MANUFACTURER_R;
3494 plci->m_command = command; 3494 plci->m_command = command;
3495 plci->number = Number; 3495 plci->number = Number;
@@ -3520,7 +3520,7 @@ byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3520 plci->internal_command = BLOCK_PLCI; /* reject other req meanwhile */ 3520 plci->internal_command = BLOCK_PLCI; /* reject other req meanwhile */
3521 plci->command = 0; 3521 plci->command = 0;
3522 send_req(plci); 3522 send_req(plci);
3523 return FALSE; 3523 return false;
3524 } 3524 }
3525 if(dir==1) { 3525 if(dir==1) {
3526 sig_req(plci,CALL_REQ,0); 3526 sig_req(plci,CALL_REQ,0);
@@ -3573,7 +3573,7 @@ byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3573 } 3573 }
3574 else if(req==LAW_REQ) 3574 else if(req==LAW_REQ)
3575 { 3575 {
3576 plci->cr_enquiry = TRUE; 3576 plci->cr_enquiry = true;
3577 } 3577 }
3578 add_ss(plci,FTY,&m_parms[1]); 3578 add_ss(plci,FTY,&m_parms[1]);
3579 sig_req(plci,req,0); 3579 sig_req(plci,req,0);
@@ -3739,7 +3739,7 @@ byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3739 Id, 3739 Id,
3740 Number, 3740 Number,
3741 "dww",_DI_MANU_ID,command,Info); 3741 "dww",_DI_MANU_ID,command,Info);
3742 return FALSE; 3742 return false;
3743} 3743}
3744 3744
3745 3745
@@ -3760,7 +3760,7 @@ byte manufacturer_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3760 || (msg[1].length == 0) 3760 || (msg[1].length == 0)
3761 || (GET_DWORD(msg[0].info)!=_DI_MANU_ID)) 3761 || (GET_DWORD(msg[0].info)!=_DI_MANU_ID))
3762 { 3762 {
3763 return FALSE; 3763 return false;
3764 } 3764 }
3765 indication = GET_WORD(msg[1].info); 3765 indication = GET_WORD(msg[1].info);
3766 switch (indication) 3766 switch (indication)
@@ -3811,7 +3811,7 @@ byte manufacturer_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
3811 break; 3811 break;
3812 3812
3813 } 3813 }
3814 return FALSE; 3814 return false;
3815} 3815}
3816 3816
3817/*------------------------------------------------------------------*/ 3817/*------------------------------------------------------------------*/
@@ -3908,14 +3908,14 @@ void callback(ENTITY * e)
3908 plci->nl_req = 0; 3908 plci->nl_req = 0;
3909 } 3909 }
3910 if (plci->nl_req) 3910 if (plci->nl_req)
3911 control_rc (plci, 0, rc, ch, 0, TRUE); 3911 control_rc (plci, 0, rc, ch, 0, true);
3912 else 3912 else
3913 { 3913 {
3914 if (req == N_XON) 3914 if (req == N_XON)
3915 { 3915 {
3916 channel_x_on (plci, ch); 3916 channel_x_on (plci, ch);
3917 if (plci->internal_command) 3917 if (plci->internal_command)
3918 control_rc (plci, req, rc, ch, 0, TRUE); 3918 control_rc (plci, req, rc, ch, 0, true);
3919 } 3919 }
3920 else 3920 else
3921 { 3921 {
@@ -3931,21 +3931,21 @@ void callback(ENTITY * e)
3931 } 3931 }
3932 } 3932 }
3933 channel_xmit_xon (plci); 3933 channel_xmit_xon (plci);
3934 control_rc (plci, 0, rc, ch, global_req, TRUE); 3934 control_rc (plci, 0, rc, ch, global_req, true);
3935 } 3935 }
3936 else if (plci->data_sent) 3936 else if (plci->data_sent)
3937 { 3937 {
3938 channel_xmit_xon (plci); 3938 channel_xmit_xon (plci);
3939 plci->data_sent = FALSE; 3939 plci->data_sent = false;
3940 plci->NL.XNum = 1; 3940 plci->NL.XNum = 1;
3941 data_rc (plci, ch); 3941 data_rc (plci, ch);
3942 if (plci->internal_command) 3942 if (plci->internal_command)
3943 control_rc (plci, req, rc, ch, 0, TRUE); 3943 control_rc (plci, req, rc, ch, 0, true);
3944 } 3944 }
3945 else 3945 else
3946 { 3946 {
3947 channel_xmit_xon (plci); 3947 channel_xmit_xon (plci);
3948 control_rc (plci, req, rc, ch, 0, TRUE); 3948 control_rc (plci, req, rc, ch, 0, true);
3949 } 3949 }
3950 } 3950 }
3951 } 3951 }
@@ -3974,12 +3974,12 @@ void callback(ENTITY * e)
3974 if (rc != ASSIGN_OK) 3974 if (rc != ASSIGN_OK)
3975 e->Id = 0; 3975 e->Id = 0;
3976 channel_xmit_xon (plci); 3976 channel_xmit_xon (plci);
3977 control_rc (plci, 0, rc, ch, global_req, FALSE); 3977 control_rc (plci, 0, rc, ch, global_req, false);
3978 } 3978 }
3979 else 3979 else
3980 { 3980 {
3981 channel_xmit_xon (plci); 3981 channel_xmit_xon (plci);
3982 control_rc (plci, req, rc, ch, 0, FALSE); 3982 control_rc (plci, req, rc, ch, 0, false);
3983 } 3983 }
3984 } 3984 }
3985 /* 3985 /*
@@ -4065,8 +4065,8 @@ capi_callback_suffix:
4065 4065
4066 if (plci->li_notify_update) 4066 if (plci->li_notify_update)
4067 { 4067 {
4068 plci->li_notify_update = FALSE; 4068 plci->li_notify_update = false;
4069 mixer_notify_update (plci, FALSE); 4069 mixer_notify_update (plci, false);
4070 } 4070 }
4071 4071
4072 } 4072 }
@@ -4428,7 +4428,7 @@ void control_rc(PLCI * plci, byte req, byte rc, byte ch, byte global_req, byte
4428 else 4428 else
4429 { 4429 {
4430 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE); 4430 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE);
4431 appl->NullCREnable = FALSE; 4431 appl->NullCREnable = false;
4432 plci_remove(plci); 4432 plci_remove(plci);
4433 } 4433 }
4434 } 4434 }
@@ -4441,7 +4441,7 @@ void control_rc(PLCI * plci, byte req, byte rc, byte ch, byte global_req, byte
4441 else 4441 else
4442 { 4442 {
4443 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE); 4443 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE);
4444 appl->NullCREnable = FALSE; 4444 appl->NullCREnable = false;
4445 } 4445 }
4446 plci_remove(plci); 4446 plci_remove(plci);
4447 } 4447 }
@@ -4862,7 +4862,7 @@ void sig_ind(PLCI * plci)
4862 byte CF_Ind[] = "\x09\x02\x00\x06\x00\x00\x00\x00\x00\x00"; 4862 byte CF_Ind[] = "\x09\x02\x00\x06\x00\x00\x00\x00\x00\x00";
4863 byte Interr_Err_Ind[] = "\x0a\x02\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; 4863 byte Interr_Err_Ind[] = "\x0a\x02\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
4864 byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\0x00\0x00\0x00\0x00"; 4864 byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\0x00\0x00\0x00\0x00";
4865 byte force_mt_info = FALSE; 4865 byte force_mt_info = false;
4866 byte dir; 4866 byte dir;
4867 dword d; 4867 dword d;
4868 word w; 4868 word w;
@@ -4933,7 +4933,7 @@ void sig_ind(PLCI * plci)
4933 { 4933 {
4934 if(plci->cr_enquiry && plci->appl) 4934 if(plci->cr_enquiry && plci->appl)
4935 { 4935 {
4936 plci->cr_enquiry = FALSE; 4936 plci->cr_enquiry = false;
4937 /* d = MANU_ID */ 4937 /* d = MANU_ID */
4938 /* w = m_command */ 4938 /* w = m_command */
4939 /* b = total length */ 4939 /* b = total length */
@@ -5158,7 +5158,7 @@ void sig_ind(PLCI * plci)
5158 if(application[i].CDEnable) 5158 if(application[i].CDEnable)
5159 { 5159 {
5160 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind); 5160 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind);
5161 application[i].CDEnable = FALSE; 5161 application[i].CDEnable = false;
5162 } 5162 }
5163 } 5163 }
5164 break; 5164 break;
@@ -5375,7 +5375,7 @@ void sig_ind(PLCI * plci)
5375 if(application[i].CDEnable) 5375 if(application[i].CDEnable)
5376 { 5376 {
5377 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind); 5377 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind);
5378 application[i].CDEnable = FALSE; 5378 application[i].CDEnable = false;
5379 } 5379 }
5380 } 5380 }
5381 break; 5381 break;
@@ -5730,7 +5730,7 @@ void sig_ind(PLCI * plci)
5730 plci, 5730 plci,
5731 Id, 5731 Id,
5732 parms, 5732 parms,
5733 SendMultiIE(plci,Id,multi_pi_parms, PI, 0x210, TRUE)); 5733 SendMultiIE(plci,Id,multi_pi_parms, PI, 0x210, true));
5734 } 5734 }
5735 } 5735 }
5736 clear_c_ind_mask_bit (plci, MAX_APPL); 5736 clear_c_ind_mask_bit (plci, MAX_APPL);
@@ -6117,38 +6117,38 @@ static void SendSetupInfo(APPL * appl, PLCI * plci, dword Id, byte * * par
6117 dbug(1,dprintf("CPN ")); 6117 dbug(1,dprintf("CPN "));
6118 Info_Number = 0x0070; 6118 Info_Number = 0x0070;
6119 Info_Mask = 0x80; 6119 Info_Mask = 0x80;
6120 Info_Sent_Flag = TRUE; 6120 Info_Sent_Flag = true;
6121 break; 6121 break;
6122 case 8: /* display */ 6122 case 8: /* display */
6123 dbug(1,dprintf("display(%d)",i)); 6123 dbug(1,dprintf("display(%d)",i));
6124 Info_Number = 0x0028; 6124 Info_Number = 0x0028;
6125 Info_Mask = 0x04; 6125 Info_Mask = 0x04;
6126 Info_Sent_Flag = TRUE; 6126 Info_Sent_Flag = true;
6127 break; 6127 break;
6128 case 16: /* Channel Id */ 6128 case 16: /* Channel Id */
6129 dbug(1,dprintf("CHI")); 6129 dbug(1,dprintf("CHI"));
6130 Info_Number = 0x0018; 6130 Info_Number = 0x0018;
6131 Info_Mask = 0x100; 6131 Info_Mask = 0x100;
6132 Info_Sent_Flag = TRUE; 6132 Info_Sent_Flag = true;
6133 mixer_set_bchannel_id (plci, Info_Element); 6133 mixer_set_bchannel_id (plci, Info_Element);
6134 break; 6134 break;
6135 case 19: /* Redirected Number */ 6135 case 19: /* Redirected Number */
6136 dbug(1,dprintf("RDN")); 6136 dbug(1,dprintf("RDN"));
6137 Info_Number = 0x0074; 6137 Info_Number = 0x0074;
6138 Info_Mask = 0x400; 6138 Info_Mask = 0x400;
6139 Info_Sent_Flag = TRUE; 6139 Info_Sent_Flag = true;
6140 break; 6140 break;
6141 case 20: /* Redirected Number extended */ 6141 case 20: /* Redirected Number extended */
6142 dbug(1,dprintf("RDX")); 6142 dbug(1,dprintf("RDX"));
6143 Info_Number = 0x0073; 6143 Info_Number = 0x0073;
6144 Info_Mask = 0x400; 6144 Info_Mask = 0x400;
6145 Info_Sent_Flag = TRUE; 6145 Info_Sent_Flag = true;
6146 break; 6146 break;
6147 case 22: /* Redirecing Number */ 6147 case 22: /* Redirecing Number */
6148 dbug(1,dprintf("RIN")); 6148 dbug(1,dprintf("RIN"));
6149 Info_Number = 0x0076; 6149 Info_Number = 0x0076;
6150 Info_Mask = 0x400; 6150 Info_Mask = 0x400;
6151 Info_Sent_Flag = TRUE; 6151 Info_Sent_Flag = true;
6152 break; 6152 break;
6153 default: 6153 default:
6154 Info_Number = 0; 6154 Info_Number = 0;
@@ -6312,7 +6312,7 @@ void SendInfo(PLCI * plci, dword Id, byte * * parms, byte iesent)
6312 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask) 6312 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask)
6313 { 6313 {
6314 dbug(1,dprintf("NCR_Ind")); 6314 dbug(1,dprintf("NCR_Ind"));
6315 iesent=TRUE; 6315 iesent=true;
6316 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element); 6316 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element);
6317 } 6317 }
6318 } 6318 }
@@ -6330,7 +6330,7 @@ void SendInfo(PLCI * plci, dword Id, byte * * parms, byte iesent)
6330 if(test_c_ind_mask_bit (plci, j)) 6330 if(test_c_ind_mask_bit (plci, j))
6331 { 6331 {
6332 dbug(1,dprintf("Ovl_Ind")); 6332 dbug(1,dprintf("Ovl_Ind"));
6333 iesent=TRUE; 6333 iesent=true;
6334 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element); 6334 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6335 } 6335 }
6336 } 6336 }
@@ -6340,7 +6340,7 @@ void SendInfo(PLCI * plci, dword Id, byte * * parms, byte iesent)
6340 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask) 6340 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask)
6341 { 6341 {
6342 dbug(1,dprintf("Std_Ind")); 6342 dbug(1,dprintf("Std_Ind"));
6343 iesent=TRUE; 6343 iesent=true;
6344 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element); 6344 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6345 } 6345 }
6346 } 6346 }
@@ -6391,7 +6391,7 @@ byte SendMultiIE(PLCI * plci, dword Id, byte * * parms, byte ie_type, dword
6391 && appl->Id 6391 && appl->Id
6392 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask) 6392 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask)
6393 { 6393 {
6394 iesent = TRUE; 6394 iesent = true;
6395 dbug(1,dprintf("Mlt_NCR_Ind")); 6395 dbug(1,dprintf("Mlt_NCR_Ind"));
6396 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element); 6396 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element);
6397 } 6397 }
@@ -6403,7 +6403,7 @@ byte SendMultiIE(PLCI * plci, dword Id, byte * * parms, byte ie_type, dword
6403 { 6403 {
6404 if(test_c_ind_mask_bit (plci, j)) 6404 if(test_c_ind_mask_bit (plci, j))
6405 { 6405 {
6406 iesent = TRUE; 6406 iesent = true;
6407 dbug(1,dprintf("Mlt_Ovl_Ind")); 6407 dbug(1,dprintf("Mlt_Ovl_Ind"));
6408 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element); 6408 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6409 } 6409 }
@@ -6412,7 +6412,7 @@ byte SendMultiIE(PLCI * plci, dword Id, byte * * parms, byte ie_type, dword
6412 else if(Info_Number 6412 else if(Info_Number
6413 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask) 6413 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask)
6414 { 6414 {
6415 iesent = TRUE; 6415 iesent = true;
6416 dbug(1,dprintf("Mlt_Std_Ind")); 6416 dbug(1,dprintf("Mlt_Std_Ind"));
6417 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element); 6417 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6418 } 6418 }
@@ -6812,7 +6812,7 @@ void nl_ind(PLCI * plci)
6812 } 6812 }
6813 if (((plci->NL.Ind & 0x0f) == N_DISC) || ((plci->NL.Ind & 0x0f) == N_DISC_ACK)) 6813 if (((plci->NL.Ind & 0x0f) == N_DISC) || ((plci->NL.Ind & 0x0f) == N_DISC_ACK))
6814 { 6814 {
6815 if (((T30_INFO *)plci->NL.RBuffer->P)->code < sizeof(fax_info) / sizeof(fax_info[0])) 6815 if (((T30_INFO *)plci->NL.RBuffer->P)->code < ARRAY_SIZE(fax_info))
6816 info = fax_info[((T30_INFO *)plci->NL.RBuffer->P)->code]; 6816 info = fax_info[((T30_INFO *)plci->NL.RBuffer->P)->code];
6817 else 6817 else
6818 info = _FAX_PROTOCOL_ERROR; 6818 info = _FAX_PROTOCOL_ERROR;
@@ -6887,7 +6887,7 @@ void nl_ind(PLCI * plci)
6887 (byte)(plci->ncpi_buffer[0] + 1), plci->ncpi_buffer); 6887 (byte)(plci->ncpi_buffer[0] + 1), plci->ncpi_buffer);
6888 plci->ncpi_state |= NCPI_NEGOTIATE_B3_SENT; 6888 plci->ncpi_state |= NCPI_NEGOTIATE_B3_SENT;
6889 if (plci->nsf_control_bits & T30_NSF_CONTROL_BIT_NEGOTIATE_RESP) 6889 if (plci->nsf_control_bits & T30_NSF_CONTROL_BIT_NEGOTIATE_RESP)
6890 fax_send_edata_ack = FALSE; 6890 fax_send_edata_ack = false;
6891 } 6891 }
6892 6892
6893 if (a->manufacturer_features & MANUFACTURER_FEATURE_FAX_PAPER_FORMATS) 6893 if (a->manufacturer_features & MANUFACTURER_FEATURE_FAX_PAPER_FORMATS)
@@ -6928,7 +6928,7 @@ void nl_ind(PLCI * plci)
6928 sendf(plci->appl,_DISCONNECT_B3_I,Id,0,"wS",GOOD,plci->ncpi_buffer); 6928 sendf(plci->appl,_DISCONNECT_B3_I,Id,0,"wS",GOOD,plci->ncpi_buffer);
6929 a->ncci_state[ncci] = INC_DIS_PENDING; 6929 a->ncci_state[ncci] = INC_DIS_PENDING;
6930 plci->ncpi_state = 0; 6930 plci->ncpi_state = 0;
6931 fax_send_edata_ack = FALSE; 6931 fax_send_edata_ack = false;
6932 } 6932 }
6933 break; 6933 break;
6934 } 6934 }
@@ -7025,7 +7025,7 @@ void nl_ind(PLCI * plci)
7025 } 7025 }
7026 if (plci->adjust_b_restore) 7026 if (plci->adjust_b_restore)
7027 { 7027 {
7028 plci->adjust_b_restore = FALSE; 7028 plci->adjust_b_restore = false;
7029 start_internal_command (Id, plci, adjust_b_restore); 7029 start_internal_command (Id, plci, adjust_b_restore);
7030 } 7030 }
7031 break; 7031 break;
@@ -7041,7 +7041,7 @@ void nl_ind(PLCI * plci)
7041 next_internal_command (Id, plci); 7041 next_internal_command (Id, plci);
7042 } 7042 }
7043 ncci_state = a->ncci_state[ncci]; 7043 ncci_state = a->ncci_state[ncci];
7044 ncci_remove (plci, ncci, FALSE); 7044 ncci_remove (plci, ncci, false);
7045 7045
7046 /* with N_DISC or N_DISC_ACK the IDI frees the respective */ 7046 /* with N_DISC or N_DISC_ACK the IDI frees the respective */
7047 /* channel, so we cannot store the state in ncci_state! The */ 7047 /* channel, so we cannot store the state in ncci_state! The */
@@ -7288,18 +7288,18 @@ word get_plci(DIVA_CAPI_ADAPTER * a)
7288 plci->msg_in_read_pos = MSG_IN_QUEUE_SIZE; 7288 plci->msg_in_read_pos = MSG_IN_QUEUE_SIZE;
7289 plci->msg_in_wrap_pos = MSG_IN_QUEUE_SIZE; 7289 plci->msg_in_wrap_pos = MSG_IN_QUEUE_SIZE;
7290 7290
7291 plci->data_sent = FALSE; 7291 plci->data_sent = false;
7292 plci->send_disc = 0; 7292 plci->send_disc = 0;
7293 plci->sig_global_req = 0; 7293 plci->sig_global_req = 0;
7294 plci->sig_remove_id = 0; 7294 plci->sig_remove_id = 0;
7295 plci->nl_global_req = 0; 7295 plci->nl_global_req = 0;
7296 plci->nl_remove_id = 0; 7296 plci->nl_remove_id = 0;
7297 plci->adv_nl = 0; 7297 plci->adv_nl = 0;
7298 plci->manufacturer = FALSE; 7298 plci->manufacturer = false;
7299 plci->call_dir = CALL_DIR_OUT | CALL_DIR_ORIGINATE; 7299 plci->call_dir = CALL_DIR_OUT | CALL_DIR_ORIGINATE;
7300 plci->spoofed_msg = 0; 7300 plci->spoofed_msg = 0;
7301 plci->ptyState = 0; 7301 plci->ptyState = 0;
7302 plci->cr_enquiry = FALSE; 7302 plci->cr_enquiry = false;
7303 plci->hangup_flow_ctrl_timer = 0; 7303 plci->hangup_flow_ctrl_timer = 0;
7304 7304
7305 plci->ncci_ring_list = 0; 7305 plci->ncci_ring_list = 0;
@@ -7972,7 +7972,7 @@ word add_b23(PLCI * plci, API_PARSE * bp)
7972 7972
7973 if(!bp->length && plci->tel) 7973 if(!bp->length && plci->tel)
7974 { 7974 {
7975 plci->adv_nl = TRUE; 7975 plci->adv_nl = true;
7976 dbug(1,dprintf("Default adv.Nl")); 7976 dbug(1,dprintf("Default adv.Nl"));
7977 add_p(plci,LLI,lli); 7977 add_p(plci,LLI,lli);
7978 plci->B2_prot = 1 /*XPARENT*/; 7978 plci->B2_prot = 1 /*XPARENT*/;
@@ -8022,7 +8022,7 @@ word add_b23(PLCI * plci, API_PARSE * bp)
8022 { 8022 {
8023 if(GET_WORD(bp_parms[1].info)!=1 8023 if(GET_WORD(bp_parms[1].info)!=1
8024 || GET_WORD(bp_parms[2].info)!=0) return _B2_NOT_SUPPORTED; 8024 || GET_WORD(bp_parms[2].info)!=0) return _B2_NOT_SUPPORTED;
8025 plci->adv_nl = TRUE; 8025 plci->adv_nl = true;
8026 } 8026 }
8027 else if(plci->tel) return _B2_NOT_SUPPORTED; 8027 else if(plci->tel) return _B2_NOT_SUPPORTED;
8028 8028
@@ -8840,7 +8840,7 @@ void send_data(PLCI * plci)
8840 plci->NL.X = plci->NData; 8840 plci->NL.X = plci->NData;
8841 plci->NL.ReqCh = a->ncci_ch[ncci]; 8841 plci->NL.ReqCh = a->ncci_ch[ncci];
8842 dbug(1,dprintf("%x:DREQ(%x:%x)",a->Id,plci->NL.Id,plci->NL.Req)); 8842 dbug(1,dprintf("%x:DREQ(%x:%x)",a->Id,plci->NL.Id,plci->NL.Req));
8843 plci->data_sent = TRUE; 8843 plci->data_sent = true;
8844 plci->data_sent_ptr = data->P; 8844 plci->data_sent_ptr = data->P;
8845 a->request(&plci->NL); 8845 a->request(&plci->NL);
8846 } 8846 }
@@ -8995,10 +8995,10 @@ void IndParse(PLCI * plci, word * parms_id, byte ** parms, byte multiIEsize)
8995byte ie_compare(byte * ie1, byte * ie2) 8995byte ie_compare(byte * ie1, byte * ie2)
8996{ 8996{
8997 word i; 8997 word i;
8998 if(!ie1 || ! ie2) return FALSE; 8998 if(!ie1 || ! ie2) return false;
8999 if(!ie1[0]) return FALSE; 8999 if(!ie1[0]) return false;
9000 for(i=0;i<(word)(ie1[0]+1);i++) if(ie1[i]!=ie2[i]) return FALSE; 9000 for(i=0;i<(word)(ie1[0]+1);i++) if(ie1[i]!=ie2[i]) return false;
9001 return TRUE; 9001 return true;
9002} 9002}
9003 9003
9004word find_cip(DIVA_CAPI_ADAPTER * a, byte * bc, byte * hlc) 9004word find_cip(DIVA_CAPI_ADAPTER * a, byte * bc, byte * hlc)
@@ -9151,7 +9151,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
9151 plci->tel=ADV_VOICE; 9151 plci->tel=ADV_VOICE;
9152 } 9152 }
9153 a->AdvSignalAppl = appl; 9153 a->AdvSignalAppl = appl;
9154 a->AdvCodecFLAG = TRUE; 9154 a->AdvCodecFLAG = true;
9155 a->AdvCodecPLCI = splci; 9155 a->AdvCodecPLCI = splci;
9156 add_p(splci,CAI,"\x01\x15"); 9156 add_p(splci,CAI,"\x01\x15");
9157 add_p(splci,LLI,"\x01\x00"); 9157 add_p(splci,LLI,"\x01\x00");
@@ -9183,7 +9183,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
9183 add_p(splci,UID,"\x06\x43\x61\x70\x69\x32\x30"); 9183 add_p(splci,UID,"\x06\x43\x61\x70\x69\x32\x30");
9184 sig_req(splci,ASSIGN,0xC0); /* 0xc0 is the TEL_ID */ 9184 sig_req(splci,ASSIGN,0xC0); /* 0xc0 is the TEL_ID */
9185 send_req(splci); 9185 send_req(splci);
9186 a->scom_appl_disable = TRUE; 9186 a->scom_appl_disable = true;
9187 } 9187 }
9188 else{ 9188 else{
9189 return 0x2001; /* wrong state, no more plcis */ 9189 return 0x2001; /* wrong state, no more plcis */
@@ -9411,7 +9411,7 @@ word CapiRelease(word Id)
9411 } 9411 }
9412 if(a->AdvSignalAppl==this) 9412 if(a->AdvSignalAppl==this)
9413 { 9413 {
9414 this->NullCREnable = FALSE; 9414 this->NullCREnable = false;
9415 if (a->AdvCodecPLCI) 9415 if (a->AdvCodecPLCI)
9416 { 9416 {
9417 plci_remove(a->AdvCodecPLCI); 9417 plci_remove(a->AdvCodecPLCI);
@@ -9433,7 +9433,7 @@ word CapiRelease(word Id)
9433 9433
9434static word plci_remove_check(PLCI *plci) 9434static word plci_remove_check(PLCI *plci)
9435{ 9435{
9436 if(!plci) return TRUE; 9436 if(!plci) return true;
9437 if(!plci->NL.Id && c_ind_mask_empty (plci)) 9437 if(!plci->NL.Id && c_ind_mask_empty (plci))
9438 { 9438 {
9439 if(plci->Sig.Id == 0xff) 9439 if(plci->Sig.Id == 0xff)
@@ -9446,7 +9446,7 @@ static word plci_remove_check(PLCI *plci)
9446 { 9446 {
9447 CodecIdCheck(plci->adapter, plci); 9447 CodecIdCheck(plci->adapter, plci);
9448 clear_b1_config (plci); 9448 clear_b1_config (plci);
9449 ncci_remove (plci, 0, FALSE); 9449 ncci_remove (plci, 0, false);
9450 plci_free_msg_in_queue (plci); 9450 plci_free_msg_in_queue (plci);
9451 channel_flow_control_remove (plci); 9451 channel_flow_control_remove (plci);
9452 plci->Id = 0; 9452 plci->Id = 0;
@@ -9456,10 +9456,10 @@ static word plci_remove_check(PLCI *plci)
9456 plci->notifiedcall = 0; 9456 plci->notifiedcall = 0;
9457 } 9457 }
9458 listen_check(plci->adapter); 9458 listen_check(plci->adapter);
9459 return TRUE; 9459 return true;
9460 } 9460 }
9461 } 9461 }
9462 return FALSE; 9462 return false;
9463} 9463}
9464 9464
9465 9465
@@ -9564,7 +9564,7 @@ static struct
9564 9564
9565}; 9565};
9566 9566
9567#define DTMF_DIGIT_MAP_ENTRIES (sizeof(dtmf_digit_map) / sizeof(dtmf_digit_map[0])) 9567#define DTMF_DIGIT_MAP_ENTRIES ARRAY_SIZE(dtmf_digit_map)
9568 9568
9569 9569
9570static void dtmf_enable_receiver (PLCI *plci, byte enable_mask) 9570static void dtmf_enable_receiver (PLCI *plci, byte enable_mask)
@@ -9815,7 +9815,7 @@ static void dtmf_command (dword Id, PLCI *plci, byte Rc)
9815 } 9815 }
9816 plci->dtmf_rec_active &= ~mask; 9816 plci->dtmf_rec_active &= ~mask;
9817 plci->internal_command = DTMF_COMMAND_2; 9817 plci->internal_command = DTMF_COMMAND_2;
9818 dtmf_enable_receiver (plci, FALSE); 9818 dtmf_enable_receiver (plci, false);
9819 return; 9819 return;
9820 } 9820 }
9821 Rc = OK; 9821 Rc = OK;
@@ -10020,7 +10020,7 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
10020 } 10020 }
10021 } 10021 }
10022 start_internal_command (Id, plci, dtmf_command); 10022 start_internal_command (Id, plci, dtmf_command);
10023 return (FALSE); 10023 return (false);
10024 10024
10025 10025
10026 case DTMF_SEND_TONE: 10026 case DTMF_SEND_TONE:
@@ -10069,8 +10069,7 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
10069 PUT_WORD (&result[1], DTMF_INCORRECT_DIGIT); 10069 PUT_WORD (&result[1], DTMF_INCORRECT_DIGIT);
10070 break; 10070 break;
10071 } 10071 }
10072 if (plci->dtmf_send_requests >= 10072 if (plci->dtmf_send_requests >= ARRAY_SIZE(plci->dtmf_msg_number_queue))
10073 sizeof(plci->dtmf_msg_number_queue) / sizeof(plci->dtmf_msg_number_queue[0]))
10074 { 10073 {
10075 dbug (1, dprintf ("[%06lx] %s,%d: DTMF request overrun", 10074 dbug (1, dprintf ("[%06lx] %s,%d: DTMF request overrun",
10076 UnMapId (Id), (char *)(FILE_), __LINE__)); 10075 UnMapId (Id), (char *)(FILE_), __LINE__));
@@ -10079,7 +10078,7 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
10079 } 10078 }
10080 api_save_msg (dtmf_parms, "wwws", &plci->saved_msg); 10079 api_save_msg (dtmf_parms, "wwws", &plci->saved_msg);
10081 start_internal_command (Id, plci, dtmf_command); 10080 start_internal_command (Id, plci, dtmf_command);
10082 return (FALSE); 10081 return (false);
10083 10082
10084 default: 10083 default:
10085 dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x", 10084 dbug (1, dprintf ("[%06lx] %s,%d: DTMF unknown request %04x",
@@ -10090,7 +10089,7 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
10090 } 10089 }
10091 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, 10090 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
10092 "wws", Info, SELECTOR_DTMF, result); 10091 "wws", Info, SELECTOR_DTMF, result);
10093 return (FALSE); 10092 return (false);
10094} 10093}
10095 10094
10096 10095
@@ -10842,10 +10841,10 @@ static struct
10842 byte to_pc; 10841 byte to_pc;
10843} xconnect_write_prog[] = 10842} xconnect_write_prog[] =
10844{ 10843{
10845 { LI_COEF_CH_CH, FALSE, FALSE }, 10844 { LI_COEF_CH_CH, false, false },
10846 { LI_COEF_CH_PC, FALSE, TRUE }, 10845 { LI_COEF_CH_PC, false, true },
10847 { LI_COEF_PC_CH, TRUE, FALSE }, 10846 { LI_COEF_PC_CH, true, false },
10848 { LI_COEF_PC_PC, TRUE, TRUE } 10847 { LI_COEF_PC_PC, true, true }
10849}; 10848};
10850 10849
10851 10850
@@ -10916,7 +10915,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
10916 { 10915 {
10917 dbug (1, dprintf ("[%06x] %s,%d: Channel id wiped out", 10916 dbug (1, dprintf ("[%06x] %s,%d: Channel id wiped out",
10918 UnMapId (Id), (char *)(FILE_), __LINE__)); 10917 UnMapId (Id), (char *)(FILE_), __LINE__));
10919 return (TRUE); 10918 return (true);
10920 } 10919 }
10921 i = a->li_base + (plci->li_bchannel_id - 1); 10920 i = a->li_base + (plci->li_bchannel_id - 1);
10922 j = plci->li_write_channel; 10921 j = plci->li_write_channel;
@@ -10927,7 +10926,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
10927 { 10926 {
10928 dbug (1, dprintf ("[%06lx] %s,%d: LI write coefs failed %02x", 10927 dbug (1, dprintf ("[%06lx] %s,%d: LI write coefs failed %02x",
10929 UnMapId (Id), (char *)(FILE_), __LINE__, Rc)); 10928 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
10930 return (FALSE); 10929 return (false);
10931 } 10930 }
10932 } 10931 }
10933 if (li_config_table[i].adapter->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT) 10932 if (li_config_table[i].adapter->manufacturer_features & MANUFACTURER_FEATURE_XCONNECT)
@@ -10969,7 +10968,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
10969 { 10968 {
10970 plci->internal_command = plci->li_write_command; 10969 plci->internal_command = plci->li_write_command;
10971 if (plci_nl_busy (plci)) 10970 if (plci_nl_busy (plci))
10972 return (TRUE); 10971 return (true);
10973 to_ch = (a->li_pri) ? plci->li_bchannel_id - 1 : 0; 10972 to_ch = (a->li_pri) ? plci->li_bchannel_id - 1 : 0;
10974 *(p++) = UDATA_REQUEST_XCONNECT_TO; 10973 *(p++) = UDATA_REQUEST_XCONNECT_TO;
10975 do 10974 do
@@ -11018,9 +11017,9 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11018 li_config_table[i].coef_table[j] ^= xconnect_write_prog[n].mask << 4; 11017 li_config_table[i].coef_table[j] ^= xconnect_write_prog[n].mask << 4;
11019 } 11018 }
11020 n++; 11019 n++;
11021 } while ((n < sizeof(xconnect_write_prog) / sizeof(xconnect_write_prog[0])) 11020 } while ((n < ARRAY_SIZE(xconnect_write_prog))
11022 && ((p - plci->internal_req_buffer) + 16 < INTERNAL_REQ_BUFFER_SIZE)); 11021 && ((p - plci->internal_req_buffer) + 16 < INTERNAL_REQ_BUFFER_SIZE));
11023 if (n == sizeof(xconnect_write_prog) / sizeof(xconnect_write_prog[0])) 11022 if (n == ARRAY_SIZE(xconnect_write_prog))
11024 { 11023 {
11025 do 11024 do
11026 { 11025 {
@@ -11050,7 +11049,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11050 { 11049 {
11051 plci->internal_command = plci->li_write_command; 11050 plci->internal_command = plci->li_write_command;
11052 if (plci_nl_busy (plci)) 11051 if (plci_nl_busy (plci))
11053 return (TRUE); 11052 return (true);
11054 if (a->li_pri) 11053 if (a->li_pri)
11055 { 11054 {
11056 *(p++) = UDATA_REQUEST_SET_MIXER_COEFS_PRI_SYNC; 11055 *(p++) = UDATA_REQUEST_SET_MIXER_COEFS_PRI_SYNC;
@@ -11090,7 +11089,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11090 ch_map[j+1] = (byte)(j+1); 11089 ch_map[j+1] = (byte)(j+1);
11091 } 11090 }
11092 } 11091 }
11093 for (n = 0; n < sizeof(mixer_write_prog_bri) / sizeof(mixer_write_prog_bri[0]); n++) 11092 for (n = 0; n < ARRAY_SIZE(mixer_write_prog_bri); n++)
11094 { 11093 {
11095 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch]; 11094 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch];
11096 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch]; 11095 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch];
@@ -11127,7 +11126,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11127 { 11126 {
11128 plci->internal_command = plci->li_write_command; 11127 plci->internal_command = plci->li_write_command;
11129 if (plci_nl_busy (plci)) 11128 if (plci_nl_busy (plci))
11130 return (TRUE); 11129 return (true);
11131 if (j < a->li_base) 11130 if (j < a->li_base)
11132 j = a->li_base; 11131 j = a->li_base;
11133 if (a->li_pri) 11132 if (a->li_pri)
@@ -11140,7 +11139,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11140 w |= MIXER_FEATURE_ENABLE_RX_DATA; 11139 w |= MIXER_FEATURE_ENABLE_RX_DATA;
11141 *(p++) = (byte) w; 11140 *(p++) = (byte) w;
11142 *(p++) = (byte)(w >> 8); 11141 *(p++) = (byte)(w >> 8);
11143 for (n = 0; n < sizeof(mixer_write_prog_pri) / sizeof(mixer_write_prog_pri[0]); n++) 11142 for (n = 0; n < ARRAY_SIZE(mixer_write_prog_pri); n++)
11144 { 11143 {
11145 *(p++) = (byte)((plci->li_bchannel_id - 1) | mixer_write_prog_pri[n].line_flags); 11144 *(p++) = (byte)((plci->li_bchannel_id - 1) | mixer_write_prog_pri[n].line_flags);
11146 for (j = a->li_base; j < a->li_base + MIXER_CHANNELS_PRI; j++) 11145 for (j = a->li_base; j < a->li_base + MIXER_CHANNELS_PRI; j++)
@@ -11196,7 +11195,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11196 ch_map[j+1] = (byte)(j+1); 11195 ch_map[j+1] = (byte)(j+1);
11197 } 11196 }
11198 } 11197 }
11199 for (n = 0; n < sizeof(mixer_write_prog_bri) / sizeof(mixer_write_prog_bri[0]); n++) 11198 for (n = 0; n < ARRAY_SIZE(mixer_write_prog_bri); n++)
11200 { 11199 {
11201 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch]; 11200 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch];
11202 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch]; 11201 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch];
@@ -11232,7 +11231,7 @@ static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
11232 plci->NL.Req = plci->nl_req = (byte) N_UDATA; 11231 plci->NL.Req = plci->nl_req = (byte) N_UDATA;
11233 plci->adapter->request (&plci->NL); 11232 plci->adapter->request (&plci->NL);
11234 } 11233 }
11235 return (TRUE); 11234 return (true);
11236} 11235}
11237 11236
11238 11237
@@ -11251,7 +11250,7 @@ static void mixer_notify_update (PLCI *plci, byte others)
11251 if (a->profile.Global_Options & GL_LINE_INTERCONNECT_SUPPORTED) 11250 if (a->profile.Global_Options & GL_LINE_INTERCONNECT_SUPPORTED)
11252 { 11251 {
11253 if (others) 11252 if (others)
11254 plci->li_notify_update = TRUE; 11253 plci->li_notify_update = true;
11255 i = 0; 11254 i = 0;
11256 do 11255 do
11257 { 11256 {
@@ -11277,7 +11276,7 @@ static void mixer_notify_update (PLCI *plci, byte others)
11277 && (notify_plci->State) 11276 && (notify_plci->State)
11278 && notify_plci->NL.Id && !notify_plci->nl_remove_id) 11277 && notify_plci->NL.Id && !notify_plci->nl_remove_id)
11279 { 11278 {
11280 notify_plci->li_notify_update = TRUE; 11279 notify_plci->li_notify_update = true;
11281 ((CAPI_MSG *) msg)->header.length = 18; 11280 ((CAPI_MSG *) msg)->header.length = 18;
11282 ((CAPI_MSG *) msg)->header.appl_id = notify_plci->appl->Id; 11281 ((CAPI_MSG *) msg)->header.appl_id = notify_plci->appl->Id;
11283 ((CAPI_MSG *) msg)->header.command = _FACILITY_R; 11282 ((CAPI_MSG *) msg)->header.command = _FACILITY_R;
@@ -11299,12 +11298,12 @@ static void mixer_notify_update (PLCI *plci, byte others)
11299 (char *)(FILE_), __LINE__, 11298 (char *)(FILE_), __LINE__,
11300 (dword)((notify_plci->Id << 8) | UnMapController (notify_plci->adapter->Id)), w)); 11299 (dword)((notify_plci->Id << 8) | UnMapController (notify_plci->adapter->Id)), w));
11301 } 11300 }
11302 notify_plci->li_notify_update = FALSE; 11301 notify_plci->li_notify_update = false;
11303 } 11302 }
11304 } 11303 }
11305 } while (others && (notify_plci != NULL)); 11304 } while (others && (notify_plci != NULL));
11306 if (others) 11305 if (others)
11307 plci->li_notify_update = FALSE; 11306 plci->li_notify_update = false;
11308 } 11307 }
11309} 11308}
11310 11309
@@ -11318,7 +11317,7 @@ static void mixer_clear_config (PLCI *plci)
11318 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)), 11317 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
11319 (char *)(FILE_), __LINE__)); 11318 (char *)(FILE_), __LINE__));
11320 11319
11321 plci->li_notify_update = FALSE; 11320 plci->li_notify_update = false;
11322 plci->li_plci_b_write_pos = 0; 11321 plci->li_plci_b_write_pos = 0;
11323 plci->li_plci_b_read_pos = 0; 11322 plci->li_plci_b_read_pos = 0;
11324 plci->li_plci_b_req_pos = 0; 11323 plci->li_plci_b_req_pos = 0;
@@ -12159,7 +12158,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12159 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]); 12158 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]);
12160 if (plci_b == NULL) 12159 if (plci_b == NULL)
12161 break; 12160 break;
12162 li_update_connect (Id, a, plci, plci_b_id, TRUE, li_flags); 12161 li_update_connect (Id, a, plci, plci_b_id, true, li_flags);
12163 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_LAST_FLAG; 12162 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_LAST_FLAG;
12164 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1; 12163 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1;
12165 plci->li_plci_b_write_pos = plci_b_write_pos; 12164 plci->li_plci_b_write_pos = plci_b_write_pos;
@@ -12188,7 +12187,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12188 plci_b_write_pos = plci->li_plci_b_write_pos; 12187 plci_b_write_pos = plci->li_plci_b_write_pos;
12189 participant_parms_pos = 0; 12188 participant_parms_pos = 0;
12190 result_pos = 7; 12189 result_pos = 7;
12191 li2_update_connect (Id, a, plci, UnMapId (Id), TRUE, li_flags); 12190 li2_update_connect (Id, a, plci, UnMapId (Id), true, li_flags);
12192 while (participant_parms_pos < li_req_parms[1].length) 12191 while (participant_parms_pos < li_req_parms[1].length)
12193 { 12192 {
12194 result[result_pos] = 6; 12193 result[result_pos] = 6;
@@ -12224,7 +12223,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12224 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]); 12223 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]);
12225 if (plci_b != NULL) 12224 if (plci_b != NULL)
12226 { 12225 {
12227 li2_update_connect (Id, a, plci, plci_b_id, TRUE, li_flags); 12226 li2_update_connect (Id, a, plci, plci_b_id, true, li_flags);
12228 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | 12227 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id |
12229 ((li_flags & (LI2_FLAG_INTERCONNECT_A_B | LI2_FLAG_INTERCONNECT_B_A | 12228 ((li_flags & (LI2_FLAG_INTERCONNECT_A_B | LI2_FLAG_INTERCONNECT_B_A |
12230 LI2_FLAG_PCCONNECT_A_B | LI2_FLAG_PCCONNECT_B_A)) ? 0 : LI_PLCI_B_DISC_FLAG); 12229 LI2_FLAG_PCCONNECT_A_B | LI2_FLAG_PCCONNECT_B_A)) ? 0 : LI_PLCI_B_DISC_FLAG);
@@ -12249,13 +12248,13 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12249 } 12248 }
12250 mixer_calculate_coefs (a); 12249 mixer_calculate_coefs (a);
12251 plci->li_channel_bits = li_config_table[a->li_base + (plci->li_bchannel_id - 1)].channel; 12250 plci->li_channel_bits = li_config_table[a->li_base + (plci->li_bchannel_id - 1)].channel;
12252 mixer_notify_update (plci, TRUE); 12251 mixer_notify_update (plci, true);
12253 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, 12252 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12254 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result); 12253 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result);
12255 plci->command = 0; 12254 plci->command = 0;
12256 plci->li_cmd = GET_WORD (li_parms[0].info); 12255 plci->li_cmd = GET_WORD (li_parms[0].info);
12257 start_internal_command (Id, plci, mixer_command); 12256 start_internal_command (Id, plci, mixer_command);
12258 return (FALSE); 12257 return (false);
12259 12258
12260 case LI_REQ_DISCONNECT: 12259 case LI_REQ_DISCONNECT:
12261 if (li_parms[1].length == 4) 12260 if (li_parms[1].length == 4)
@@ -12283,7 +12282,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12283 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]); 12282 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]);
12284 if (plci_b == NULL) 12283 if (plci_b == NULL)
12285 break; 12284 break;
12286 li_update_connect (Id, a, plci, plci_b_id, FALSE, 0); 12285 li_update_connect (Id, a, plci, plci_b_id, false, 0);
12287 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG | LI_PLCI_B_LAST_FLAG; 12286 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG | LI_PLCI_B_LAST_FLAG;
12288 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1; 12287 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1;
12289 plci->li_plci_b_write_pos = plci_b_write_pos; 12288 plci->li_plci_b_write_pos = plci_b_write_pos;
@@ -12345,7 +12344,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12345 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]); 12344 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]);
12346 if (plci_b != NULL) 12345 if (plci_b != NULL)
12347 { 12346 {
12348 li2_update_connect (Id, a, plci, plci_b_id, FALSE, 0); 12347 li2_update_connect (Id, a, plci, plci_b_id, false, 0);
12349 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG; 12348 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG;
12350 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1; 12349 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1;
12351 } 12350 }
@@ -12368,13 +12367,13 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12368 } 12367 }
12369 mixer_calculate_coefs (a); 12368 mixer_calculate_coefs (a);
12370 plci->li_channel_bits = li_config_table[a->li_base + (plci->li_bchannel_id - 1)].channel; 12369 plci->li_channel_bits = li_config_table[a->li_base + (plci->li_bchannel_id - 1)].channel;
12371 mixer_notify_update (plci, TRUE); 12370 mixer_notify_update (plci, true);
12372 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, 12371 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12373 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result); 12372 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result);
12374 plci->command = 0; 12373 plci->command = 0;
12375 plci->li_cmd = GET_WORD (li_parms[0].info); 12374 plci->li_cmd = GET_WORD (li_parms[0].info);
12376 start_internal_command (Id, plci, mixer_command); 12375 start_internal_command (Id, plci, mixer_command);
12377 return (FALSE); 12376 return (false);
12378 12377
12379 case LI_REQ_SILENT_UPDATE: 12378 case LI_REQ_SILENT_UPDATE:
12380 if (!plci || !plci->State 12379 if (!plci || !plci->State
@@ -12384,7 +12383,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12384 { 12383 {
12385 dbug (1, dprintf ("[%06lx] %s,%d: Wrong state", 12384 dbug (1, dprintf ("[%06lx] %s,%d: Wrong state",
12386 UnMapId (Id), (char *)(FILE_), __LINE__)); 12385 UnMapId (Id), (char *)(FILE_), __LINE__));
12387 return (FALSE); 12386 return (false);
12388 } 12387 }
12389 plci_b_write_pos = plci->li_plci_b_write_pos; 12388 plci_b_write_pos = plci->li_plci_b_write_pos;
12390 if (((plci->li_plci_b_read_pos > plci_b_write_pos) ? plci->li_plci_b_read_pos : 12389 if (((plci->li_plci_b_read_pos > plci_b_write_pos) ? plci->li_plci_b_read_pos :
@@ -12392,7 +12391,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12392 { 12391 {
12393 dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun", 12392 dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun",
12394 UnMapId (Id), (char *)(FILE_), __LINE__)); 12393 UnMapId (Id), (char *)(FILE_), __LINE__));
12395 return (FALSE); 12394 return (false);
12396 } 12395 }
12397 i = (plci_b_write_pos == 0) ? LI_PLCI_B_QUEUE_ENTRIES-1 : plci_b_write_pos - 1; 12396 i = (plci_b_write_pos == 0) ? LI_PLCI_B_QUEUE_ENTRIES-1 : plci_b_write_pos - 1;
12398 if ((plci_b_write_pos == plci->li_plci_b_read_pos) 12397 if ((plci_b_write_pos == plci->li_plci_b_read_pos)
@@ -12408,7 +12407,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12408 plci->command = 0; 12407 plci->command = 0;
12409 plci->li_cmd = GET_WORD (li_parms[0].info); 12408 plci->li_cmd = GET_WORD (li_parms[0].info);
12410 start_internal_command (Id, plci, mixer_command); 12409 start_internal_command (Id, plci, mixer_command);
12411 return (FALSE); 12410 return (false);
12412 12411
12413 default: 12412 default:
12414 dbug (1, dprintf ("[%06lx] %s,%d: LI unknown request %04x", 12413 dbug (1, dprintf ("[%06lx] %s,%d: LI unknown request %04x",
@@ -12418,7 +12417,7 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12418 } 12417 }
12419 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, 12418 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12420 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result); 12419 "wwS", Info, SELECTOR_LINE_INTERCONNECT, result);
12421 return (FALSE); 12420 return (false);
12422} 12421}
12423 12422
12424 12423
@@ -12523,7 +12522,7 @@ static void mixer_indication_xconnect_from (dword Id, PLCI *plci, byte *msg,
12523 if (!plci->internal_command) 12522 if (!plci->internal_command)
12524 next_internal_command (Id, plci); 12523 next_internal_command (Id, plci);
12525 } 12524 }
12526 mixer_notify_update (plci, TRUE); 12525 mixer_notify_update (plci, true);
12527} 12526}
12528 12527
12529 12528
@@ -12547,12 +12546,12 @@ static byte mixer_notify_source_removed (PLCI *plci, dword plci_b_id)
12547 dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun", 12546 dbug (1, dprintf ("[%06lx] %s,%d: LI request overrun",
12548 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)), 12547 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
12549 (char *)(FILE_), __LINE__)); 12548 (char *)(FILE_), __LINE__));
12550 return (FALSE); 12549 return (false);
12551 } 12550 }
12552 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG; 12551 plci->li_plci_b_queue[plci_b_write_pos] = plci_b_id | LI_PLCI_B_DISC_FLAG;
12553 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1; 12552 plci_b_write_pos = (plci_b_write_pos == LI_PLCI_B_QUEUE_ENTRIES-1) ? 0 : plci_b_write_pos + 1;
12554 plci->li_plci_b_write_pos = plci_b_write_pos; 12553 plci->li_plci_b_write_pos = plci_b_write_pos;
12555 return (TRUE); 12554 return (true);
12556} 12555}
12557 12556
12558 12557
@@ -12596,7 +12595,7 @@ static void mixer_remove (PLCI *plci)
12596 } 12595 }
12597 mixer_clear_config (plci); 12596 mixer_clear_config (plci);
12598 mixer_calculate_coefs (a); 12597 mixer_calculate_coefs (a);
12599 mixer_notify_update (plci, TRUE); 12598 mixer_notify_update (plci, true);
12600 } 12599 }
12601 li_config_table[i].plci = NULL; 12600 li_config_table[i].plci = NULL;
12602 plci->li_bchannel_id = 0; 12601 plci->li_bchannel_id = 0;
@@ -12883,29 +12882,29 @@ static byte ec_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *p
12883 case EC_ENABLE_OPERATION: 12882 case EC_ENABLE_OPERATION:
12884 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS; 12883 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS;
12885 start_internal_command (Id, plci, ec_command); 12884 start_internal_command (Id, plci, ec_command);
12886 return (FALSE); 12885 return (false);
12887 12886
12888 case EC_DISABLE_OPERATION: 12887 case EC_DISABLE_OPERATION:
12889 plci->ec_idi_options = LEC_ENABLE_ECHO_CANCELLER | 12888 plci->ec_idi_options = LEC_ENABLE_ECHO_CANCELLER |
12890 LEC_MANUAL_DISABLE | LEC_ENABLE_NONLINEAR_PROCESSING | 12889 LEC_MANUAL_DISABLE | LEC_ENABLE_NONLINEAR_PROCESSING |
12891 LEC_RESET_COEFFICIENTS; 12890 LEC_RESET_COEFFICIENTS;
12892 start_internal_command (Id, plci, ec_command); 12891 start_internal_command (Id, plci, ec_command);
12893 return (FALSE); 12892 return (false);
12894 12893
12895 case EC_FREEZE_COEFFICIENTS: 12894 case EC_FREEZE_COEFFICIENTS:
12896 plci->ec_idi_options |= LEC_FREEZE_COEFFICIENTS; 12895 plci->ec_idi_options |= LEC_FREEZE_COEFFICIENTS;
12897 start_internal_command (Id, plci, ec_command); 12896 start_internal_command (Id, plci, ec_command);
12898 return (FALSE); 12897 return (false);
12899 12898
12900 case EC_RESUME_COEFFICIENT_UPDATE: 12899 case EC_RESUME_COEFFICIENT_UPDATE:
12901 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS; 12900 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS;
12902 start_internal_command (Id, plci, ec_command); 12901 start_internal_command (Id, plci, ec_command);
12903 return (FALSE); 12902 return (false);
12904 12903
12905 case EC_RESET_COEFFICIENTS: 12904 case EC_RESET_COEFFICIENTS:
12906 plci->ec_idi_options |= LEC_RESET_COEFFICIENTS; 12905 plci->ec_idi_options |= LEC_RESET_COEFFICIENTS;
12907 start_internal_command (Id, plci, ec_command); 12906 start_internal_command (Id, plci, ec_command);
12908 return (FALSE); 12907 return (false);
12909 12908
12910 default: 12909 default:
12911 dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x", 12910 dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x",
@@ -12978,14 +12977,14 @@ static byte ec_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *p
12978 case EC_ENABLE_OPERATION: 12977 case EC_ENABLE_OPERATION:
12979 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS; 12978 plci->ec_idi_options &= ~LEC_FREEZE_COEFFICIENTS;
12980 start_internal_command (Id, plci, ec_command); 12979 start_internal_command (Id, plci, ec_command);
12981 return (FALSE); 12980 return (false);
12982 12981
12983 case EC_DISABLE_OPERATION: 12982 case EC_DISABLE_OPERATION:
12984 plci->ec_idi_options = LEC_ENABLE_ECHO_CANCELLER | 12983 plci->ec_idi_options = LEC_ENABLE_ECHO_CANCELLER |
12985 LEC_MANUAL_DISABLE | LEC_ENABLE_NONLINEAR_PROCESSING | 12984 LEC_MANUAL_DISABLE | LEC_ENABLE_NONLINEAR_PROCESSING |
12986 LEC_RESET_COEFFICIENTS; 12985 LEC_RESET_COEFFICIENTS;
12987 start_internal_command (Id, plci, ec_command); 12986 start_internal_command (Id, plci, ec_command);
12988 return (FALSE); 12987 return (false);
12989 12988
12990 default: 12989 default:
12991 dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x", 12990 dbug (1, dprintf ("[%06lx] %s,%d: EC unknown request %04x",
@@ -12999,7 +12998,7 @@ static byte ec_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *p
12999 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number, 12998 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
13000 "wws", Info, (appl->appl_flags & APPL_FLAG_PRIV_EC_SPEC) ? 12999 "wws", Info, (appl->appl_flags & APPL_FLAG_PRIV_EC_SPEC) ?
13001 PRIV_SELECTOR_ECHO_CANCELLER : SELECTOR_ECHO_CANCELLER, result); 13000 PRIV_SELECTOR_ECHO_CANCELLER : SELECTOR_ECHO_CANCELLER, result);
13002 return (FALSE); 13001 return (false);
13003} 13002}
13004 13003
13005 13004
@@ -13178,7 +13177,7 @@ static void adv_voice_write_coefs (PLCI *plci, word write_command)
13178 ch_map[j] = (byte)(j + (plci->li_bchannel_id - 1)); 13177 ch_map[j] = (byte)(j + (plci->li_bchannel_id - 1));
13179 ch_map[j+1] = (byte)(j + (2 - plci->li_bchannel_id)); 13178 ch_map[j+1] = (byte)(j + (2 - plci->li_bchannel_id));
13180 } 13179 }
13181 for (n = 0; n < sizeof(mixer_write_prog_bri) / sizeof(mixer_write_prog_bri[0]); n++) 13180 for (n = 0; n < ARRAY_SIZE(mixer_write_prog_bri); n++)
13182 { 13181 {
13183 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch]; 13182 i = a->li_base + ch_map[mixer_write_prog_bri[n].to_ch];
13184 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch]; 13183 j = a->li_base + ch_map[mixer_write_prog_bri[n].from_ch];
@@ -13563,7 +13562,7 @@ static void adjust_b_clear (PLCI *plci)
13563 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)), 13562 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13564 (char *)(FILE_), __LINE__)); 13563 (char *)(FILE_), __LINE__));
13565 13564
13566 plci->adjust_b_restore = FALSE; 13565 plci->adjust_b_restore = false;
13567} 13566}
13568 13567
13569 13568
@@ -13832,7 +13831,7 @@ static word adjust_b_process (dword Id, PLCI *plci, byte Rc)
13832 } 13831 }
13833 if (plci->adjust_b_mode & ADJUST_B_MODE_USER_CONNECT) 13832 if (plci->adjust_b_mode & ADJUST_B_MODE_USER_CONNECT)
13834 { 13833 {
13835 plci->adjust_b_restore = TRUE; 13834 plci->adjust_b_restore = true;
13836 break; 13835 break;
13837 } 13836 }
13838 plci->adjust_b_state = ADJUST_B_CONNECT_1; 13837 plci->adjust_b_state = ADJUST_B_CONNECT_1;
@@ -14603,7 +14602,7 @@ static void channel_request_xon (PLCI * plci, byte ch) {
14603 14602
14604static void channel_xmit_extended_xon (PLCI * plci) { 14603static void channel_xmit_extended_xon (PLCI * plci) {
14605 DIVA_CAPI_ADAPTER * a; 14604 DIVA_CAPI_ADAPTER * a;
14606 int max_ch = sizeof(a->ch_flow_control)/sizeof(a->ch_flow_control[0]); 14605 int max_ch = ARRAY_SIZE(a->ch_flow_control);
14607 int i, one_requested = 0; 14606 int i, one_requested = 0;
14608 14607
14609 if ((!plci) || (!plci->Id) || ((a = plci->adapter) == 0)) { 14608 if ((!plci) || (!plci->Id) || ((a = plci->adapter) == 0)) {
@@ -14628,7 +14627,7 @@ static void channel_xmit_extended_xon (PLCI * plci) {
14628 Try to xmit next X_ON 14627 Try to xmit next X_ON
14629 */ 14628 */
14630static int find_channel_with_pending_x_on (DIVA_CAPI_ADAPTER * a, PLCI * plci) { 14629static int find_channel_with_pending_x_on (DIVA_CAPI_ADAPTER * a, PLCI * plci) {
14631 int max_ch = sizeof(a->ch_flow_control)/sizeof(a->ch_flow_control[0]); 14630 int max_ch = ARRAY_SIZE(a->ch_flow_control);
14632 int i; 14631 int i;
14633 14632
14634 if (!(plci->adapter->manufacturer_features & MANUFACTURER_FEATURE_XONOFF_FLOW_CONTROL)) { 14633 if (!(plci->adapter->manufacturer_features & MANUFACTURER_FEATURE_XONOFF_FLOW_CONTROL)) {
@@ -14768,19 +14767,19 @@ static void group_optimization(DIVA_CAPI_ADAPTER * a, PLCI * plci)
14768 { 14767 {
14769 if(application[i].Id && a->CIP_Mask[i] ) 14768 if(application[i].Id && a->CIP_Mask[i] )
14770 { 14769 {
14771 for(k=0,busy=FALSE; k<a->max_plci; k++) 14770 for(k=0,busy=false; k<a->max_plci; k++)
14772 { 14771 {
14773 if(a->plci[k].Id) 14772 if(a->plci[k].Id)
14774 { 14773 {
14775 auxplci = &a->plci[k]; 14774 auxplci = &a->plci[k];
14776 if(auxplci->appl == &application[i]) /* application has a busy PLCI */ 14775 if(auxplci->appl == &application[i]) /* application has a busy PLCI */
14777 { 14776 {
14778 busy = TRUE; 14777 busy = true;
14779 dbug(1,dprintf("Appl 0x%x is busy",i+1)); 14778 dbug(1,dprintf("Appl 0x%x is busy",i+1));
14780 } 14779 }
14781 else if(test_c_ind_mask_bit (auxplci, i)) /* application has an incoming call pending */ 14780 else if(test_c_ind_mask_bit (auxplci, i)) /* application has an incoming call pending */
14782 { 14781 {
14783 busy = TRUE; 14782 busy = true;
14784 dbug(1,dprintf("Appl 0x%x has inc. call pending",i+1)); 14783 dbug(1,dprintf("Appl 0x%x has inc. call pending",i+1));
14785 } 14784 }
14786 } 14785 }
@@ -14791,13 +14790,13 @@ static void group_optimization(DIVA_CAPI_ADAPTER * a, PLCI * plci)
14791 if(j==MAX_CIP_TYPES) /* all groups are in use but group still not found */ 14790 if(j==MAX_CIP_TYPES) /* all groups are in use but group still not found */
14792 { /* the MAX_CIP_TYPES group enables all calls because of field overflow */ 14791 { /* the MAX_CIP_TYPES group enables all calls because of field overflow */
14793 appl_number_group_type[i] = MAX_CIP_TYPES; 14792 appl_number_group_type[i] = MAX_CIP_TYPES;
14794 group_found=TRUE; 14793 group_found=true;
14795 dbug(1,dprintf("Field overflow appl 0x%x",i+1)); 14794 dbug(1,dprintf("Field overflow appl 0x%x",i+1));
14796 } 14795 }
14797 else if( (info_mask_group[j]==a->CIP_Mask[i]) && (cip_mask_group[j]==a->Info_Mask[i]) ) 14796 else if( (info_mask_group[j]==a->CIP_Mask[i]) && (cip_mask_group[j]==a->Info_Mask[i]) )
14798 { /* is group already present ? */ 14797 { /* is group already present ? */
14799 appl_number_group_type[i] = j|0x80; /* store the group number for each application */ 14798 appl_number_group_type[i] = j|0x80; /* store the group number for each application */
14800 group_found=TRUE; 14799 group_found=true;
14801 dbug(1,dprintf("Group 0x%x found with appl 0x%x, CIP=0x%lx",appl_number_group_type[i],i+1,info_mask_group[j])); 14800 dbug(1,dprintf("Group 0x%x found with appl 0x%x, CIP=0x%lx",appl_number_group_type[i],i+1,info_mask_group[j]));
14802 } 14801 }
14803 else if(!info_mask_group[j]) 14802 else if(!info_mask_group[j])
@@ -14805,7 +14804,7 @@ static void group_optimization(DIVA_CAPI_ADAPTER * a, PLCI * plci)
14805 appl_number_group_type[i] = j|0x80; /* store the group number for each application */ 14804 appl_number_group_type[i] = j|0x80; /* store the group number for each application */
14806 info_mask_group[j] = a->CIP_Mask[i]; /* store the new CIP mask for the new group */ 14805 info_mask_group[j] = a->CIP_Mask[i]; /* store the new CIP mask for the new group */
14807 cip_mask_group[j] = a->Info_Mask[i]; /* store the new Info_Mask for this new group */ 14806 cip_mask_group[j] = a->Info_Mask[i]; /* store the new Info_Mask for this new group */
14808 group_found=TRUE; 14807 group_found=true;
14809 dbug(1,dprintf("New Group 0x%x established with appl 0x%x, CIP=0x%lx",appl_number_group_type[i],i+1,info_mask_group[j])); 14808 dbug(1,dprintf("New Group 0x%x established with appl 0x%x, CIP=0x%lx",appl_number_group_type[i],i+1,info_mask_group[j]));
14810 } 14809 }
14811 } 14810 }
@@ -14860,7 +14859,7 @@ word CapiRegister(word id)
14860 } 14859 }
14861 } 14860 }
14862 14861
14863 if(appls_found) return TRUE; 14862 if(appls_found) return true;
14864 for(i=0; i<max_adapter; i++) /* scan all adapters... */ 14863 for(i=0; i<max_adapter; i++) /* scan all adapters... */
14865 { 14864 {
14866 a = &adapter[i]; 14865 a = &adapter[i];
@@ -14889,7 +14888,7 @@ word CapiRegister(word id)
14889 } 14888 }
14890 } 14889 }
14891 } 14890 }
14892 return FALSE; 14891 return false;
14893} 14892}
14894 14893
14895/*------------------------------------------------------------------*/ 14894/*------------------------------------------------------------------*/
diff --git a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c
index a296a846f29..903356547b7 100644
--- a/drivers/isdn/hardware/eicon/os_pri.c
+++ b/drivers/isdn/hardware/eicon/os_pri.c
@@ -487,7 +487,7 @@ diva_pri_start_adapter(PISDN_ADAPTER IoAdapter,
487 } 487 }
488 DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, boot); 488 DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, boot);
489 489
490 IoAdapter->Initialized = TRUE; 490 IoAdapter->Initialized = true;
491 491
492 /* 492 /*
493 Check Interrupt 493 Check Interrupt
@@ -504,7 +504,7 @@ diva_pri_start_adapter(PISDN_ADAPTER IoAdapter,
504 if (!IoAdapter->IrqCount) { 504 if (!IoAdapter->IrqCount) {
505 DBG_ERR(("A: A(%d) interrupt test failed", 505 DBG_ERR(("A: A(%d) interrupt test failed",
506 IoAdapter->ANum)) 506 IoAdapter->ANum))
507 IoAdapter->Initialized = FALSE; 507 IoAdapter->Initialized = false;
508 IoAdapter->stop(IoAdapter); 508 IoAdapter->stop(IoAdapter);
509 return (-1); 509 return (-1);
510 } 510 }
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index 2444811e0b3..ff09f07f440 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -71,14 +71,6 @@
71#define qword u64 71#define qword u64
72#endif 72#endif
73 73
74#ifndef TRUE
75#define TRUE 1
76#endif
77
78#ifndef FALSE
79#define FALSE 0
80#endif
81
82#ifndef NULL 74#ifndef NULL
83#define NULL ((void *) 0) 75#define NULL ((void *) 0)
84#endif 76#endif
@@ -131,10 +123,6 @@
131#define DIVA_OS_MEM_DETACH_CONFIG(a, x) do { } while(0) 123#define DIVA_OS_MEM_DETACH_CONFIG(a, x) do { } while(0)
132#define DIVA_OS_MEM_DETACH_CONTROL(a, x) do { } while(0) 124#define DIVA_OS_MEM_DETACH_CONTROL(a, x) do { } while(0)
133 125
134#if !defined(DIM)
135#define DIM(array) (sizeof (array)/sizeof ((array)[0]))
136#endif
137
138#define DIVA_INVALID_FILE_HANDLE ((dword)(-1)) 126#define DIVA_INVALID_FILE_HANDLE ((dword)(-1))
139 127
140#define DIVAS_CONTAINING_RECORD(address, type, field) \ 128#define DIVAS_CONTAINING_RECORD(address, type, field) \