X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/9155ea97b695b6eb5fca1ee79f57b334f6c4ef53..367d81afe3d72b6bc1519d2ae2187a6535370025:/conf.c diff --git a/conf.c b/conf.c index da40b2e..70b6506 100644 --- a/conf.c +++ b/conf.c @@ -369,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 -------------------------------------------------*/