while (fgets(&line[2], 254, dirpipe) != NULL) {
while (fgets(&line[2], sizeof(line) - 2, dirpipe) != NULL) {
dired_(dirname)	char   *dirname;{	BUFFER *bp;	FILE   *dirpipe;	char    line[256];	if ((dirname = adjustname(dirname)) == NULL) {		ewprintf("Bad directory name");		return NULL;	}	if (dirname[strlen(dirname) - 1] != '/')		(void) strcat(dirname, "/");	if ((bp = findbuffer(dirname)) == NULL) {		ewprintf("Could not create buffer");		return NULL;	}	if (bclear(bp) != TRUE)		return FALSE;	(void) strcpy(line, "ls -al ");	(void) strcpy(&line[7], dirname);	if ((dirpipe = popen(line, "r")) == NULL) {		ewprintf("Problem opening pipe to ls");		return NULL;	}	line[0] = line[1] = ' ';	while (fgets(&line[2], 254, dirpipe) != NULL) {		line[strlen(line) - 1] = '\0';	/* remove ^J	 */		(void) addline(bp, line);	}	if (pclose(dirpipe) == -1) {		ewprintf("Problem closing pipe to ls");		return NULL;	}	bp->b_dotp = lforw(bp->b_linep);	/* go to first line */	(void) strncpy(bp->b_fname, dirname, NFILEN);	if ((bp->b_modes[0] = name_mode("dired")) == NULL) {		bp->b_modes[0] = &map_table[0];		ewprintf("Could not find mode dired");		return NULL;	}	bp->b_nmodes = 0;	return bp;}