* (c) 1999 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
extern key_data *key_newencrypted(unsigned /*e*/,
const void */*p*/, size_t /*sz*/);
-/* --- @key_mewmp@ --- *
+/* --- @key_newmp@ --- *
*
* Arguments: @unsigned e@ = other encoding flags
* @mp *m@ = pointer to the value to set
if (_k->ref == 0) \
key_destroy(_k); \
} while (0)
-
+
extern void key_drop(key_data */*k*/);
/* --- @key_do@ --- *
*
* Returns: Nonzero return code from function, or zero.
*
- * Use: Runs a function over all the leaves of a key.
+ * Use: Runs a function over all the leaves of a key.
*/
extern int key_do(key_data */*k*/, const key_filter */*kf*/, dstr */*d*/,
dstr */*d*/, void */*p*/),
void */*p*/);
+/* --- @key_copydata@ --- *
+ *
+ * Arguments: @key_data *k@ = key data to copy
+ * @const key_filter *kf@ = pointer to filter block
+ *
+ * Returns: Pointer to a copy of the data, or null if the root subkey
+ * didn't match the filter.
+ *
+ * Use: Copies a chunk of key data. Subkeys, whether they're
+ * structured or leaves, which don't match the filter aren't
+ * copied. The copy may or may not have structure in common
+ * with the original.
+ */
+
+extern key_data *key_copydata(key_data */*k*/, const key_filter */*kf*/);
+
/*----- Textual encoding --------------------------------------------------*/
/* --- @key_read@ --- *