csi: secondary DA: do not pretend we're xterm

Previously, our secondary DA response indicated a) VT420, b) an XTerm
version number.

Now, we indicate VT220 (which corresponds to the primary DA response),
and we report foot's version number as MMmmpp. I.e major, minor and
patch versions, using two digits.

E.g. 1.4.2 is encoded as 010402
This commit is contained in:
Daniel Eklöf 2020-07-24 17:47:47 +02:00
parent cc60d3a670
commit 60984e7a24
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 31 additions and 3 deletions

View file

@ -22,7 +22,14 @@ else
new_version="${default_version}"
fi
new_version="#define FOOT_VERSION \"${new_version}\""
major=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1/')
minor=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\2/')
patch=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/')
new_version="#define FOOT_VERSION \"${new_version}\"
#define FOOT_MAJOR ${major}
#define FOOT_MINOR ${minor}
#define FOOT_PATCH ${patch}"
if [ -f "${out_file}" ]; then
old_version=$(cat "${out_file}")