~ubuntu-branches/ubuntu/trusty/screen/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/23exitcode_q_ls.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2008-06-12 19:33:30 UTC
  • mfrom: (1.1.13 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080612193330-1tt3qhpxonbgdmq2
Tags: 4.0.3-11
* Unbreak <End> and <^A Bksp> using a patch from Loïc Minier
  (thanks!) - introduced as new 45suppress_remap.dpatch.
  Closes: #484647.
* Bump Standards version to 3.8.0. No changes necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 23exitcode_q_ls.dpatch by  <hesso@pool.math.tu-berlin.de>
 
3
##
 
4
## DP: Make the exitcode of '-q -ls' and friends ('-qr -ls' and even
 
5
## DP: '-qdr -ls') match the documentation.
 
6
 
 
7
@DPATCH@
 
8
diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c
 
9
--- screen-4.0.3.orig/screen.c  2008-06-01 23:41:11.000000000 +0200
 
10
+++ screen-4.0.3/screen.c       2008-06-01 23:44:59.000000000 +0200
 
11
@@ -1073,8 +1073,12 @@
 
12
       eff_uid = real_uid;
 
13
       eff_gid = real_gid;
 
14
       i = FindSocket((int *)NULL, &fo, &oth, SockMatch);
 
15
-      if (quietflag)
 
16
-        exit(8 + (fo ? ((oth || i) ? 2 : 1) : 0) + i);
 
17
+      if (quietflag) {
 
18
+        if (rflag)
 
19
+          exit(10 + i);
 
20
+        else
 
21
+          exit(9 + (fo || oth ? 1 : 0) + fo);
 
22
+      }
 
23
       if (fo == 0)
 
24
         Panic(0, "No Sockets found in %s.\n", SockPath);
 
25
       Panic(0, "%d Socket%s in %s.\n", fo, fo > 1 ? "s" : "", SockPath);