--- libaitsync/src/dir.c 2012/11/13 13:53:14 1.3.2.3 +++ libaitsync/src/dir.c 2012/11/13 13:58:39 1.3.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: dir.c,v 1.3.2.3 2012/11/13 13:53:14 misho Exp $ +* $Id: dir.c,v 1.3.2.4 2012/11/13 13:58:39 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -65,7 +65,7 @@ find_tag(int const * __restrict tags, struct tagDirNam if (l[tags[t] + i].hash == hash) { /* finded & marked for delete! */ find = (struct tagDirName*) &l[tags[t] + i]; - find->ch = '*'; + find->ch = DIFF_D0; break; } } @@ -141,7 +141,7 @@ create_diridx(const char *csDir, int lm, int *tags, st } else memset(&l[n + 1], 0, sizeof(struct tagDirName)); - l[n].ch = '<'; + l[n].ch = DIFF_D1; l[n].tag = crcFletcher16((u_short*) d.d_name, d.d_namlen / 2 + d.d_namlen % 2); l[n].hash = crcAdler((u_char*) d.d_name, d.d_namlen); @@ -365,7 +365,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 } else memset(&l[n + 1], 0, sizeof(struct tagDirName)); - l[n].ch = '>'; + l[n].ch = DIFF_D2; l[n].tag = t; l[n].hash = hash; strlcpy(l[n].name, d.d_name, sizeof l[n].name); @@ -464,7 +464,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 } else memset(&l[n + 1], 0, sizeof(struct tagDirName)); - l[n].ch = '>'; + l[n].ch = DIFF_D2; l[n].tag = t; l[n].hash = hash; strlcpy(l[n].name, str, sizeof l[n].name); @@ -480,7 +480,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 /* delete equal elemets !!! */ for (i = cx = 0; i < n; i++) - if (l[i].ch == '*') { + if (l[i].ch == DIFF_D0) { memmove(&l[i], &l[i + 1], (n - i + 1) * sizeof(struct tagDirName)); cx++; i--;