2 Get all known dialer names from the Taylor UUCP configuration files.
4 Copyright (C) 1992 Ian Lance Taylor
6 This file is part of the Taylor UUCP uuconf library.
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public License
10 as published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 This library is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
18 You should have received a copy of the GNU Library General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 The author of the program may be contacted at ian@airs.com or
23 c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
29 const char _uuconf_tdnams_rcsid[] = "$FreeBSD$";
34 static int indialer P((pointer pglobal, int argc, char **argv, pointer pvar,
37 /* Get the names of all the dialers from the Taylor UUCP configuration
41 uuconf_taylor_dialer_names (pglobal, ppzdialers)
45 struct sglobal *qglobal = (struct sglobal *) pglobal;
46 struct uuconf_cmdtab as[2];
52 as[0].uuconf_zcmd = "dialer";
53 as[0].uuconf_itype = UUCONF_CMDTABTYPE_FN | 2;
54 as[0].uuconf_pvar = (pointer) ppzdialers;
55 as[0].uuconf_pifn = indialer;
57 as[1].uuconf_zcmd = NULL;
59 iret = UUCONF_SUCCESS;
61 for (pz = qglobal->qprocess->pzdialfiles; *pz != NULL; pz++)
70 qglobal->ierrno = errno;
71 iret = UUCONF_FOPEN_FAILED | UUCONF_ERROR_ERRNO;
75 iret = uuconf_cmd_file (pglobal, e, as, (pointer) NULL,
76 (uuconf_cmdtabfn) NULL,
77 UUCONF_CMDTABFLAG_BACKSLASH,
82 if (iret != UUCONF_SUCCESS)
86 if (iret != UUCONF_SUCCESS)
88 qglobal->zfilename = *pz;
89 return iret | UUCONF_ERROR_FILENAME;
92 if (*ppzdialers == NULL)
93 iret = _uuconf_iadd_string (qglobal, (char *) NULL, FALSE, FALSE,
94 ppzdialers, (pointer) NULL);
96 return UUCONF_SUCCESS;
99 /* Add a dialer name to the list. */
103 indialer (pglobal, argc, argv, pvar, pinfo)
110 struct sglobal *qglobal = (struct sglobal *) pglobal;
111 char ***ppzdialers = (char ***) pvar;
114 iret = _uuconf_iadd_string (qglobal, argv[1], TRUE, TRUE, ppzdialers,
116 if (iret != UUCONF_SUCCESS)
117 iret |= UUCONF_CMDTABRET_EXIT;