View | Details | Raw Unified | Return to bug 17202
Collapse All | Expand All

(-)gnu/libexec/uucp/uucico/uucico.c (-7 / +29 lines)
Lines 126-131 Link Here
126
  struct sconnection *qconn;
126
  struct sconnection *qconn;
127
};
127
};
128
128
129
/* min. grade set on commandline */
130
static char cmdlgrade = '\0';
131
129
/* Local functions.  */
132
/* Local functions.  */
130
133
131
static void uusage P((void));
134
static void uusage P((void));
Lines 176-181 Link Here
176
  { "nodetach", no_argument, NULL, 'D' },
179
  { "nodetach", no_argument, NULL, 'D' },
177
  { "loop", no_argument, NULL, 'e' },
180
  { "loop", no_argument, NULL, 'e' },
178
  { "force", no_argument, NULL, 'f'},
181
  { "force", no_argument, NULL, 'f'},
182
  { "grade", required_argument, NULL, 'g'},
179
  { "stdin", required_argument, NULL, 'i' },
183
  { "stdin", required_argument, NULL, 'i' },
180
  { "prompt", no_argument, NULL, 'l' },
184
  { "prompt", no_argument, NULL, 'l' },
181
  { "port", required_argument, NULL, 'p' },
185
  { "port", required_argument, NULL, 'p' },
Lines 250-258 Link Here
250
    ++zProgram;
254
    ++zProgram;
251
255
252
#if COHERENT_C_OPTION
256
#if COHERENT_C_OPTION
253
  zopts = "c:CDefi:I:lp:qr:s:S:u:x:X:vwz";
257
  zopts = "c:CDefg:i:I:lp:qr:s:S:u:x:X:vwz";
254
#else
258
#else
255
  zopts = "cCDefi:I:lp:qr:s:S:u:x:X:vwz";
259
  zopts = "cCDefg:i:I:lp:qr:s:S:u:x:X:vwz";
256
#endif
260
#endif
257
261
258
  while ((iopt = getopt_long (argc, argv, zopts,
262
  while ((iopt = getopt_long (argc, argv, zopts,
Lines 293-298 Link Here
293
	     failed call.  */
297
	     failed call.  */
294
	  fforce = TRUE;
298
	  fforce = TRUE;
295
	  break;
299
	  break;
300
	
301
	case 'g':
302
	  /* Force a grade */
303
	  if (isalpha(optarg[0]))
304
	     cmdlgrade = optarg[0];
305
	  else
306
	     fprintf (stderr, "%s: invalid grade \n", zProgram);
307
	  break;
296
308
297
	case 'i':
309
	case 'i':
298
	  /* Type of port to use for standard input.  Only TLI is
310
	  /* Type of port to use for standard input.  Only TLI is
Lines 794-799 Link Here
794
  printf ("Usage: %s [options]\n", zProgram);
806
  printf ("Usage: %s [options]\n", zProgram);
795
  printf (" -s,-S,--system system: Call system (-S implies -f)\n");
807
  printf (" -s,-S,--system system: Call system (-S implies -f)\n");
796
  printf (" -f,--force: Force call despite system status\n");
808
  printf (" -f,--force: Force call despite system status\n");
809
  printf (" -g,--grade: limit outgoing call to a given grade\n");
797
  printf (" -r state: 1 for master, 0 for slave (default)\n");
810
  printf (" -r state: 1 for master, 0 for slave (default)\n");
798
  printf (" --master: Act as master\n");
811
  printf (" --master: Act as master\n");
799
  printf (" --slave: Act as slave (default)\n");
812
  printf (" --slave: Act as slave (default)\n");
Lines 940-945 Link Here
940
      if (! qsys->uuconf_fcall || qsys->uuconf_qtimegrade == NULL)
953
      if (! qsys->uuconf_fcall || qsys->uuconf_qtimegrade == NULL)
941
	continue;
954
	continue;
942
955
956
      if (qport && strcmp (qsys->uuconf_zport,qport->uuconf_zname))
957
       continue;
958
943
      fnevertime = FALSE;
959
      fnevertime = FALSE;
944
960
945
      /* Make sure this is a legal time to call.  */
961
      /* Make sure this is a legal time to call.  */
Lines 1331-1342 Link Here
1331
    boolean fret;
1347
    boolean fret;
1332
1348
1333
    /* Determine the grade we should request of the other system.  A
1349
    /* Determine the grade we should request of the other system.  A
1334
       '\0' means that no restrictions have been made.  */
1350
       '\0' means that no restrictions have been made.
1335
    if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
1351
       If a grade is set on the command line, the calltimegrade-value
1336
			   (int *) NULL))
1352
       is overwritten.  */
1337
      bgrade = '\0';
1353
       
1354
    if (cmdlgrade != '\0')
1355
      bgrade = cmdlgrade;
1338
    else
1356
    else
1339
      bgrade = (char) ival;
1357
      if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
1358
			   (int *) NULL))
1359
         bgrade = '\0';
1360
      else
1361
         bgrade = (char) ival;
1340
1362
1341
    /* Determine the name we will call ourselves.  */
1363
    /* Determine the name we will call ourselves.  */
1342
    if (qsys->uuconf_zlocalname != NULL)
1364
    if (qsys->uuconf_zlocalname != NULL)

Return to bug 17202