/* $Id: filedup.h,v 8.3 2012/09/05 23:28:26 ksb Exp $ * routines to keep track of dup files (hard links) (ksb) */ typedef struct AE { dev_t mydev; ino_t myino; char *pcname; time_t kctime; /* unlink and chmod are mean mod ctime */ } AE_ELEMENT; #define nilAE ((AE_ELEMENT *)0) /* Indices for AVsbpAVchild tag */ #define AV_LCHILD 0 #define AV_RCHILD 1 /* Balance factors (can be used to select child to traverse too) */ #define AV_BAL_LEFT AV_LCHILD #define AV_BAL_CENTER -1 #define AV_BAL_RIGHT AV_RCHILD typedef unsigned AVCARDINAL; /* short/normal/long unsigned */ typedef struct AVnode { struct AVnode *AVsbpAVchild[2]; /* AVL children */ short int AVbtipped; /* AVL balance factor */ AE_ELEMENT AE_data; } AVL; #define nilAV ((AVL *)0) typedef AVL *FILEDUPS; extern char *FDAdd(AVL **, char *, struct stat *); #define FDScan AVScan #define FDInit AVInit extern int AVScan(AVL *, int (*)(AE_ELEMENT *));