user.sgm 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!-- $XConsortium: user.sgm /main/5 1996/08/30 14:22:27 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.MAN210.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN210.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>tt_pattern_user</RefEntryTitle>
  13. <ManVolNum>library call</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Function>tt_pattern_user</Function></RefName>
  17. <RefPurpose>return the value in a user data cell for a pattern object
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- $XConsortium: user.sgm /main/5 1996/08/30 14:22:27 rws $-->
  21. <!-- CDE Common Source Format, Version 1.0.0-->
  22. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  23. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  24. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  25. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  26. <RefSynopsisDiv>
  27. <FuncSynopsis Remap="ANSI">
  28. <FuncSynopsisInfo>#include &lt;Tt/tt_c.h>
  29. </FuncSynopsisInfo>
  30. <FuncDef>void <Function>*tt_pattern_user</Function></FuncDef>
  31. <ParamDef>Tt_pattern <Parameter>p</Parameter></ParamDef>
  32. <ParamDef>int <Parameter>key</Parameter></ParamDef>
  33. </FuncSynopsis>
  34. </RefSynopsisDiv>
  35. <RefSect1>
  36. <Title>DESCRIPTION</Title>
  37. <Para>The
  38. <Function>tt_pattern_user</Function> function
  39. returns the value in the indicated user data cell for the specified pattern
  40. object.
  41. </Para>
  42. <Para>Every pattern object allows an arbitrary number of user
  43. data cells that are each one word in size.
  44. The user data cells are identified by integer keys.
  45. The tool can use these keys in any manner to associate arbitrary data
  46. with a pattern object.
  47. </Para>
  48. <Para>The user data is part of the pattern object (that is, the storage buffer in
  49. the application); it is not part of the actual pattern.
  50. The content of user cells has no effect on pattern matching.
  51. </Para>
  52. <Para>The
  53. <Emphasis>p</Emphasis> argument is a unique handle for a message pattern.
  54. This handle is returned after
  55. <Function>tt_pattern_create</Function> is called.
  56. The
  57. <Symbol Role="Variable">key</Symbol> argument is the specified user data cell.
  58. The application can use
  59. &cdeman.tt.pattern.user.set; to assign the keys to the user data cells that
  60. are part of the pattern object.
  61. The value of each data cell must be unique for this pattern.
  62. </Para>
  63. </RefSect1>
  64. <RefSect1>
  65. <Title>RETURN VALUE</Title>
  66. <Para>Upon successful completion, the
  67. <Function>tt_pattern_user</Function> function returns the data cell,
  68. a piece of arbitrary user data that can hold a
  69. <Literal>void&ensp;*</Literal>. The application can use
  70. &cdeman.tt.ptr.error; to extract one of the following
  71. <StructName Role="typedef">Tt_status</StructName> values from the returned data:
  72. </Para>
  73. <VariableList>
  74. <VarListEntry>
  75. <Term>TT_OK</Term>
  76. <ListItem>
  77. <Para>The operation completed successfully.
  78. </Para>
  79. </ListItem>
  80. </VarListEntry>
  81. <VarListEntry>
  82. <Term>TT_ERR_NOMP</Term>
  83. <ListItem>
  84. <Para>The
  85. &cdeman.ttsession; process is not running and the ToolTalk service cannot restart it.
  86. </Para>
  87. </ListItem>
  88. </VarListEntry>
  89. <VarListEntry>
  90. <Term>TT_ERR_POINTER</Term>
  91. <ListItem>
  92. <Para>The pointer passed does not point to an object of
  93. the correct type for this operation.
  94. </Para>
  95. </ListItem>
  96. </VarListEntry>
  97. </VariableList>
  98. </RefSect1>
  99. <RefSect1>
  100. <Title>APPLICATION USAGE</Title>
  101. <Para>The user data cell is intended to hold an address.
  102. If the address selected is equal to one of the
  103. <StructName Role="typedef">Tt_status</StructName> enumerated values, the result of the
  104. &cdeman.tt.ptr.error; function will not be reliable.
  105. </Para>
  106. </RefSect1>
  107. <RefSect1>
  108. <Title>SEE ALSO</Title>
  109. <Para>&cdeman.Tt.tt.c.h;, &cdeman.tt.pattern.user.set;, &cdeman.tt.pattern.create;, &cdeman.tt.ptr.error;.</Para>
  110. </RefSect1>
  111. </RefEntry>
  112. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->