Remove private_ prefix from fish dir's

This commit is contained in:
2019-04-26 06:41:04 -04:00
parent de1dc7bab8
commit e6eb1bedd0
41 changed files with 5 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
function block-to-line
set block_size 1024
set bytes_per_line 16
math "($block_size*$argv[1])/$bytes_per_line + 1"
end

View File

@@ -0,0 +1,15 @@
function revert-image
set img_file 'emptydisk.img'
switch $argv[1]
case 1
set img_file 'onefile.img'
case m
set img_file 'multilevel.img'
case l
set img_file 'largefile.img'
case s
set img_file 'symlink.img'
end
cp imgs{-cp,}/$img_file
end

View File

@@ -0,0 +1,12 @@
function hex
switch $argv[1]
case h
# print dec/bin.
printf "%d " (echo "ibase=16;obase=A;$argv[2]" | bc)
printf "%d\n" (echo "ibase=16;obase=2;$argv[2]" | bc)
case d
# print hex/bin.
printf "%s " (echo "obase=16;$argv[2]" | bc)
printf "%d\n" (echo "obase=2;$argv[2]" | bc)
end
end

View File

@@ -0,0 +1,3 @@
function mount-image
sudo mount $argv[1] /mnt/369-a4
end

View File

@@ -0,0 +1,35 @@
function run-a4
# 1 = ex, 2 = img
printf '\033c'
# and bear make clean
bear make
set img_file 'imgs/emptydisk.img'
switch $argv[2]
case 1
set img_file 'imgs/onefile.img'
case m
set img_file 'imgs/multilevel.img'
case l
set img_file 'imgs/largefile.img'
case s
set img_file 'imgs/symlink.img'
end
switch $argv[1]
case h
./ext2_helpers_tester $img_file
case hg
gdb -ex "run" -ex "bt" -ex "q" \
--args ./ext2_helpers_tester './imgs/multilevel.img' '/level1/level2/level3//'
case m
./ext2_mkdir $img_file '/'
# ./ext2_mkdir 'imgs/multilevel.img' '/level1/level2/bfile'
case rg
./readimage $img_file
gdb -ex "run" -ex "bt" -ex "q" \
--args ./readimage './imgs/symlink.img'
case '*'
./readimage $img_file
end
end