'\" te .\" Copyright (c) 1997 Sun Microsystems, Inc All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH DEMANGLE 3EXT "Mar 11, 1997" .SH NAME demangle, cplus_demangle \- decode a C++ encoded symbol name .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR[ \fIlibrary\fR ... ] \fB-ldemangle\fR #include \fBint\fR \fBcplus_demangle\fR(\fBconst char *\fR\fIsymbol\fR, \fBchar *\fR\fIprototype\fR, \fBsize_t\fR \fIsize\fR); .fi .SH DESCRIPTION .sp .LP The \fBcplus_demangle()\fR function decodes (demangles) a C++ linker symbol name (mangled name) into a (partial) C++ prototype, if possible. C++ mangled names may not have enough information to form a complete prototype. .sp .LP The \fIsymbol\fR string argument points to the input mangled name. .sp .LP The \fIprototype\fR argument points to a user-specified output string buffer, of \fBsize\fR bytes. .sp .LP The \fBcplus_demangle()\fR function operates on mangled names generated by SPARCompilers C++ 3.0.1, 4.0.1, 4.1 and 4.2. .sp .LP The \fBcplus_demangle()\fR function improves and replaces the \fBdemangle()\fR function. .sp .LP Refer to the \fBCC.1\fR, \fBdem.1\fR, and \fBc++filt.1\fR manual pages in the \fB/opt/SUNWspro/man/man1\fR directory. These pages are only available with the SPROcc package. .SH RETURN VALUES .sp .LP The \fBcplus_demangle()\fR function returns the following values: .sp .ne 2 .na \fB\fB0\fR\fR .ad .RS 19n The \fIsymbol\fR argument is a valid mangled name and \fIprototype\fR contains a (partial) prototype for the symbol. .RE .sp .ne 2 .na \fB\fBDEMANGLE_ENAME\fR\fR .ad .RS 19n The \fIsymbol\fR argument is not a valid mangled name and the content of \fIprototype\fR is a copy of the symbol. .RE .sp .ne 2 .na \fB\fBDEMANGLE_ESPACE\fR\fR .ad .RS 19n The \fIprototype\fR output buffer is too small to contain the prototype (or the symbol), and the content of \fIprototype\fR is undefined. .RE