2
The following patch by Christian Kurz <shorty@debian.org> adds grade
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
8
struct sconnection *qconn;
11
+/* min. grade set on commandline */
12
+static char cmdlgrade = '\0';
14
/* Local functions. */
16
static void uusage P((void));
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' },
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";
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";
36
while ((iopt = getopt_long (argc, argv, zopts,
44
+ if (isalpha(optarg[0]))
45
+ cmdlgrade = optarg[0];
47
+ fprintf (stderr, "%s: invalid grade \n", zProgram);
51
/* Type of port to use for standard input. Only TLI is
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 @@
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,
68
+ '\0' means that no restrictions have been made.
69
+ If a grade is set on the command line, the calltimegrade-value
72
+ if (cmdlgrade != '\0')
75
- bgrade = (char) ival;
76
+ if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
80
+ bgrade = (char) ival;
82
/* Determine the name we will call ourselves. */
83
if (qsys->uuconf_zlocalname != NULL)