X-Git-Url: https://git.distorted.org.uk/~mdw/anag/blobdiff_plain/345f33ea7a273e3196075b07fcc0bc28714793a5..0279756ef8eb60878927c9e325a9ad25a4b0f150:/anag.h diff --git a/anag.h b/anag.h index e233159..e16a3ae 100644 --- a/anag.h +++ b/anag.h @@ -1,13 +1,11 @@ /* -*-c-*- * - * $Id: anag.h,v 1.5 2004/04/08 01:36:19 mdw Exp $ - * * External definitions for Anag * * (c) 2001 Mark Wooding */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Anag: a simple wordgame helper. * @@ -15,12 +13,12 @@ * 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. - * + * * Anag 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 Anag; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -69,6 +67,14 @@ extern node *trackword(const char *const */*av*/); extern node *mono(const char *const */*av*/); extern node *regexp(const char *const */*av*/); extern node *pcrenode(const char *const */*av*/); +extern node *longest(const char *const */*av*/); +extern node *shortest(const char *const */*av*/); + +/*----- Exit codes --------------------------------------------------------*/ + +#define EX_OK 0 +#define EX_NONE 1 +#define EX_FAIL 127 /*----- Error reporting ---------------------------------------------------*/ @@ -189,6 +195,22 @@ extern void dstr_ensure(dstr */*d*/, size_t /*sz*/); extern int dstr_putline(dstr */*d*/, FILE */*fp*/); +/*----- Infrastructure ----------------------------------------------------*/ + +/* --- @atend_register@ --- * + * + * Arguments: @int (*func)(void *)@ = function to call + * @void *p@ = handle to pass to it + * + * Returns: --- + * + * Use: Adds a function to the list of things to do at the end of the + * program. The function should return nonzero if it produced + * any output. + */ + +extern void atend_register(int (*/*func*/)(void */*p*/), void */*p*/); + /*----- That's all, folks -------------------------------------------------*/ #ifdef __cplusplus