SrchMrge.sgm 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!-- $XConsortium: dtsrmerg.sgm 1996 -->
  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="CDE.SEARCH.DtSearchMergeResults">]]>
  10. <refmeta>
  11. <refentrytitle>DtSearchMergeResults</refentrytitle>
  12. <manvolnum>library call</manvolnum>
  13. </refmeta>
  14. <refnamediv><refname><function>DtSearchMergeResults</function></refname>
  15. <refpurpose>Merge two DtSearch results lists into one</refpurpose>
  16. </refnamediv>
  17. <refsynopsisdiv>
  18. <funcsynopsis>
  19. <funcsynopsisinfo>#include &lt;Dt/Search.h></funcsynopsisinfo>
  20. <funcdef>int <function>DtSearchMergeResults</function></funcdef>
  21. <paramdef>DtSrResult <parameter>**targlist</parameter></paramdef>
  22. <paramdef>DtSrResult <parameter>**srclist</parameter></paramdef>
  23. </funcsynopsis>
  24. </refsynopsisdiv>
  25. <refsect1>
  26. <title>DESCRIPTION</title>
  27. <para><function>DtSearchMergeResults</function> merges the
  28. <symbol role="variable">srclist</symbol> results list into the
  29. <symbol role="variable">targlist</symbol> list using proximity for sort order,
  30. and sets the <symbol role="variable">srclist</symbol> source list
  31. pointer to NULL.
  32. </para>
  33. <para>This function is used to merge results from separate database searches
  34. for presentation to the user as a single results list.
  35. </para>
  36. <para>It presumes both lists are initially sorted by ascending proximity. It
  37. does nothing if source list is empty and returns <systemitem class="constant">DtSrOK</systemitem>. It moves the source list as is to
  38. the target list if the target list is empty and returns <systemitem class="constant">DtSrOK</systemitem>.
  39. </para>
  40. </refsect1>
  41. <refsect1>
  42. <title>ARGUMENTS</title>
  43. <variablelist>
  44. <varlistentry><term><symbol role="Variable">srclist</symbol></term>
  45. <listitem>
  46. <para>Specifies the results list to be merged into the target list.
  47. </para>
  48. </listitem>
  49. </varlistentry>
  50. <varlistentry><term><symbol role="Variable">targlist</symbol></term>
  51. <listitem>
  52. <para>Specifies the results list into which the source list is to be merged.
  53. </para>
  54. </listitem>
  55. </varlistentry>
  56. </variablelist>
  57. </refsect1>
  58. <refsect1>
  59. <title>RETURN VALUE</title>
  60. <para><function>DtSearchMergeResults</function> returns <systemitem class="constant">DtSrERROR</systemitem> if either the
  61. <symbol role="variable">srclist</symbol> pointer or the
  62. <symbol role="variable">srclist</symbol> pointer is NULL. Otherwise, it returns
  63. <systemitem class="constant">DtSrOK</systemitem>, indicating a
  64. successful merge.
  65. </para>
  66. </refsect1><refsect1>
  67. <title>SEE ALSO</title>
  68. <para>&cdeman.DtSrAPI;,
  69. &cdeman.DtSearchQuery;,
  70. &cdeman.DtSearchSortResults;,
  71. &cdeman.DtSearchFreeResults;
  72. </para>
  73. </refsect1></refentry>