From e2e1a1ed50ef56baca36d4df3897b57cdfc38493 Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Wed, 28 Dec 2016 17:38:25 +0200
Subject: [PATCH 2/2] Ticket #3747: extfs: hp48: make the code more readable.
Whitespace tweaking here. There's no change in the code itself except for
using '%c' in the first printf too, to make it like the second printf.
---
src/vfs/extfs/helpers/hp48+.in | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/vfs/extfs/helpers/hp48+.in b/src/vfs/extfs/helpers/hp48+.in
index 838f565..17c03ab 100644
a
|
b
|
echo QUIT)| $KERMIT -B >/dev/null |
65 | 65 | hp48_parser() |
66 | 66 | { |
67 | 67 | HP48_DIRS= |
| 68 | |
68 | 69 | read -r INPUT |
69 | 70 | while [ "x$INPUT" != "xEOF" ] |
70 | 71 | do |
… |
… |
do |
77 | 78 | obj_size=`echo $obj_size | $AWK '{ print int($0) }'` # Truncates floats to ints; anything else to "0". |
78 | 79 | |
79 | 80 | if [ "$obj_size" != "0" ]; then # Skips the 1st reply line (purportedly there aren't zero-size files b/c, according to resource [4], the size is "including name"). |
80 | | case "$obj_type" in |
81 | | Directory) HP48_DIRS="$HP48_DIRS $obj_name" |
82 | | printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s\n" 0 0 $obj_size "$NOW" "$HP48_CDIR/$obj_name";; |
83 | | *) printf "%crw-r--r-- 1 %-8d %-8d %8d %s %s\n" '-' 0 0 $obj_size "$NOW" "$HP48_CDIR/$obj_name";; |
| 81 | case "$obj_type" in |
| 82 | Directory) |
| 83 | HP48_DIRS="$HP48_DIRS $obj_name" |
| 84 | printf "%crwxr-xr-x 1 %-8d %-8d %8d %s %s\n" 'd' \ |
| 85 | 0 0 $obj_size "$NOW" "$HP48_CDIR/$obj_name" |
| 86 | ;; |
| 87 | *) |
| 88 | printf "%crw-r--r-- 1 %-8d %-8d %8d %s %s\n" '-' \ |
| 89 | 0 0 $obj_size "$NOW" "$HP48_CDIR/$obj_name" |
| 90 | ;; |
84 | 91 | esac |
85 | 92 | fi |
86 | 93 | |
87 | 94 | read -r INPUT |
88 | 95 | done |
| 96 | |
89 | 97 | for HP48_DIR in $HP48_DIRS; |
90 | 98 | do |
91 | 99 | HP48_PDIR="$HP48_CDIR" |