Commit fc95ec73 authored by Per Cederqvist's avatar Per Cederqvist

(lookup_regexp): Never use a translate table.

parent 55ca823a
/*
* $Id: regex-match.c,v 1.27 1999/07/05 06:59:42 ceder Exp $
* $Id: regex-match.c,v 1.28 1999/07/10 22:52:34 ceder Exp $
* Copyright (C) 1992-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -33,7 +33,7 @@
#endif
static const char *
rcsid = "$Id: regex-match.c,v 1.27 1999/07/05 06:59:42 ceder Exp $";
rcsid = "$Id: regex-match.c,v 1.28 1999/07/10 22:52:34 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -84,26 +84,7 @@ lookup_regexp (Connection *conn,
re_syntax_options = RE_SYNTAX_GREP;
if (!param.regex_use_collate_table)
{
pat_buf.translate = NULL;
}
else
{
/* regfree() uses free() to free this memory, so we have to
use malloc to allocate it. If malloc fails we will continue
without the collate table. This is an acceptable failure
mode */
char *tmp = malloc(COLLAT_TAB_SIZE);
if (tmp)
{
memcpy(tmp, DEFAULT_COLLAT_TAB, COLLAT_TAB_SIZE);
}
pat_buf.translate = tmp;
}
pat_buf.fastmap = 0;
/* We have to use malloc() instead of smalloc() when allocating
the fastmap, since regfree will use free() to free the memory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment