- for (max = 0, cnt = 0777; cnt; --cnt)
- if (dmodes[cnt] > max) {
- max = dmodes[cnt];
- dmode = cnt;
- }
- (void)printf("/set dmode=%o\n", dmode);
- for (max = 0, cnt = 0777; cnt; --cnt)
- if (fmodes[cnt] > max) {
- max = dmodes[cnt];
- fmode = cnt;
- }
- (void)printf("/set fmode=%o\n", fmode);
- for (max = 0, p = uhead; p; p = p->next)
- if (p->cnt > max) {
- max = p->cnt;
- uid = p->id;
- }
- (void)printf("/set owner=%u\n", uid);
- for (max = 0, p = ghead; p; p = p->next)
- if (p->cnt > max) {
- max = p->cnt;
- gid = p->id;
- }
- (void)printf("/set group=%u\n", gid);
- (void)printf("/set nlink=1\n");
- if (dflag) {
- type = F_DIR;
- (void)printf("/set type=dir\n\n");
- } else {
- type = F_FILE;
- (void)printf("/set type=file\n\n");
- }
+ a = *p1;
+ b = *p2;
+
+ if (S_ISDIR(a->fts_statb.st_mode)) {
+ if (!S_ISDIR(b->fts_statb.st_mode))
+ return(1);
+ } else if (S_ISDIR(b->fts_statb.st_mode))
+ return(-1);
+ return(strcmp(a->fts_name, b->fts_name));