From 754452553915964dadd3c1fdb5e8b579747e9873 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 21 Mar 1996 00:37:28 +0000 Subject: Initial revision --- libstore/enc.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 libstore/enc.c (limited to 'libstore') diff --git a/libstore/enc.c b/libstore/enc.c new file mode 100644 index 00000000..02969d6b --- /dev/null +++ b/libstore/enc.c @@ -0,0 +1,38 @@ +/* Store wire encoding/decoding + + Copyright (C) 1996 Free Software Foundation, Inc. + + Written by Miles Bader + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include "store.h" + +/* Encode STORE into ENC, or return an error. The contents of ENC may + then be return as the value of file_get_storage_info; if for some reason + this can't be done, store_enc_dealloc may be used to deallocate the + mmemory used by the unsent vectors. */ +error_t store_encode (const struct store *store, struct store_enc *enc); + +/* Decode ENC, either returning a new store in STORE, or an error. If + nothing else is to be done with ENC, its contents may then be freed using + store_enc_dealloc. */ +error_t store_decode (struct store_enc *enc, struct store *store); + +/* Deallocate storage used by the fields in ENC (but nothing is done with ENC + itself). */ +void store_enc_dealloc (struct store_enc *enc); -- cgit v1.2.3