/*
- * $XFree86: xc/lib/fontconfig/src/fcatomic.c,v 1.1 2002/03/03 00:19:43 keithp Exp $
+ * $RCSId: xc/lib/fontconfig/src/fcatomic.c,v 1.2 2002/03/04 21:15:28 tsi Exp $
*
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
FcAtomic *atomic = malloc (total_len);
if (!atomic)
return 0;
+ FcMemAlloc (FC_MEM_ATOMIC, total_len);
atomic->file = (FcChar8 *) (atomic + 1);
strcpy ((char *) atomic->file, (char *) file);
void
FcAtomicDestroy (FcAtomic *atomic)
{
+ FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) +
+ strlen ((char *) atomic->file) * 4 + 1 +
+ sizeof (NEW_NAME) + sizeof (LCK_NAME) +
+ sizeof (TMP_NAME));
+
free (atomic);
}