<!-- $XConsortium: BufToDaT.sgm /main/5 1996/08/30 13:18:17 rws $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN29.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN29.rsml.1">]]>
<RefMeta>
<RefEntryTitle>DtDtsBufferToDataType</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>DtDtsBufferToDataType</Function></RefName>
<RefPurpose>get the data type for a byte stream
</RefPurpose>
</RefNameDiv>
<!-- CDE Common Source Format, Version 1.0.0-->
<!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
<!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
<!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
<!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
<RefSynopsisDiv>
<FuncSynopsis Remap="ANSI">
<FuncSynopsisInfo>#include &lt;Dt/Dts.h>
</FuncSynopsisInfo>
<FuncDef>char <Function>*DtDtsBufferToDataType</Function></FuncDef>
<ParamDef>const void *<Parameter>buffer</Parameter></ParamDef>
<ParamDef>const int <Parameter>size</Parameter></ParamDef>
<ParamDef>const char *<Parameter>opt_name</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>DtDtsBufferToDataType</Function> function returns the data type name for a given byte stream.
</Para>
<Para>The
<Symbol Role="Variable">buffer</Symbol> argument
is a pointer to the buffer of the data to be typed.
</Para>
<Para>The
<Symbol Role="Variable">size</Symbol> argument
is the size of the buffer in bytes.
</Para>
<Para>The
<Emphasis>opt_name</Emphasis> argument can be used to specify a name to be associated with the buffer.
If the
<Emphasis>opt_name</Emphasis> argument is not
<SystemItem Class="Constant">NULL</SystemItem>, it is used as a pseudo file name in typing;
otherwise, certain attributes may be returned as
<SystemItem Class="Constant">NULL</SystemItem> because the filename components could not be determined.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>DtDtsBufferToDataType</Function> function returns a pointer to a data type name string, or
<SystemItem Class="Constant">NULL</SystemItem> if no value could be determined.
</Para>
</RefSect1>
<RefSect1>
<Title>APPLICATION USAGE</Title>
<Para>The application should use the
&cdeman.DtDtsFreeDataType; function to release the memory for the returned value.
</Para>
<Para>The
<Function>DtDtsBufferToDataType</Function> function assumes that the buffer is readable and writable
by the user, group and other file classes
and selects a type accordingly.
An application requiring a type based on read-only
permissions should use
<Function>DtDtsDataToDataType</Function>.</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para><Filename Role="Header">Dt/Dts.h</Filename>, &cdeman.DtDtsDataToDataType;, &cdeman.DtDtsLoadDataTypes;, &cdeman.DtDtsFreeDataType;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->
