X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/03a839ce52510443ef1a1fe8b3629884423099fe..858a73afbf5018d74920761f7015ac2e7d3987b6:/conf.c diff --git a/conf.c b/conf.c index 04b0ac5..70b6506 100644 --- a/conf.c +++ b/conf.c @@ -5,40 +5,26 @@ * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * - * This file is part of the `fw' port forwarder. + * This file is part of the `fwd' port forwarder. * - * `fw' is free software; you can redistribute it and/or modify + * `fwd' 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. - * - * `fw' is distributed in the hope that it will be useful, + * + * `fwd' 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 `fw'; if not, write to the Free Software Foundation, + * along with `fwd'; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Header files ------------------------------------------------------*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "conf.h" -#include "scan.h" +#include "fwd.h" /*----- Main code ---------------------------------------------------------*/ @@ -383,4 +369,22 @@ void conf_name(scanner *sc, char delim, dstr *d) #undef f_bra } +/* --- @conf_fname@ --- * + * + * Arguments: @scanner *sc@ = pointer to scanner + * @dstr *d@ = pointer to dynamic string for output + * + * Returns: --- + * + * Use: Reads a file name from the input and stores it in @d@. + */ + +void conf_fname(scanner *sc, dstr *d) +{ + const char fnchars[] = ".-+"; + conf_undelim(sc, fnchars, fnchars); + conf_name(sc, '/', d); + conf_undelim(sc, 0, 0); +} + /*----- That's all, folks -------------------------------------------------*/