From b22b8582b085964e7e9d6e81a33a3e1373918e3e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 23 Aug 2015 22:47:01 +0200 Subject: [PATCH] Fixed octal issue --- rtexif/sonyminoltaattribs.cc | 18 +++++++++--------- tools/generateLensList | 2 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 6d248feda..b44f74fbd 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -1054,15 +1054,15 @@ class SALensID2Interpreter : public IntLensInterpreter< int > public: SALensID2Interpreter () { - choices.insert(p_t(00000, "Unknown E-mount lens or other lens")); - choices.insert(p_t(00001, "Sony LA-EA1 Adapter")); - choices.insert(p_t(00002, "Sony LA-EA2 Adapter")); - choices.insert(p_t(00003, "Sony LA-EA3 Adapter")); - choices.insert(p_t(00006, "Sony LA-EA4 Adapter")); - choices.insert(p_t(00044, "Metabones Canon EF Smart Adapter")); - choices.insert(p_t(00078, "Metabones Canon EF Smart Adapter Mark III or IV")); - choices.insert(p_t(00234, "Adapter only - no lens attached")); - choices.insert(p_t(00239, "Metabones Canon EF Speed Booster")); + choices.insert(p_t(0, "Unknown E-mount lens or other lens")); + choices.insert(p_t(1, "Sony LA-EA1 Adapter")); + choices.insert(p_t(2, "Sony LA-EA2 Adapter")); + choices.insert(p_t(3, "Sony LA-EA3 Adapter")); + choices.insert(p_t(6, "Sony LA-EA4 Adapter")); + choices.insert(p_t(44, "Metabones Canon EF Smart Adapter")); + choices.insert(p_t(78, "Metabones Canon EF Smart Adapter Mark III or IV")); + choices.insert(p_t(234, "Adapter only - no lens attached")); + choices.insert(p_t(239, "Metabones Canon EF Speed Booster")); choices.insert(p_t(32784, "Sony E 16mm F2.8")); choices.insert(p_t(32785, "Sony E 18-55mm F3.5-5.6 OSS")); choices.insert(p_t(32786, "Sony E 55-210mm F4.5-6.3 OSS")); diff --git a/tools/generateLensList b/tools/generateLensList index e4e01784a..c02db7e9e 100755 --- a/tools/generateLensList +++ b/tools/generateLensList @@ -46,8 +46,6 @@ for cam in "${cams[@]}"; do xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -sony:all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; } sort -fuV "${tmpdir}/cam" > "${tmpdir}/sony-lenstype2" rm -f "${tmpdir}/cam" - # Pad IDs shorter than 5 digits with 0s - sed -r -i -e 's/^[0-9]/0000&/' -e 's/0*([0-9]{5,})/\1/' "${tmpdir}/sony-lenstype2" sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' ${tmpdir}/sony ${tmpdir}/sony-lenstype2 ;; esac