BufToAtV.sgm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!-- $XConsortium: BufToAtV.sgm /main/5 1996/08/30 13:18:05 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN28.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN28.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>DtDtsBufferToAttributeValue</RefEntryTitle>
  13. <ManVolNum>library call</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Function>DtDtsBufferToAttributeValue</Function></RefName>
  17. <RefPurpose>get a single data attribute value for a byte stream
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- CDE Common Source Format, Version 1.0.0-->
  21. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  22. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  23. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  24. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  25. <RefSynopsisDiv>
  26. <FuncSynopsis Remap="ANSI">
  27. <FuncSynopsisInfo>#include &lt;Dt/Dts.h>
  28. </FuncSynopsisInfo>
  29. <FuncDef>char <Function>*DtDtsBufferToAttributeValue</Function></FuncDef>
  30. <ParamDef>const void *<Parameter>buffer</Parameter></ParamDef>
  31. <ParamDef>const int <Parameter>size</Parameter></ParamDef>
  32. <ParamDef>const char *<Parameter>attr_name</Parameter></ParamDef>
  33. <ParamDef>const char *<Parameter>opt_name</Parameter></ParamDef>
  34. </FuncSynopsis>
  35. </RefSynopsisDiv>
  36. <RefSect1>
  37. <Title>DESCRIPTION</Title>
  38. <Para>The
  39. <Function>DtDtsBufferToAttributeValue</Function> function
  40. returns a data attribute value for a given byte stream.
  41. The
  42. <Symbol Role="Variable">buffer</Symbol> argument
  43. is a pointer to the buffer of the data to be typed.
  44. </Para>
  45. <Para>The
  46. <Symbol Role="Variable">size</Symbol> argument
  47. is the size of the buffer in bytes.
  48. </Para>
  49. <Para>The
  50. <Emphasis>attr_name</Emphasis> argument is a name of the attribute.
  51. </Para>
  52. <Para>The
  53. <Emphasis>opt_name</Emphasis> argument can be used to specify a name to be associated with the buffer.
  54. If the
  55. <Emphasis>opt_name</Emphasis> argument is not
  56. <SystemItem Class="Constant">NULL</SystemItem>, it is used as a pseudo file name in typing;
  57. otherwise, certain attributes may be returned as
  58. <SystemItem Class="Constant">NULL</SystemItem> because the filename components could not be determined.
  59. </Para>
  60. </RefSect1>
  61. <RefSect1>
  62. <Title>RETURN VALUE</Title>
  63. <Para>Upon successful completion, the
  64. <Function>DtDtsBufferToAttributeValue</Function> function returns a pointer to a data attribute value string, or
  65. <SystemItem Class="Constant">NULL</SystemItem> if no value could be determined.
  66. </Para>
  67. </RefSect1>
  68. <RefSect1>
  69. <Title>APPLICATION USAGE</Title>
  70. <Para>The application should use the
  71. &cdeman.DtDtsFreeAttributeValue; function to release the memory for the returned value.
  72. </Para>
  73. <Para>The
  74. <Function>DtDtsBufferToAttributeValue</Function> function assumes that the buffer is readable and writable
  75. by the user, group and other file classes
  76. and selects a type accordingly.
  77. An application requiring a type based on read-only
  78. permissions should use
  79. <Function>DtDtsDataToDataType</Function>.</Para>
  80. </RefSect1>
  81. <RefSect1>
  82. <Title>SEE ALSO</Title>
  83. <Para><Filename Role="Header">Dt/Dts.h</Filename>, &cdeman.DtDtsDataToDataType;, &cdeman.DtDtsLoadDataTypes;, &cdeman.DtDtsFreeAttributeValue;.</Para>
  84. </RefSect1>
  85. </RefEntry>
  86. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->