home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DIR / MFD_1_00.ZIP / fdcomm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-17  |  2.7 KB  |  95 lines

  1. /*
  2.  * fdcomm.h
  3.  *
  4.  * common functions for find duplicates.
  5.  *
  6.  * Roy Bixler
  7.  * Monk Software
  8.  * March 23, 1991
  9.  *
  10.  * This program is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU General Public License as published by
  12.  * the Free Software Foundation; either version 1, or (at your option)
  13.  * any later version.
  14.  *
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  * GNU General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU General Public License
  21.  * along with this program; if not, write to the Free Software
  22.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  */
  24.  
  25.  
  26.  
  27. #define ADD_TO_PATH        "*.*"
  28. #define MAX_STR            80
  29. #define N_INTERACTIVE    20    /* maximum number of interactive delete menu */
  30.                             /* entries */
  31.  
  32. /*
  33.  * file matching criteria
  34.  */
  35. #define CONTENTS_MATCH    0x1
  36. #define TIMES_MATCH        0x2
  37. #define SIZES_MATCH        0x4
  38. #define NAMES_MATCH        0x8
  39. #define ALL_MATCH        (CONTENTS_MATCH|TIMES_MATCH|SIZES_MATCH|NAMES_MATCH)
  40.  
  41. /*
  42.  * file sorting criteria
  43.  */
  44. #define TIME_SORT        0x1
  45. #define SIZE_SORT        0x2
  46. #define NAME_SORT        0x4
  47.  
  48. /*
  49.  * file sort order
  50.  */
  51. #define ASCENDING        0x0
  52. #define DESCENDING        0x1
  53.  
  54.  
  55.  
  56. typedef struct file_list {
  57.     struct ffblk dta;
  58.     char *path;
  59.     char added;
  60.     char printed;
  61.     struct file_list *next;
  62. } FILE_LIST;
  63.  
  64.  
  65.  
  66. extern FILE_LIST *F_list;
  67. extern char Match_criteria, Sort_criteria, Sort_order;
  68. extern char i_flag;    /* interactive delete mode */
  69. extern char l_flag;    /* long listing? */
  70. extern char v_flag;    /* verbose? */
  71.  
  72.  
  73.  
  74. /* fdcomm.c */
  75. void print_fdate(struct ffblk *dta);
  76. void print_ftime(struct ffblk *dta);
  77. void print_fdatetime(struct ffblk *dta);
  78. void print_fpath(char *path, char *f_name);
  79. void long_listing(char *path, struct ffblk *dta);
  80. void print_match_header(FILE_LIST *start);
  81. void print_next_match(FILE_LIST *next, int menu_num);
  82. void print_id_menu(FILE_LIST **menu, int num_items);
  83. int cmpflist(FILE_LIST *fd, char *path, struct ffblk *dta);
  84. int cmpflist_eq(FILE_LIST *fd1, FILE_LIST *fd2);
  85. int files_match(FILE_LIST *file1, FILE_LIST *file2);
  86. void gen_list(char *path);
  87. void add_file_to_list(char *path, struct ffblk *dta);
  88. void gen_list_of_dir(char *path, char *subdir);
  89. void list_files(char *prog_name, char *path, char sorted);
  90. void print_flist(FILE_LIST *flist);
  91. int compare_path_name_files(char *path1, char *name1, char *path2, char *name2);
  92. int delete_path_name_file(char *path, char *f_name, char force);
  93. void get_cur_path(char *new, char *target_dir);
  94. void change_disk(char *dir, char *cur_dir);
  95.