version 1.37, 2003/08/15 23:09:57 |
version 1.38, 2003/08/15 23:23:18 |
|
|
if (bclear(bp) != TRUE) |
if (bclear(bp) != TRUE) |
return NULL; |
return NULL; |
bp->b_flag |= BFREADONLY; |
bp->b_flag |= BFREADONLY; |
if (snprintf(line, sizeof(line), "ls -al %s", dirname) >= sizeof(line)){ |
if (snprintf(line, sizeof(line), "ls -al %s", dirname) |
|
>= sizeof(line)) { |
ewprintf("Path too long"); |
ewprintf("Path too long"); |
return NULL; |
return NULL; |
} |
} |
|
|
(void) addline(bp, line); |
(void) addline(bp, line); |
} |
} |
if (pclose(dirpipe) == -1) { |
if (pclose(dirpipe) == -1) { |
ewprintf("Problem closing pipe to ls"); |
ewprintf("Problem closing pipe to ls : %s", |
|
strerror(errno)); |
return NULL; |
return NULL; |
} |
} |
bp->b_dotp = lforw(bp->b_linep); /* go to first line */ |
bp->b_dotp = lforw(bp->b_linep); /* go to first line */ |
(void) strlcpy(bp->b_fname, dirname, sizeof bp->b_fname); |
(void) strlcpy(bp->b_fname, dirname, sizeof bp->b_fname); |
if ((bp->b_modes[0] = name_mode("dired")) == NULL) { |
if ((bp->b_modes[1] = name_mode("dired")) == NULL) { |
bp->b_modes[0] = name_mode("fundamental"); |
bp->b_modes[0] = name_mode("fundamental"); |
ewprintf("Could not find mode dired"); |
ewprintf("Could not find mode dired"); |
return NULL; |
return NULL; |
} |
} |
bp->b_nmodes = 0; |
bp->b_nmodes = 1; |
return bp; |
return bp; |
} |
} |
|
|
|
|
return (ABORT); |
return (ABORT); |
} |
} |
strlcat(fn, p, len); |
strlcat(fn, p, len); |
return lgetc(lp, 2) == 'd'; |
return (lgetc(lp, 2) == 'd') ? TRUE : FALSE; |
} |
} |
#endif /* NO_DIRED */ |
#endif /* NO_DIRED */ |
|
|