X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/45c0fd363937c6e9b05da04a9167e9912c05ca0c..e564e3f84ad0ea42b78559c0bfe304893fd5e76b:/key-data.h diff --git a/key-data.h b/key-data.h index e216bc0..d6a5636 100644 --- a/key-data.h +++ b/key-data.h @@ -245,7 +245,7 @@ extern key_data *key_newbinary(unsigned /*e*/, 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 @@ -414,6 +414,22 @@ 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@ --- *