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

« back to all changes in this revision

Viewing changes to uuchk.c

  • 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
1
/* uuchk.c
2
2
   Display what we think the permissions of systems are.
3
3
 
4
 
   Copyright (C) 1991, 1992, 1993, 1994, 1995 Ian Lance Taylor
 
4
   Copyright (C) 1991, 1992, 1993, 1994, 1995, 2002 Ian Lance Taylor
5
5
 
6
6
   This file is part of the Taylor UUCP package.
7
7
 
17
17
 
18
18
   You should have received a copy of the GNU General Public License
19
19
   along with this program; if not, write to the Free Software
20
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
20
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
21
21
 
22
 
   The author of the program may be contacted at ian@airs.com or
23
 
   c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
 
22
   The author of the program may be contacted at ian@airs.com.
24
23
   */
25
24
 
26
25
#include "uucp.h"
27
26
 
28
27
#if USE_RCS_ID
29
 
const char uuchk_rcsid[] = "$Id: uuchk.c,v 1.65 1995/07/18 00:59:30 ian Rel $";
 
28
const char uuchk_rcsid[] = "$Id: uuchk.c,v 1.71 2002/03/05 19:10:42 ian Rel $";
30
29
#endif
31
30
 
32
31
#include "getopt.h"
37
36
 
38
37
static void ukusage P((void));
39
38
static void ukhelp P((void));
 
39
static void ukshow_names P((const char *zheader, const char * const *pznames));
40
40
static void ukshow P((const struct uuconf_system *qsys,
41
41
                      pointer puuconf));
42
42
static int ikshow_port P((struct uuconf_port *qport, pointer pinfo));
113
113
 
114
114
        case 'v':
115
115
          /* Print version and exit.  */
116
 
          printf ("%s: Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995 Ian Lance Taylor\n",
117
 
                  zKprogram, VERSION);
 
116
          printf ("uuchk (Taylor UUCP) %s\n", VERSION);
 
117
          printf ("Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\n");
 
118
          printf ("This program is free software; you may redistribute it under the terms of\n");
 
119
          printf ("the GNU General Public LIcense.  This program has ABSOLUTELY NO WARRANTY.\n");
118
120
          exit (EXIT_SUCCESS);
119
121
          /*NOTREACHED*/
120
122
          
162
164
    }
163
165
  else
164
166
    {
 
167
      struct uuconf_config_file_names snames;
165
168
      const char *zstr;
166
169
      int iint;
167
170
      char **pzsystems;
168
171
 
 
172
      iret = uuconf_config_files (puuconf, &snames);
 
173
      if (iret != UUCONF_SUCCESS)
 
174
        ukuuconf_error (puuconf, iret);
 
175
      if (snames.uuconf_ztaylor_config != NULL)
 
176
        printf ("config file: %s\n", snames.uuconf_ztaylor_config);
 
177
      ukshow_names("sys file", snames.uuconf_pztaylor_sys);
 
178
      ukshow_names("port file", snames.uuconf_pztaylor_port);
 
179
      ukshow_names("dial file", snames.uuconf_pztaylor_dial);
 
180
      ukshow_names("dialcode file", snames.uuconf_pzdialcode);
 
181
      ukshow_names("passwd file", snames.uuconf_pztaylor_pwd);
 
182
      ukshow_names("call file", snames.uuconf_pztaylor_call);
 
183
 
 
184
      if (snames.uuconf_zv2_systems != NULL)
 
185
        printf ("V2 L.sys file: %s\n", snames.uuconf_zv2_systems);
 
186
      if (snames.uuconf_zv2_device != NULL)
 
187
        printf ("V2 L-devices file: %s\n", snames.uuconf_zv2_device);
 
188
      if (snames.uuconf_zv2_userfile != NULL)
 
189
        printf ("V2 USERFILE file: %s\n", snames.uuconf_zv2_userfile);
 
190
      if (snames.uuconf_zv2_cmds != NULL)
 
191
        printf ("V2 L.cmds file: %s\n", snames.uuconf_zv2_cmds);
 
192
 
 
193
      ukshow_names("HDB Systems file", snames.uuconf_pzhdb_systems);
 
194
      ukshow_names("HDB Devices file", snames.uuconf_pzhdb_devices);
 
195
      ukshow_names("HDB Dialers file", snames.uuconf_pzhdb_dialers);
 
196
      if (snames.uuconf_zhdb_permissions != NULL)
 
197
        printf ("HDB Permissions file: %s\n", snames.uuconf_zhdb_permissions);
 
198
      /* FIXME: This doesn't dump the following HDB file names:
 
199
         Sysfiles, Maxuuxqts, remote.unknown.  */
 
200
 
169
201
      iret = uuconf_localname (puuconf, &zstr);
170
202
      if (iret == UUCONF_SUCCESS)
171
203
        printf ("Local node name %s\n", zstr);
292
324
static void
293
325
ukhelp ()
294
326
{
295
 
  printf ("Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995 Ian Lance Taylor\n",
 
327
  printf ("Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\n",
296
328
          VERSION);
297
329
  printf ("Usage: %s [-s system] [-I file] [-v]\n", zKprogram);
298
330
  printf (" -s,--system system: Only print configuration for named system\n");
299
331
  printf (" -I,--config file: Set configuration file to use\n");
300
332
  printf (" -v,--version: Print version and exit\n");
301
333
  printf (" --help: Print help and exit\n");
 
334
  printf ("Report bugs to taylor-uucp@gnu.org\n");
 
335
}
 
336
 
 
337
/* Print a list of configuration file names.  */
 
338
static void
 
339
ukshow_names (zheader, pznames)
 
340
     const char *zheader;
 
341
     const char * const *pznames;
 
342
{
 
343
  if (pznames == NULL)
 
344
    return;
 
345
  if (pznames[1] == NULL)
 
346
    printf ("%s: %s\n", zheader, pznames[0]);
 
347
  else
 
348
    {
 
349
      const char * const *pz;
 
350
 
 
351
      printf ("%s:\n", zheader);
 
352
      for (pz = pznames; *pz != NULL; ++pz)
 
353
        printf ("  %s\n", *pz);
 
354
    }
302
355
}
303
356
 
304
357
/* Dump out the information for a system.  */
684
737
          printf ("\n");
685
738
        }
686
739
          
 
740
      if (qsys->uuconf_cmax_file_time > 0)
 
741
        printf (" Maximum file send time: %ld\n", qsys->uuconf_cmax_file_time);
 
742
 
687
743
      if (qsys->uuconf_zprotocols != NULL)
688
744
        printf (" Will use protocols %s\n", qsys->uuconf_zprotocols);
689
745
      else
814
870
      qtcp = &qport->uuconf_u.uuconf_stcp;
815
871
      printf ("   Port type tcp\n");
816
872
      printf ("   TCP service %s\n", qtcp->uuconf_zport);
 
873
      if (qtcp->uuconf_iversion != 0)
 
874
        printf ("   IP version %d\n", qtcp->uuconf_iversion);
817
875
      if (qtcp->uuconf_pzdialer != NULL
818
876
          && qtcp->uuconf_pzdialer[0] != NULL)
819
877
        {