/* -*-c-*-
*
- * $Id$
- *
* Remember the longest word seen so far
*
* (c) 2005 Mark Wooding
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Anag: a simple wordgame helper.
*
* 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.
link *l;
if (!n->l) return (0);
- for (l = n->l; l; l = l->next)
- puts(l->p);
+ for (l = n->l; l; l = l->next) puts(l->p);
return (1);
}
static int n_longest(node *nn, const char *p, size_t sz)
{
node_longest *n = (node_longest *)nn;
- if (sz < n->len)
- return (0);
- if (sz > n->len)
- empty(n);
+ if (sz < n->len) return (0);
+ if (sz > n->len) empty(n);
insert(n, p, sz);
return (0);
}
static int n_shortest(node *nn, const char *p, size_t sz)
{
node_longest *n = (node_longest *)nn;
- if (n->len && sz > n->len)
- return (0);
- if (!n->len || sz < n->len)
- empty(n);
+ if (n->len && sz > n->len) return (0);
+ if (!n->len || sz < n->len) empty(n);
insert(n, p, sz);
return (0);
}