X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/5d9fd22aa85423521ff7c4c004f6e6299d99aad0..47a7631fc173b345182df04f67523d3b2fe4ba83:/fattr.h diff --git a/fattr.h b/fattr.h deleted file mode 100644 index d08be26..0000000 --- a/fattr.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*-c-*- - * - * Handling of file attributes - * - * (c) 1999 Straylight/Edgeware - */ - -/*----- Licensing notice --------------------------------------------------* - * - * This file is part of the `fw' port forwarder. - * - * `fw' 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 of the License, or - * (at your option) any later version. - * - * `fw' 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 `fw'; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef FATTR_H -#define FATTR_H - -#ifdef __cplusplus - extern "C" { -#endif - -/*----- Header files ------------------------------------------------------*/ - -#include "config.h" - -#include - -#include "scan.h" - -/*----- Data structures ---------------------------------------------------*/ - -typedef struct fattr { - unsigned mode; - uid_t uid; - gid_t gid; -} fattr; - -/*----- Global variables --------------------------------------------------*/ - -extern fattr fattr_global; - -/*----- Functions provided ------------------------------------------------*/ - -/* --- @fattr_init@ --- * - * - * Arguments: @fattr *f@ = pointer to file attributes - * - * Returns: --- - * - * Use: Initializes a set of file attributes to default values. - */ - -extern void fattr_init(fattr */*f*/); - -/* --- @fattr_option@ --- * - * - * Arguments: @scanner *sc@ = pointer to scanner to read - * @fattr *f@ = pointer to file attributes to set - * - * Returns: Whether the option was clamed. - * - * Use: Reads file attributes from a scanner. - */ - -extern int fattr_option(scanner */*sc*/, fattr */*f*/); - -/* --- @fattr_apply@ --- * - * - * Arguments: @const char *file@ = pointer to filename - * @fattr *f@ = pointer to attribute set - * - * Returns: @-1@ if it failed. - * - * Use: Applies file attributes to a file. For best results, try to - * create the file with the right permissions and so on. This - * call will fix everything up, but there are potential races - * which might catch you out if you're not careful. - */ - -extern int fattr_apply(const char */*file*/, fattr */*f*/); - -/*----- That's all, folks -------------------------------------------------*/ - -#ifdef __cplusplus - } -#endif - -#endif