10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*3125Sjacobs * Common Development and Distribution License (the "License").
6*3125Sjacobs * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
21*3125Sjacobs
22*3125Sjacobs /*
23*3125Sjacobs * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24*3125Sjacobs * Use is subject to license terms.
25*3125Sjacobs */
26*3125Sjacobs
270Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
280Sstevel@tonic-gate /* All Rights Reserved */
290Sstevel@tonic-gate
300Sstevel@tonic-gate
31*3125Sjacobs #pragma ident "%Z%%M% %I% %E% SMI"
320Sstevel@tonic-gate /* LINTLIBRARY */
330Sstevel@tonic-gate
34*3125Sjacobs #include <syslog.h>
350Sstevel@tonic-gate #include "lp.h"
360Sstevel@tonic-gate #include "class.h"
370Sstevel@tonic-gate
380Sstevel@tonic-gate /**
390Sstevel@tonic-gate ** freeclass() - FREE SPACE USED BY CLASS STRUCTURE
400Sstevel@tonic-gate **/
410Sstevel@tonic-gate
420Sstevel@tonic-gate void
430Sstevel@tonic-gate #if defined(__STDC__)
freeclass(CLASS * clsbufp)440Sstevel@tonic-gate freeclass (
450Sstevel@tonic-gate CLASS * clsbufp
460Sstevel@tonic-gate )
470Sstevel@tonic-gate #else
480Sstevel@tonic-gate freeclass (clsbufp)
490Sstevel@tonic-gate CLASS *clsbufp;
500Sstevel@tonic-gate #endif
510Sstevel@tonic-gate {
520Sstevel@tonic-gate if (!clsbufp)
530Sstevel@tonic-gate return;
54*3125Sjacobs syslog(LOG_DEBUG, "freeclass(%s)", clsbufp->name ? clsbufp->name : "");
550Sstevel@tonic-gate if (clsbufp->name)
560Sstevel@tonic-gate Free (clsbufp->name);
570Sstevel@tonic-gate freelist (clsbufp->members);
58*3125Sjacobs Free(clsbufp);
59*3125Sjacobs
600Sstevel@tonic-gate return;
610Sstevel@tonic-gate }
62