Lines Matching refs:file_info
30 file_info.inode_ptr=ptr; in init_file_info()
31 file_info.inode_offset=device_offset; in init_file_info()
33 file_info.global_block_num=ptr->i_block [0]; in init_file_info()
34 file_info.global_block_offset=ptr->i_block [0]*file_system_info.block_size; in init_file_info()
35 file_info.block_num=0; in init_file_info()
36 file_info.blocks_count=(ptr->i_size+file_system_info.block_size-1)/file_system_info.block_size; in init_file_info()
37 file_info.file_offset=0; in init_file_info()
38 file_info.file_length=ptr->i_size; in init_file_info()
39 file_info.level=0; in init_file_info()
40 file_info.offset_in_block=0; in init_file_info()
42 file_info.display=HEX; in init_file_info()
44 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset); in init_file_info()
59 if (file_info.display==HEX) in type_file___show()
61 if (file_info.display==TEXT) in type_file___show()
78 if (file_info.block_num+block_offset >= file_info.blocks_count) { in type_file___nextblock()
83 file_info.block_num+=block_offset; in type_file___nextblock()
84 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info); in type_file___nextblock()
85 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size; in type_file___nextblock()
86 file_info.file_offset=file_info.block_num*file_system_info.block_size; in type_file___nextblock()
88 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset); in type_file___nextblock()
106 if (file_info.offset_in_block+offset < file_system_info.block_size) { in type_file___next()
107 file_info.offset_in_block+=offset; in type_file___next()
134 file_info.offset_in_block=offset; in type_file___offset()
156 if (file_info.offset_in_block-offset >= 0) { in type_file___prev()
157 file_info.offset_in_block-=offset; in type_file___prev()
179 if (file_info.block_num-block_offset < 0) { in type_file___prevblock()
184 file_info.block_num-=block_offset; in type_file___prevblock()
185 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info); in type_file___prevblock()
186 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size; in type_file___prevblock()
187 file_info.file_offset=file_info.block_num*file_system_info.block_size; in type_file___prevblock()
189 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset); in type_file___prevblock()
210 if (block_offset < 0 || block_offset >= file_info.blocks_count) { in type_file___block()
215 file_info.block_num=block_offset; in type_file___block()
216 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info); in type_file___block()
217 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size; in type_file___block()
218 file_info.file_offset=file_info.block_num*file_system_info.block_size; in type_file___block()
220 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset); in type_file___block()
238 file_info.display=HEX; in type_file___display()
244 file_info.display=TEXT; in type_file___display()
264 ch_ptr=file_info.buffer; in file_show_hex()
266 if (file_info.file_offset+offset>file_info.file_length-1) break; in file_show_hex()
270 if (file_info.file_offset+offset+i>file_info.file_length-1) { in file_show_hex()
275 if (file_info.offset_in_block==offset+i) in file_show_hex()
283 if (file_info.offset_in_block==offset+i) in file_show_hex()
290 if (file_info.file_offset+offset+i>file_info.file_length-1) break; in file_show_hex()
291 if (file_info.offset_in_block==offset+i) in file_show_hex()
296 if (file_info.offset_in_block==offset+i) { in file_show_hex()
327 ch_ptr=file_info.buffer; in file_show_text()
331 if (file_info.file_offset+last_offset > file_info.file_length-1) in file_show_text()
332 last_offset=file_info.file_length-1-file_info.file_offset; in file_show_text()
342 if (file_info.offset_in_block==offset) in file_show_text()
362 if (file_info.offset_in_block==offset) { in file_show_text()
385 wprintw (show_win,"File contents. Block %ld. ",file_info.global_block_num); in show_status()
386 wprintw (show_win,"File block %ld of %ld. ",file_info.block_num,file_info.blocks_count-1); in show_status()
387 wprintw (show_win,"File Offset %ld of %ld.",file_info.file_offset,file_info.file_length-1); in show_status()
390 inode_num=inode_offset_to_inode_num (file_info.inode_offset); in show_status()
391 wprintw (show_win,"File inode %ld. Indirection level %ld.",inode_num,file_info.level); in show_status()
467 file_info.buffer [file_info.offset_in_block]=tmp; in type_file___set()
468 file_info.offset_in_block++; in type_file___set()
470 if (file_info.offset_in_block==file_system_info.block_size) { in type_file___set()
475 file_info.offset_in_block--; in type_file___set()
484 file_info.buffer [file_info.offset_in_block]=tmp; in type_file___set()
485 file_info.offset_in_block++; in type_file___set()
486 if (file_info.offset_in_block==file_system_info.block_size) { in type_file___set()
491 file_info.offset_in_block--; in type_file___set()
502 low_write (file_info.buffer,file_system_info.block_size,file_info.global_block_offset); in type_file___writedata()