"Fossies" - the Fresh Open Source Software Archive

Member "dosfstools-4.2/src/file.h" (31 Jan 2021, 2273 Bytes) of package /linux/misc/dosfstools-4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "file.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.0.27_vs_3.0.28.

    1 /* file.h - Additional file attributes
    2 
    3    Copyright (C) 1993 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
    4    Copyright (C) 2008-2014 Daniel Baumann <mail@daniel-baumann.ch>
    5 
    6    This program is free software: you can redistribute it and/or modify
    7    it under the terms of the GNU General Public License as published by
    8    the Free Software Foundation, either version 3 of the License, or
    9    (at your option) any later version.
   10 
   11    This program is distributed in the hope that it will be useful,
   12    but WITHOUT ANY WARRANTY; without even the implied warranty of
   13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   14    GNU General Public License for more details.
   15 
   16    You should have received a copy of the GNU General Public License
   17    along with this program. If not, see <http://www.gnu.org/licenses/>.
   18 
   19    The complete text of the GNU General Public License
   20    can be found in /usr/share/common-licenses/GPL-3 file.
   21 */
   22 
   23 #ifndef _FILE_H
   24 #define _FILE_H
   25 
   26 #include "msdos_fs.h"
   27 
   28 typedef enum { fdt_none, fdt_drop, fdt_undelete } FD_TYPE;
   29 
   30 typedef struct _fptr {
   31     char name[MSDOS_NAME];
   32     FD_TYPE type;
   33     struct _fptr *first;    /* first entry */
   34     struct _fptr *next;     /* next file in directory */
   35 } FDSC;
   36 
   37 extern FDSC *fp_root;
   38 
   39 char *file_name(unsigned char *fixed);
   40 
   41 /* Returns a pointer to a pretty-printed representation of a fixed MS-DOS file
   42    name. */
   43 
   44 int file_cvt(unsigned char *name, unsigned char *fixed);
   45 
   46 /* Converts a pretty-printed file name to the fixed MS-DOS format. Returns a
   47    non-zero integer on success, zero on failure. */
   48 
   49 void file_add(char *path, FD_TYPE type);
   50 
   51 /* Define special attributes for a path. TYPE can be either FDT_DROP or
   52    FDT_UNDELETE. */
   53 
   54 FDSC **file_cd(FDSC ** curr, char *fixed);
   55 
   56 /* Returns a pointer to the directory descriptor of the subdirectory FIXED of
   57    CURR, or NULL if no such subdirectory exists. */
   58 
   59 FD_TYPE file_type(FDSC ** curr, char *fixed);
   60 
   61 /* Returns the attribute of the file FIXED in directory CURR or FDT_NONE if no
   62    such file exists or if CURR is NULL. */
   63 
   64 void file_modify(FDSC ** curr, char *fixed);
   65 
   66 /* Performs the necessary operation on the entry of CURR that is named FIXED. */
   67 
   68 void file_unused(void);
   69 
   70 /* Displays warnings for all unused file attributes. */
   71 
   72 #endif