Skip to content

Commit 46e5236

Browse files
committed
saving progress
1 parent cde474c commit 46e5236

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/scripts/ptc.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ for header in ../library/**/*.hpp; do
3333
echo "$header"
3434
for i in $(seq "$(wc --lines <"$header")" -5 1); do
3535
hash=$(head --lines "$i" "$header" | sed '/^#include/d' | cpp -dD -P -fpreprocessed | ./../library/contest/hash.sh)
36+
line_length=$(sed --quiet "${i}p" "$header" | wc --chars)
37+
padding_length=$((60 - 8 - $line_length))
38+
echo $line_length
39+
echo $padding_length
40+
padding_length=$(( $padding_length > 0 ? $padding_length : 0 ))
41+
echo $padding_length
42+
padding=$(printf '%*s' "$num_spaces")
3643
sed --in-place "${i}s/$/\/\/${hash}/" "$header"
3744
done
3845
done

0 commit comments

Comments
 (0)