/* -*-c-*-
*
- * $Id: atom.c,v 1.4 2003/12/15 20:53:47 mdw Exp $
+ * $Id$
*
* Atom management
*
* (c) 2000 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of the mLib utilities library.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* mLib 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 Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with mLib; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: atom.c,v $
- * Revision 1.4 2003/12/15 20:53:47 mdw
- * Add global unihash table; use universal hashing instead of CRC.
- *
- * Revision 1.3 2001/01/25 21:13:15 mdw
- * New function allowing an atom's length to be specified at intern time.
- *
- * Revision 1.2 2001/01/21 19:04:51 mdw
- * Include `crc32.h' for @CRC32@ macro.
- *
- * Revision 1.1 2001/01/20 11:50:16 mdw
- * Implementation of atom tables (for example, as found in X11).
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <stdio.h>
a = x_alloc(t->t.t.a, sizeof(atom) + sz);
a->b.name = (char *)(a + 1);
memcpy(a->b.name, buf, sz);
- a->b.len = sz;
+ a->b.len = sz - 1;
a->b.b.hash = UNIHASH(&unihash_global, buf, sz);
a->f = ATOMF_GENSYM;
a->b.b.next = t->g;