[Debian-astro-commits] [iraf] 03/04: Automatic setting of terminal type, 2nd attempt
Ole Streicher
olebole at moszumanska.debian.org
Thu Dec 7 20:18:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch master
in repository iraf.
commit abebc7e3d474c98bba01c12563bc2bc226beee3e
Author: Ole Streicher <olebole at debian.org>
Date: Thu Dec 7 21:15:46 2017 +0100
Automatic setting of terminal type, 2nd attempt
---
.../patches/Adjust-version-number-and-motd.patch | 6 ++--
.../patches/Create-a-global-login.cl-in-etc.patch | 32 +++++++++-------------
debian/patches/Don-t-call-back-home-on-start.patch | 29 ++++++++++++++------
3 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/debian/patches/Adjust-version-number-and-motd.patch b/debian/patches/Adjust-version-number-and-motd.patch
index ad21ffb..600ba39 100644
--- a/debian/patches/Adjust-version-number-and-motd.patch
+++ b/debian/patches/Adjust-version-number-and-motd.patch
@@ -12,7 +12,7 @@ Subject: Adjust version number and motd
create mode 100644 unix/hlib/motd.etc
diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 1f3fc5f..202ab9e 100644
+index 727cd4d..9fb8049 100644
--- a/unix/hlib/login.cl
+++ b/unix/hlib/login.cl
@@ -2,7 +2,7 @@
@@ -24,7 +24,7 @@ index 1f3fc5f..202ab9e 100644
set home = (envget("HOME") // "/.iraf/")
set imdir = "home$imdir/"
-@@ -131,7 +131,10 @@ cache directory page type help
+@@ -139,7 +139,10 @@ cache directory page type help
if (access (".hushiraf"))
menus = no
else {
@@ -32,7 +32,7 @@ index 1f3fc5f..202ab9e 100644
+ clear
+ printf ("\n %s\n\n", envget("version"))
+ type /etc/iraf/motd
-+ printf ("\n\n")
++ printf ("\n")
}
diff --git a/debian/patches/Create-a-global-login.cl-in-etc.patch b/debian/patches/Create-a-global-login.cl-in-etc.patch
index e690368..1bd92f1 100644
--- a/debian/patches/Create-a-global-login.cl-in-etc.patch
+++ b/debian/patches/Create-a-global-login.cl-in-etc.patch
@@ -5,8 +5,8 @@ Subject: Create a global login.cl in /etc
---
pkg/cl/main.c | 12 +++++++++++-
pkg/ecl/main.c | 12 +++++++++++-
- unix/hlib/login.cl | 24 +++++++-----------------
- 3 files changed, 29 insertions(+), 19 deletions(-)
+ unix/hlib/login.cl | 25 ++++++++++++++-----------
+ 3 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/pkg/cl/main.c b/pkg/cl/main.c
index 0471f4c..6027bf3 100644
@@ -55,10 +55,10 @@ index ee1aeae..7e927c9 100644
} else {
diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 5a4d375..1f3fc5f 100644
+index 5a4d375..727cd4d 100644
--- a/unix/hlib/login.cl
+++ b/unix/hlib/login.cl
-@@ -4,19 +4,14 @@
+@@ -4,19 +4,22 @@
if (defpar ("logver"))
logver = "IRAF V2.16.1 Oct 2013"
@@ -80,21 +80,15 @@ index 5a4d375..1f3fc5f 100644
+set userid = envget("USER")
+# Set the terminal type.
-+#stty xgterm # xgterm, xtermjh, xterm
++if (envget("TERM") == "xgterm")
++ stty xgterm
++else
++if (envget("TERM") == "xterm")
++ stty xtermjh
++else
++ stty vt220
++print ("!!stty size") | cl() | scan(i,j)
++stty nlines=(i) ncols=(j)
#============================================================================
# Uncomment and edit to change the defaults.
-@@ -145,12 +140,7 @@ else {
- chkupdate
-
- # Notify the user if we're using the global login.
--path (".") | scan (s1)
--if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
-- printf (" *** Using global login file: %slogin.cl\n", osfn("home$"))
--}
--;
--
-+printf (" *** Using global login file: /etc/iraf/login.cl\n")
-
- #============================================================================
- # Uncomment to initialize the SAMP interface on startup.
diff --git a/debian/patches/Don-t-call-back-home-on-start.patch b/debian/patches/Don-t-call-back-home-on-start.patch
index 84d8142..9caaeae 100644
--- a/debian/patches/Don-t-call-back-home-on-start.patch
+++ b/debian/patches/Don-t-call-back-home-on-start.patch
@@ -3,19 +3,30 @@ Date: Sat, 25 Nov 2017 15:44:58 +0100
Subject: Don't call back home on start
---
- unix/hlib/login.cl | 2 --
- 1 file changed, 2 deletions(-)
+ unix/hlib/login.cl | 13 -------------
+ 1 file changed, 13 deletions(-)
diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 202ab9e..edc1a20 100644
+index 9fb8049..02d2799 100644
--- a/unix/hlib/login.cl
+++ b/unix/hlib/login.cl
-@@ -139,8 +139,6 @@ else {
+@@ -145,19 +145,6 @@ else {
+ printf ("\n")
+ }
-
- #============================================================================
+-
+-#============================================================================
-# Check for updates to the system
-chkupdate
-
- # Notify the user if we're using the global login.
- printf (" *** Using global login file: /etc/iraf/login.cl\n")
+-
+-# Notify the user if we're using the global login.
+-path (".") | scan (s1)
+-if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
+- printf (" *** Using global login file: %slogin.cl\n", osfn("home$"))
+-}
+-;
+-
+-
+ #============================================================================
+ # Uncomment to initialize the SAMP interface on startup.
+ if (deftask ("samp") == yes) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/iraf.git
More information about the Debian-astro-commits
mailing list