~ubuntu-branches/ubuntu/breezy/uucp/breezy

« back to all changes in this revision

Viewing changes to debian/patch.uucico-grades

  • Committer: Bazaar Package Importer
  • Author(s): Peter Palfrader
  • Date: 2004-12-30 15:30:22 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041230153022-mx4cdr9j3u9bldo3
Tags: 1.07-12
Add cs localisation for debconf templates (closes: #287305).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
The following patch by Christian Kurz <shorty@debian.org> adds grade
3
 
support to uucico.
4
 
 
5
 
--- uucp-1.06.1.orig/uucico.c   Sat Jan  4 18:11:53 1997
6
 
+++ uucp-1.06.1/uucico.c        Sat Jan  4 18:24:58 1997
7
 
@@ -126,6 +126,9 @@
8
 
   struct sconnection *qconn;
9
 
 };
10
 
 
11
 
+/* min. grade set on commandline */
12
 
+static char cmdlgrade = '\0';
13
 
+
14
 
 /* Local functions.  */
15
 
 
16
 
 static void uusage P((void));
17
 
@@ -176,6 +179,7 @@
18
 
   { "nodetach", no_argument, NULL, 'D' },
19
 
   { "loop", no_argument, NULL, 'e' },
20
 
   { "force", no_argument, NULL, 'f'},
21
 
+  { "grade", required_argument, NULL, 'g'},
22
 
   { "stdin", required_argument, NULL, 'i' },
23
 
   { "prompt", no_argument, NULL, 'l' },
24
 
   { "port", required_argument, NULL, 'p' },
25
 
@@ -250,9 +254,9 @@
26
 
     ++zProgram;
27
 
 
28
 
 #if COHERENT_C_OPTION
29
 
-  zopts = "c:CDefi:I:lp:qr:s:S:u:x:X:vwz";
30
 
+  zopts = "c:CDefg:i:I:lp:qr:s:S:u:x:X:vwz";
31
 
 #else
32
 
-  zopts = "cCDefi:I:lp:qr:s:S:u:x:X:vwz";
33
 
+  zopts = "cCDefg:i:I:lp:qr:s:S:u:x:X:vwz";
34
 
 #endif
35
 
 
36
 
   while ((iopt = getopt_long (argc, argv, zopts,
37
 
@@ -293,6 +297,14 @@
38
 
             failed call.  */
39
 
          fforce = TRUE;
40
 
          break;
41
 
+       
42
 
+       case 'g':
43
 
+         /* Force a grade */
44
 
+         if (isalpha(optarg[0]))
45
 
+            cmdlgrade = optarg[0];
46
 
+         else
47
 
+            fprintf (stderr, "%s: invalid grade \n", zProgram);
48
 
+         break;
49
 
 
50
 
        case 'i':
51
 
          /* Type of port to use for standard input.  Only TLI is
52
 
@@ -794,6 +806,7 @@
53
 
   printf ("Usage: %s [options]\n", zProgram);
54
 
   printf (" -s,-S,--system system: Call system (-S implies -f)\n");
55
 
   printf (" -f,--force: Force call despite system status\n");
56
 
+  printf (" -g,--grade: limit outgoing call to a given grade\n");
57
 
   printf (" -r state: 1 for master, 0 for slave (default)\n");
58
 
   printf (" --master: Act as master\n");
59
 
   printf (" --slave: Act as slave (default)\n");
60
 
@@ -1331,12 +1344,18 @@
61
 
     boolean fret;
62
 
 
63
 
     /* Determine the grade we should request of the other system.  A
64
 
-       '\0' means that no restrictions have been made.  */
65
 
-    if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
66
 
-                          (int *) NULL))
67
 
-      bgrade = '\0';
68
 
+       '\0' means that no restrictions have been made.
69
 
+       If a grade is set on the command line, the calltimegrade-value
70
 
+       is overwritten.  */
71
 
+       
72
 
+    if (cmdlgrade != '\0')
73
 
+      bgrade = cmdlgrade;
74
 
     else
75
 
-      bgrade = (char) ival;
76
 
+      if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
77
 
+                          (int *) NULL))
78
 
+         bgrade = '\0';
79
 
+      else
80
 
+         bgrade = (char) ival;
81
 
 
82
 
     /* Determine the name we will call ourselves.  */
83
 
     if (qsys->uuconf_zlocalname != NULL)