Routines to gather information about ports and dialers from
Copyright (C) 1991, 1992 Ian Lance Taylor
This file is part of the Taylor UUCP package.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author of the program may be contacted at ian@airs.com or
c/o AIRS, P.O. Box 520, Waltham, MA 02254.
Revision 1.20 1992/04/02 22:51:09 ian
Add gcc 2.0 format checking to ulog, and fixed discovered problems
Revision 1.19 1992/03/28 21:47:55 ian
David J. MacKenzie: allow backslash to quote newline in config files
Revision 1.18 1992/03/10 21:47:39 ian
Added protocol command for ports
Revision 1.17 1992/03/08 04:56:21 ian
Peter da Silva: added ``lockname'' command for ports
Revision 1.16 1992/03/03 06:06:48 ian
T. William Wells: don't complain about missing configuration files
Revision 1.15 1992/02/08 03:54:18 ian
Include <string.h> only in <uucp.h>, added 1992 copyright
Revision 1.14 1992/01/14 04:04:17 ian
Chip Salzenberg: strcmp is a macro on AIX
Revision 1.13 1992/01/11 17:11:11 ian
Hannu Strang: avoid compiler bug by not using -> in address constant
Revision 1.12 1991/12/22 20:57:57 ian
Added externs for strcasecmp or strncasecmp
Revision 1.11 1991/12/17 23:14:08 ian
T. William Wells: allow dialer complete and abort to be chat scripts
Revision 1.10 1991/12/17 17:08:02 ian
Marc Unangst: allow true and false for boolean strings as documented
Revision 1.9 1991/12/15 03:42:33 ian
Added tprocess_chat_cmd for all chat commands, and added CMDTABTYPE_PREFIX
Revision 1.8 1991/12/09 18:26:33 ian
Richard Todd: handle "#" command generated by multiple dialer files
Revision 1.7 1991/12/02 21:25:36 ian
Niels Baggesen: protocol-parameter for ports and dialers didn't work
Revision 1.6 1991/11/30 22:55:03 ian
Marty Shannon: blew up if more than one port in port file!
Revision 1.5 1991/11/14 03:20:13 ian
Added seven-bit and reliable commands to help when selecting protocols
Revision 1.4 1991/11/13 20:38:00 ian
Added TCP port type for connections over TCP
Revision 1.3 1991/11/11 23:47:24 ian
Added chat-program to run a program to do a chat script
Revision 1.2 1991/11/11 16:59:05 ian
Eliminate fread_port_info, allow NULL pflock arg to ffind_port
Revision 1.1 1991/09/10 19:40:31 ian
char prtinf_rcsid
[] = "$Id: prtinf.c,v 1.20 1992/04/02 22:51:09 ian Rel $";
/* External functions. */
extern int strcasecmp ();
/* Ports are defined in a file. This file has to be both flexible and
easy to use. The format is described in a separate documentation
/* The string names of the port types. This array corresponds to the
tporttype enumeration. */
static const char *azPtype_names
[] =
#define CPORT_TYPES (sizeof azPtype_names / sizeof azPtype_names[0])
/* The port structure used by the command tables. */
static struct sport sPort
;
/* The generic port command table. */
static enum tcmdtabret tpexit
P((int argc
, char **argv
, pointer pvar
,
static enum tcmdtabret tpdup_type
P((int argc
, char **argv
,
pointer pvar
, const char *zerr
));
static enum tcmdtabret tpproto_param
P((int argc
, char **argv
,
pointer pvar
, const char *zerr
));
static enum tcmdtabret tpseven_bit
P((int argc
, char **argv
,
pointer pvar
, const char *zerr
));
static enum tcmdtabret tpreliable
P((int argc
, char **argv
,
pointer pvar
, const char *zerr
));
static struct scmdtab asPort_cmds
[] =
{ "type", CMDTABTYPE_FN
| 2, NULL
, tpdup_type
},
{ "protocol", CMDTABTYPE_STRING
, (pointer
) &sPort
.zprotocols
, NULL
},
{ "protocol-parameter", CMDTABTYPE_FN
| 0, NULL
, tpproto_param
},
{ "seven-bit", CMDTABTYPE_FN
| 2, (pointer
) &sPort
.ireliable
,
{ "reliable", CMDTABTYPE_FN
| 2, (pointer
) &sPort
.ireliable
,
{ "lockname", CMDTABTYPE_STRING
, (pointer
) &sPort
.zlockname
, NULL
},
#define CPORT_CMDS (sizeof asPort_cmds / sizeof asPort_cmds[0])
/* The stdin port command table. */
static struct scmdtab asPstdin_cmds
[] =
SYSDEP_STDIN_CMDS (sPort
.u
.sstdin
.s
),
#define CSTDIN_CMDS (sizeof asPstdin_cmds / sizeof asPstdin_cmds[0])
/* The modem port command table. */
static enum tcmdtabret tpdialer
P((int argc
, char **argv
, pointer pvar
,
static enum tcmdtabret tpbaud_range
P((int argc
, char **argv
,
static struct scmdtab asPmodem_cmds
[] =
{ "device", CMDTABTYPE_STRING
, (pointer
) &sPort
.u
.smodem
.zdevice
, NULL
},
{ "baud", CMDTABTYPE_LONG
, (pointer
) &sPort
.u
.smodem
.ibaud
, NULL
},
{ "speed", CMDTABTYPE_LONG
, (pointer
) &sPort
.u
.smodem
.ibaud
, NULL
},
{ "baud-range", CMDTABTYPE_FN
| 3, NULL
, tpbaud_range
},
{ "speed-range", CMDTABTYPE_FN
| 3, NULL
, tpbaud_range
},
{ "carrier", CMDTABTYPE_BOOLEAN
, (pointer
) &sPort
.u
.smodem
.fcarrier
, NULL
},
{ "dial-device", CMDTABTYPE_STRING
, (pointer
) &sPort
.u
.smodem
.zdial_device
,
{ "dialer", CMDTABTYPE_FN
| 0, (pointer
) &sPort
.u
.smodem
.qdialer
,
{ "dialer-sequence", CMDTABTYPE_FULLSTRING
,
(pointer
) &sPort
.u
.smodem
.zdialer
, NULL
},
SYSDEP_MODEM_CMDS (sPort
.u
.smodem
.s
);
#define CMODEM_CMDS (sizeof asPmodem_cmds / sizeof asPmodem_cmds[0])
/* The direct port command table. */
static struct scmdtab asPdirect_cmds
[] =
{ "device", CMDTABTYPE_STRING
, (pointer
) &sPort
.u
.sdirect
.zdevice
, NULL
},
{ "baud", CMDTABTYPE_LONG
, (pointer
) &sPort
.u
.sdirect
.ibaud
, NULL
},
{ "speed", CMDTABTYPE_LONG
, (pointer
) &sPort
.u
.sdirect
.ibaud
, NULL
},
#ifdef SYSDEP_DIRECT_CMDS
SYSDEP_DIRECT_CMDS (sPort
.u
.sdirect
.s
);
#define CDIRECT_CMDS (sizeof asPdirect_cmds / sizeof asPdirect_cmds[0])
/* The TCP port command table. */
static struct scmdtab asPtcp_cmds
[] =
{ "service", CMDTABTYPE_STRING
, (pointer
) &sPort
.u
.stcp
.zport
, NULL
},
#define CTCP_CMDS (sizeof asPtcp_cmds / sizeof asPtcp_cmds[0])
/* A little routine to exit when another port command is seen. This
will cause confusion if somebody types ``port port foo'' in the
tpexit (argc
, argv
, pvar
, zerr
)
/* A little routine to give a warning about duplicate type commands. */
tpdup_type (argc
, argv
, pvar
, zerr
)
ulog (LOG_ERROR
, "%s: type: Ignoring extraneous command", zerr
);
/* Handle protocol parameter settings for ports. */
tpproto_param (argc
, argv
, pvar
, zerr
)
return tadd_proto_param (&sPort
.cproto_params
, &sPort
.qproto_params
,
zerr
, argc
- 1, argv
+ 1);
/* Handle the ``seven-bit'' command for ports or dialers. */
tpseven_bit (argc
, argv
, pvar
, zerr
)
if (b
== 'y' || b
== 'Y' || b
== 't' || b
== 'T')
else if (b
== 'n' || b
== 'N' || b
== 'f' || b
== 'F')
ulog (LOG_ERROR
, "%s: %s: %s: Bad boolean", zerr
, argv
[0], argv
[1]);
*pi
|= RELIABLE_SPECIFIED
;
/* Handle the ``reliable'' command for ports or dialers. */
tpreliable (argc
, argv
, pvar
, zerr
)
if (b
== 'y' || b
== 'Y' || b
== 't' || b
== 'T')
else if (b
== 'n' || b
== 'N' || b
== 'f' || b
== 'F')
ulog (LOG_ERROR
, "%s: %s: %s: Bad boolean", zerr
, argv
[0], argv
[1]);
*pi
|= RELIABLE_SPECIFIED
;
*pi
|= RELIABLE_RELIABLE
;
*pi
&=~ RELIABLE_RELIABLE
;
/* Handle the ``baud-range'' command for a modem port. */
tpbaud_range (argc
, argv
, pvar
, zerr
)
/* This should do more error checking. */
sPort
.u
.smodem
.ilowbaud
= atol (argv
[1]);
sPort
.u
.smodem
.ihighbaud
= atol (argv
[2]);
/* Process a port command found while reading the system information
tprocess_port_cmd (argc
, argv
, pvar
, zerr
)
struct sport
**pqport
= (struct sport
**) pvar
;
const struct scmdtab
*qcmds
;
if (strcasecmp (argv
[0], "type") != 0)
ulog (LOG_ERROR
, "%s: port type: Wrong number of arguments",
for (i
= 0; i
< CPORT_TYPES
; i
++)
if (strcasecmp (argv
[1], azPtype_names
[i
]) == 0)
ulog (LOG_ERROR
, "%s: Unknown port type", zerr
);
ttype
= (enum tporttype
) i
;
qnew
= (struct sport
*) xmalloc (sizeof (struct sport
));
qnew
->qproto_params
= NULL
;
/* Note that we do not set RELIABLE_SPECIFIED; this just sets
defaults, so that ``seven-bit true'' does not imply
qnew
->ireliable
= RELIABLE_RELIABLE
| RELIABLE_EIGHT
;
SYSDEP_STDIN_INIT (&qnew
->u
.sstdin
.s
);
qnew
->u
.smodem
.zdevice
= NULL
;
qnew
->u
.smodem
.zdial_device
= NULL
;
qnew
->u
.smodem
.ibaud
= 0L;
qnew
->u
.smodem
.ilowbaud
= 0L;
qnew
->u
.smodem
.ihighbaud
= 0L;
qnew
->u
.smodem
.fcarrier
= TRUE
;
qnew
->u
.smodem
.zdialer
= NULL
;
qnew
->u
.smodem
.qdialer
= NULL
;
SYSDEP_MODEM_INIT (&qnew
->u
.smodem
.s
);
qnew
->u
.sdirect
.zdevice
= NULL
;
qnew
->u
.sdirect
.ibaud
= -1;
#ifdef SYSDEP_DIRECT_INIT
SYSDEP_DIRECT_INIT (&qnew
->u
.sdirect
.s
);
qnew
->u
.stcp
.zport
= "uucp";
/* See if this command is one of the generic ones. */
for (i
= 0; i
< CPORT_CMDS
- 1; i
++)
if (strcasecmp (argv
[0], asPort_cmds
[i
].zcmd
) == 0)
tret
= tprocess_one_cmd (argc
, argv
, asPort_cmds
, zerr
, 0);
/* Now check the port commands for specific types. */
switch ((*pqport
)->ttype
)
ulog (LOG_FATAL
, "tprocess_port_cmd: Can't happen");
tret
= tprocess_one_cmd (argc
, argv
, qcmds
, zerr
,
/* Fill in an scmdtab structure to pass every possible port command
to tprocess_port_cmd. The argument must be large enough. */
static void uport_cmdtab
P((struct scmdtab
*qcmds
, struct sport
**pqnew
));
uport_cmdtab (qcmds
, pqnew
)
for (i
= 0; i
< CPORT_CMDS
- 1; i
++)
qcmds
[ibase
+ i
].zcmd
= asPort_cmds
[i
].zcmd
;
qcmds
[ibase
+ i
].itype
= CMDTABTYPE_FN
| 0;
qcmds
[ibase
+ i
].pvar
= (pointer
) pqnew
;
qcmds
[ibase
+ i
].ptfn
= tprocess_port_cmd
;
for (i
= 0; i
< CSTDIN_CMDS
- 1; i
++)
qcmds
[ibase
+ i
].zcmd
= asPstdin_cmds
[i
].zcmd
;
qcmds
[ibase
+ i
].itype
= CMDTABTYPE_FN
| 0;
qcmds
[ibase
+ i
].pvar
= (pointer
) pqnew
;
qcmds
[ibase
+ i
].ptfn
= tprocess_port_cmd
;
ibase
+= CSTDIN_CMDS
- 1;
for (i
= 0; i
< CMODEM_CMDS
- 1; i
++)
qcmds
[ibase
+ i
].zcmd
= asPmodem_cmds
[i
].zcmd
;
qcmds
[ibase
+ i
].itype
= CMDTABTYPE_FN
| 0;
qcmds
[ibase
+ i
].pvar
= (pointer
) pqnew
;
qcmds
[ibase
+ i
].ptfn
= tprocess_port_cmd
;
ibase
+= CMODEM_CMDS
- 1;
for (i
= 0; i
< CDIRECT_CMDS
- 1; i
++)
qcmds
[ibase
+ i
].zcmd
= asPdirect_cmds
[i
].zcmd
;
qcmds
[ibase
+ i
].itype
= CMDTABTYPE_FN
| 0;
qcmds
[ibase
+ i
].pvar
= (pointer
) pqnew
;
qcmds
[ibase
+ i
].ptfn
= tprocess_port_cmd
;
ibase
+= CDIRECT_CMDS
- 1;
for (i
= 0; i
< CTCP_CMDS
- 1; i
++)
qcmds
[ibase
+ i
].zcmd
= asPtcp_cmds
[i
].zcmd
;
qcmds
[ibase
+ i
].itype
= CMDTABTYPE_FN
| 0;
qcmds
[ibase
+ i
].pvar
= (pointer
) pqnew
;
qcmds
[ibase
+ i
].ptfn
= tprocess_port_cmd
;
qcmds
[ibase
].zcmd
= NULL
;
#endif /* HAVE_TAYLOR_CONFIG */
/* Save a port name so that we can use it when looking for a port
with a particular baud rate. */
static enum tcmdtabret tpport_for_baud
P((int argc
, char **argv
,
pointer pvar
, const char *zerr
));
static const char *zport_for_baud_name
;
tpport_for_baud (argc
, argv
, pvar
, zerr
)
zport_for_baud_name
= argv
[1];
#endif /* HAVE_TAYLOR_CONFIG */
/* Find and lock a port. The arguments specify a port name and a baud
rate, and the port found must match both. If the name passed in is
NULL, all ports match. If the baud rate passed in is 0, all ports
match. The lock routine is passed in so that it doesn't have to be
linked in by programs which don't need this call (yes, it's a
hack). The freport argument is actually only used for testing
ffind_port (zfind
, ibaud
, ihighbaud
, qport
, pflock
, freport
)
boolean (*pflock
) P((struct sport
*, boolean fin
));
/* Only warn about a missing file if we're not going to read the
ulog (LOG_ERROR
, "%s%s: file not found", NEWCONFIGLIB
,
struct smulti_file
*qmulti
;
struct scmdtab ascmds
[CPORT_CMDS
+ CSTDIN_CMDS
+ CMODEM_CMDS
+
CDIRECT_CMDS
+ CTCP_CMDS
+ 1];
qmulti
= qmulti_open (zPortfile
);
/* Set up such that each command is routed to
tprocess_port_cmd. Route "port" to tpport_for_baud,
which will record the name of the port. */
ascmds
[0].itype
= CMDTABTYPE_FN
| 2;
ascmds
[0].ptfn
= tpport_for_baud
;
uport_cmdtab (ascmds
+ 1, &qnew
);
/* Look for the first command in the file (which should be
``port'') to get the name of the first port. */
zport_for_baud_name
= NULL
;
uprocesscmds ((FILE *) NULL
, qmulti
, ascmds
,
(const char *) NULL
, CMDFLAG_BACKSLASH
);
(void) fmulti_close (qmulti
);
ulog (LOG_ERROR
, "First command in port file is not `port'");
/* Look through the files until we can't find any more. */
zname
= zport_for_baud_name
;
zport_for_baud_name
= NULL
;
uprocesscmds ((FILE *) NULL
, qmulti
, ascmds
,
(const char *) NULL
, CMDFLAG_BACKSLASH
);
|| strcmp (zfind
, zname
) == 0)
|| (qnew
->ttype
== PORTTYPE_MODEM
&& ((qnew
->u
.smodem
.ibaud
== 0
&& qnew
->u
.smodem
.ilowbaud
== 0
&& qnew
->u
.smodem
.ihighbaud
== 0)
|| (qnew
->u
.smodem
.ibaud
>= ibaud
&& qnew
->u
.smodem
.ibaud
<= ihighbaud
)
|| (qnew
->u
.smodem
.ilowbaud
<= ihighbaud
&& qnew
->u
.smodem
.ihighbaud
>= ibaud
)))
|| (qnew
->ttype
== PORTTYPE_DIRECT
&& (qnew
->u
.sdirect
.ibaud
== 0
|| qnew
->u
.sdirect
.ibaud
== ibaud
))))
|| (*pflock
) (qnew
, FALSE
))
(void) fmulti_close (qmulti
);
zname
= zport_for_baud_name
;
(void) fmulti_close (qmulti
);
#endif /* HAVE_TAYLOR_CONFIG */
if (fv2_find_port (zfind
, ibaud
, ihighbaud
, qport
, pflock
, &ffound
))
#endif /* HAVE_V2_CONFIG */
if (fbnu_find_port (zfind
, ibaud
, ihighbaud
, qport
, pflock
, &ffound
))
#endif /* HAVE_BNU_CONFIG */
ulog (LOG_ERROR
, "All matching ports in use");
ulog (LOG_ERROR
, "No matching ports defined");
/* Read dialer commands. */
static struct sdialer sPdialer
;
/* The dialer command table. */
static enum tcmdtabret tpdtr_toggle
P((int argc
, char **argv
, pointer pvar
,
static enum tcmdtabret tpcomplete
P((int argc
, char **argv
, pointer pvar
,
static enum tcmdtabret tpdialer_proto_param
P((int argc
, char **argv
,
static struct scmdtab asPdialer_cmds
[] =
{ "dialer", CMDTABTYPE_FN
| 2, NULL
, tpexit
},
{ "#", CMDTABTYPE_FN
| 0, NULL
, tpexit
},
{ "chat", CMDTABTYPE_PREFIX
| 0, (pointer
) &sPdialer
.schat
,
{ "dialtone", CMDTABTYPE_STRING
, (pointer
) &sPdialer
.zdialtone
, NULL
},
{ "pause", CMDTABTYPE_STRING
, (pointer
) &sPdialer
.zpause
, NULL
},
{ "carrier", CMDTABTYPE_BOOLEAN
, (pointer
) &sPdialer
.fcarrier
, NULL
},
{ "carrier-wait", CMDTABTYPE_INT
, (pointer
) &sPdialer
.ccarrier_wait
, NULL
},
{ "dtr-toggle", CMDTABTYPE_FN
| 0, NULL
, tpdtr_toggle
},
{ "complete", CMDTABTYPE_FN
| 2, (pointer
) &sPdialer
.scomplete
,
{ "complete-chat", CMDTABTYPE_PREFIX
, (pointer
) &sPdialer
.scomplete
,
{ "abort", CMDTABTYPE_FN
| 2, (pointer
) &sPdialer
.sabort
, tpcomplete
},
{ "abort-chat", CMDTABTYPE_PREFIX
, (pointer
) &sPdialer
.sabort
,
{ "protocol-parameter", CMDTABTYPE_FN
| 0, NULL
, tpdialer_proto_param
},
{ "seven-bit", CMDTABTYPE_FN
| 2, (pointer
) &sPdialer
.ireliable
,
{ "reliable", CMDTABTYPE_FN
| 2, (pointer
) &sPdialer
.ireliable
,
#define CDIALER_CMDS (sizeof asPdialer_cmds / sizeof asPdialer_cmds[0])
/* Handle the dtr-toggle command. */
tpdtr_toggle (argc
, argv
, pvar
, zerr
)
if (argc
< 2 || argc
> 3)
ulog (LOG_ERROR
, "%s: %s: Wrong number of arguments", zerr
, argv
[0]);
if (b
== 'y' || b
== 'Y' || b
== 't' || b
== 'T')
sPdialer
.fdtr_toggle
= TRUE
;
else if (b
== 'n' || b
== 'N' || b
== 'f' || b
== 'F')
sPdialer
.fdtr_toggle
= FALSE
;
ulog (LOG_ERROR
, "%s: %s: Bad boolean", zerr
, argv
[0]);
if (b
== 'y' || b
== 'Y' || b
== 't' || b
== 'T')
sPdialer
.fdtr_toggle_wait
= TRUE
;
else if (b
== 'n' || b
== 'N' || b
== 'f' || b
== 'F')
sPdialer
.fdtr_toggle_wait
= FALSE
;
ulog (LOG_ERROR
, "%s: %s: Bad boolean", zerr
, argv
[0]);
/* Handle the complete and abort commands. These just turn a string
into a trivial chat script. */
tpcomplete (argc
, argv
, pvar
, zerr
)
struct schat_info
*qchat
= (struct schat_info
*) pvar
;
qchat
->zchat
= (char *) xmalloc (strlen (argv
[1]) + sizeof "\"\" ");
sprintf (qchat
->zchat
, "\"\" %s", argv
[1]);
/* Handle protocol parameters for dialers. */
tpdialer_proto_param (argc
, argv
, pvar
, zerr
)
return tadd_proto_param (&sPdialer
.cproto_params
, &sPdialer
.qproto_params
,
zerr
, argc
- 1, argv
+ 1);
/* Process one dialer command. */
static enum tcmdtabret tprocess_dialer_cmd
P((int argc
, char **argv
,
tprocess_dialer_cmd (argc
, argv
, pvar
, zerr
)
struct sdialer
**pq
= (struct sdialer
**) pvar
;
qnew
= (struct sdialer
*) xmalloc (sizeof (struct sdialer
));
INIT_CHAT (&qnew
->schat
);
qnew
->ccarrier_wait
= 60;
qnew
->fdtr_toggle
= FALSE
;
qnew
->fdtr_toggle_wait
= FALSE
;
INIT_CHAT (&qnew
->scomplete
);
INIT_CHAT (&qnew
->sabort
);
qnew
->qproto_params
= NULL
;
/* Note that we do not set RELIABLE_SPECIFIED; this just sets
defaults, so that ``seven-bit true'' does not imply
qnew
->ireliable
= RELIABLE_RELIABLE
| RELIABLE_EIGHT
;
tret
= tprocess_one_cmd (argc
, argv
, asPdialer_cmds
, zerr
,
/* Handle a dialer command seen in the port file. */
tpdialer (argc
, argv
, pvar
, zerr
)
ulog (LOG_ERROR
, "%s: %s: Wrong number of arguments", zerr
, argv
[0]);
return tprocess_dialer_cmd (argc
- 1, argv
+ 1, pvar
, zerr
);
sPort
.u
.smodem
.zdialer
= argv
[1];
return CMDTABRET_CONTINUE
;
/* Read the information for a particular item. */
/* Look for a particular dialer. */
static enum tcmdtabret tplook
P((int argc
, char **argv
, pointer pvar
,
tplook (argc
, argv
, pvar
, zerr
)
struct splook
*q
= (struct splook
*) pvar
;
if (strcmp (q
->zlook
, argv
[1]) == 0)
return CMDTABRET_FREE_AND_EXIT
;
#endif /* HAVE_TAYLOR_CONFIG */
/* Read information about a specific dialer. */
fread_dialer_info (zdialer
, qdialer
)
/* If we haven't got a dialer file, then only complain if we aren't
going to try the BNU dialer file. */
ulog (LOG_ERROR
, "%s%s: file not found", NEWCONFIGLIB
, DIALFILE
);
struct smulti_file
*qmulti
;
struct scmdtab ascmds
[CDIALER_CMDS
];
qmulti
= qmulti_open (zDialfile
);
as
[0].itype
= CMDTABTYPE_FN
| 2;
as
[0].pvar
= (pointer
) &s
;
uprocesscmds ((FILE *) NULL
, qmulti
, as
, (const char *) NULL
,
for (i
= 0; i
< CDIALER_CMDS
; i
++)
ascmds
[i
].zcmd
= asPdialer_cmds
[i
].zcmd
;
if (TTYPE_CMDTABTYPE (asPdialer_cmds
[i
].itype
)
ascmds
[i
].itype
= CMDTABTYPE_PREFIX
| 0;
ascmds
[i
].itype
= CMDTABTYPE_FN
| 0;
ascmds
[i
].pvar
= (pointer
) &qnew
;
ascmds
[i
].ptfn
= tprocess_dialer_cmd
;
uprocesscmds ((FILE *) NULL
, qmulti
, ascmds
,
CMDFLAG_WARNUNRECOG
| CMDFLAG_BACKSLASH
);
(void) fmulti_close (qmulti
);
ulog (LOG_ERROR
, "No information for dialer %s", zdialer
);
(void) fmulti_close (qmulti
);
#endif /* HAVE_TAYLOR_CONFIG */
if (fbnu_read_dialer_info (zdialer
, qdialer
))
#endif /* HAVE_BNU_CONFIG */
ulog (LOG_ERROR
, "%s: No such dialer", zdialer
);