2 Return how often to spawn a uuxqt process.
4 Copyright (C) 1994 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_runuxq_rcsid[] = "$FreeBSD$";
32 /* Return how often to spawn a uuxqt process. This is either a
33 positive number representing the number of execution files to be
34 received between spawns, or a special code. When using
35 TAYLOR_CONFIG, this is from the ``run-uuxqt'' command in config
36 (the default is UUCONF_RUNUUXQT_ONCE, for compatibility).
37 Otherwise, we return UUCONF_RUNUUXQT_PERCALL for HDB_CONFIG and 10
38 for V2_CONFIG, to emulate traditional HDB and V2 emulations. */
41 uuconf_runuuxqt (pglobal, pirunuuxqt)
45 #if HAVE_TAYLOR_CONFIG
47 struct sglobal *qglobal = (struct sglobal *) pglobal;
50 zrun = qglobal->qprocess->zrunuuxqt;
52 || strcasecmp (zrun, "once") == 0)
53 *pirunuuxqt = UUCONF_RUNUUXQT_ONCE;
54 else if (strcasecmp (zrun, "never") == 0)
55 *pirunuuxqt = UUCONF_RUNUUXQT_NEVER;
56 else if (strcasecmp (zrun, "percall") == 0)
57 *pirunuuxqt = UUCONF_RUNUUXQT_PERCALL;
62 *pirunuuxqt = strtol ((char *) qglobal->qprocess->zrunuuxqt,
64 if (*zend != '\0' || *pirunuuxqt <= 0)
65 *pirunuuxqt = UUCONF_RUNUUXQT_ONCE;
68 #else /* ! HAVE_TAYLOR_CONFIG */
70 *pirunuuxqt = UUCONF_RUNUUXQT_PERCALL;
71 #else /* ! HAVE_HDB_CONFIG */
73 #endif /* ! HAVE_HDB_CONFIG */
74 #endif /* ! HAVE_TAYLOR_CONFIG */
76 return UUCONF_SUCCESS;