Lines Matching +full:long +full:- +full:press +full:- +full:mode

68     if (sf->filesc > 0) {  in split_file_destroy()
69 for (i = 0; i < sf->filesc; i++) { in split_file_destroy()
70 free(sf->filesv[i]); in split_file_destroy()
71 free(sf->descsv[i]); in split_file_destroy()
73 free(sf->filesv); in split_file_destroy()
74 free(sf->descsv); in split_file_destroy()
85 sf->curfd = open(sf->filesv[sf->curfile], O_RDONLY); in split_openfile()
86 if (sf->curfd >= 0) in split_openfile()
88 if ((sf->curfd == -1) && (errno != ENOENT)) in split_openfile()
92 printf("\nInsert disk labelled %s and press any key...", in split_openfile()
93 sf->descsv[sf->curfile]); in split_openfile()
97 sf->file_pos = 0; in split_openfile()
109 /* Have to be in "just read it" mode */ in splitfs_open()
110 if (f->f_flags != F_READ) in splitfs_open()
124 if (conffd == -1) in splitfs_open()
154 sf->filesc++; in splitfs_open()
155 sf->filesv = realloc(sf->filesv, sizeof(*(sf->filesv)) * sf->filesc); in splitfs_open()
156 sf->descsv = realloc(sf->descsv, sizeof(*(sf->descsv)) * sf->filesc); in splitfs_open()
157 sf->filesv[sf->filesc - 1] = strdup(buf); in splitfs_open()
158 sf->descsv[sf->filesc - 1] = strdup(cp); in splitfs_open()
163 if (sf->filesc == 0) { in splitfs_open()
174 f->f_fsdata = sf; in splitfs_open()
184 sf = (struct split_file *)f->f_fsdata; in splitfs_close()
185 fd = sf->curfd; in splitfs_close()
197 sf = (struct split_file *)f->f_fsdata; in splitfs_read()
200 nread = read(sf->curfd, buf, size - totread); in splitfs_read()
203 if (nread == -1) in splitfs_read()
206 sf->tot_pos += nread; in splitfs_read()
207 sf->file_pos += nread; in splitfs_read()
212 if (sf->curfile == (sf->filesc - 1)) /* Last slice */ in splitfs_read()
216 if (close(sf->curfd) != 0) in splitfs_read()
219 sf->curfile++; in splitfs_read()
227 *resid = size - totread; in splitfs_read()
240 sf = (struct split_file *)f->f_fsdata; in splitfs_seek()
245 seek_by -= sf->tot_pos; in splitfs_seek()
254 return (-1); in splitfs_seek()
259 * Seek forward - implemented using splitfs_read(), because otherwise we'll be in splitfs_seek()
261 * unable to do a long seek crossing that boundary. in splitfs_seek()
268 return (-1); in splitfs_seek()
272 for (; seek_by > 0; seek_by -= nread) { in splitfs_seek()
275 nread = min(seek_by, SEEK_BUF) - resid; in splitfs_seek()
282 return (-1); in splitfs_seek()
287 if (sf->file_pos + seek_by < 0) in splitfs_seek()
289 new_pos = lseek(sf->curfd, seek_by, SEEK_CUR); in splitfs_seek()
292 return (-1); in splitfs_seek()
294 sf->tot_pos += new_pos - sf->file_pos; in splitfs_seek()
295 sf->file_pos = new_pos; in splitfs_seek()
298 return (sf->tot_pos); in splitfs_seek()
305 struct split_file *sf = (struct split_file *)f->f_fsdata; in splitfs_stat()
308 if ((result = fstat(sf->curfd, sb)) == 0) in splitfs_stat()
309 sb->st_size = -1; in splitfs_stat()