home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / commands / manip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  3.6 KB  |  189 lines

  1. /*
  2.  * manip.h --
  3.  *    POSTGRES "manipulation" utility definitions.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/commands/RCS/manip.h,v 1.4 1990/08/18 00:39:24 cimarron Exp $
  7.  */
  8.  
  9. #ifndef    ManipIncluded        /* Include this file only once */
  10. #define ManipIncluded    1
  11.  
  12. #include <strings.h>
  13.  
  14. #include "tmp/postgres.h"
  15.  
  16. /*
  17.  * XXX style--this should be in a more global header file
  18.  */
  19. #define StringEquals(x, y)    (strcmp(x, y) == 0)
  20.  
  21. #include "nodes/pg_lisp.h"
  22.  
  23. /*
  24.  * DefineListRemoveOptionalIndicator --
  25.  *    Returns list element with car matching given string or LispNil.
  26.  *
  27.  * Side effects:
  28.  *    Returned list element is removed from *assocListInOutP.
  29.  *
  30.  * Exceptions:
  31.  *    "WARN" if string is not found.
  32.  *    ...
  33.  */
  34. extern
  35. LispValue
  36. DefineListRemoveOptionalIndicator ARGS((
  37.     LispValue    *assocListInOutP,
  38.     String        string
  39. ));
  40.  
  41. /*
  42.  * DefineListRemoveOptionalAssignment --
  43.  *    Returns list element with car matching given string or LispNil.
  44.  *
  45.  * Side effects:
  46.  *    Returned list element is removed from *assocListInOutP.
  47.  *
  48.  * Exceptions:
  49.  *    "WARN" if string is not found.
  50.  *    ...
  51.  */
  52. extern
  53. LispValue
  54. DefineListRemoveOptionalAssignment ARGS((
  55.     LispValue    *assocListInOutP,
  56.     String        string
  57. ));
  58.  
  59. /*
  60.  * DefineListRemoveRequiredAssignment --
  61.  *    Returns list element with car matching given string or LispNil.
  62.  *
  63.  * Side effects:
  64.  *    Returned list element is removed from *assocListInOutP.
  65.  *
  66.  * Exceptions:
  67.  *    "WARN" if string is not found.
  68.  *    ...
  69.  */
  70. extern
  71. LispValue
  72. DefineListRemoveRequiredAssignment ARGS((
  73.     LispValue    *assocListInOutP,
  74.     String        string
  75. ));
  76.  
  77. /*
  78.  * DefineEntryGetString --
  79.  *    Returns "value" string for given define entry.
  80.  *
  81.  * Exceptions:
  82.  *    BadArg if entry is an invalid "entry."
  83.  *    "WARN" if "value" is not a string.
  84.  */
  85. extern
  86. String
  87. DefineEntryGetString ARGS((
  88.     LispValue    entry
  89. ));
  90.  
  91. /*
  92.  * DefineEntryGetName --
  93.  *    Returns "value" name for given define entry.
  94.  *
  95.  * Exceptions:
  96.  *    BadArg if entry is an invalid "entry."
  97.  *    "WARN" if "value" is not a name.
  98.  */
  99. extern
  100. Name
  101. DefineEntryGetName ARGS((
  102.     LispValue    entry
  103. ));
  104.  
  105. /*
  106.  * DefineEntryGetInteger --
  107.  *    Returns "value" number for given define entry.
  108.  *
  109.  * Exceptions:
  110.  *    BadArg if entry is an invalid "entry."
  111.  *    "WARN" if "value" is not a string.
  112.  */
  113. extern
  114. int32
  115. DefineEntryGetInteger ARGS((
  116.     LispValue    entry
  117. ));
  118.  
  119. /*
  120.  * DefineEntryGetLength --
  121.  *    Returns "value" length for given define entry.
  122.  *
  123.  * Exceptions:
  124.  *    BadArg if entry is an invalid "entry."
  125.  *    "WARN" if "value" is not a positive number or "variable."
  126.  */
  127. extern
  128. int16        /* int2 */
  129. DefineEntryGetLength ARGS((
  130.     LispValue    entry
  131. ));
  132.  
  133. /*
  134.  * DefineListAssertEmpty --
  135.  *    Causes an error if assocList is nonempty.
  136.  *
  137.  * Exceptions:
  138.  *    BadArg if assocList is an invalid list.
  139.  */
  140. extern
  141. void
  142. DefineListAssertEmpty ARGS((
  143.     LispValue    assocList
  144. ));
  145.  
  146. /*
  147.  * private?
  148.  */
  149.  
  150. /*
  151.  * LispRemoveMatchingString --
  152.  *    Returns first list element with car matching given string or LispNil.
  153.  *
  154.  * Side effects:
  155.  *    Returned list element is removed from *assocListInOutP.
  156.  *
  157.  * Exceptions:
  158.  *    BadArg if assocListInOutP is invalid.
  159.  *    BadArg if *assocListInOutP is not a list.
  160.  *    BadArg if string is invalid.
  161.  */
  162. extern
  163. LispValue
  164. LispRemoveMatchingString ARGS((
  165.     LispValue    *assocListInOutP,
  166.     String        string
  167. ));
  168.  
  169. /*
  170.  * LispRemoveMatchingSymbol --
  171.  *    Returns first list element with car matching given symbol or LispNil.
  172.  *
  173.  * Side effects:
  174.  *    Returned list element is removed from *AssocListP.
  175.  *
  176.  * Exceptions:
  177.  *    BadArg if assocListP is invalid.
  178.  *    BadArg if *assocListP is not a list.
  179.  *    BadArg if symbol is not a symbol handle.
  180.  */
  181. extern
  182. LispValue
  183. LispRemoveMatchingSymbol ARGS((
  184.     LispValue    *assocListP,
  185.     int        symbol
  186. ));
  187.  
  188. #endif    /* !defined(ManipIncluded) */
  189.