Deleted Added
full compact
tzsetup.c (133425) tzsetup.c (179497)
1/*
2 * Copyright 1996 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 20 unchanged lines hidden (view full) ---

29
30/*
31 * Second attempt at a `tzmenu' program, using the separate description
32 * files provided in newer tzdata releases.
33 */
34
35#ifndef lint
36static const char rcsid[] =
1/*
2 * Copyright 1996 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 20 unchanged lines hidden (view full) ---

29
30/*
31 * Second attempt at a `tzmenu' program, using the separate description
32 * files provided in newer tzdata releases.
33 */
34
35#ifndef lint
36static const char rcsid[] =
37 "$FreeBSD: head/usr.sbin/tzsetup/tzsetup.c 133425 2004-08-10 05:34:23Z murray $";
37 "$FreeBSD: head/usr.sbin/tzsetup/tzsetup.c 179497 2008-06-02 23:37:33Z jkim $";
38#endif /* not lint */
39
40#include <sys/types.h>
41#include <dialog.h>
42#include <err.h>
43#include <errno.h>
44#include <stdio.h>
45#include <stdlib.h>

--- 56 unchanged lines hidden (view full) ---

102{
103 int rv;
104 struct continent *contp = continent->data;
105 char title[256];
106 int isocean = OCEANP(continent - continents);
107 int menulen;
108
109 /* Short cut -- if there's only one country, don't post a menu. */
38#endif /* not lint */
39
40#include <sys/types.h>
41#include <dialog.h>
42#include <err.h>
43#include <errno.h>
44#include <stdio.h>
45#include <stdlib.h>

--- 56 unchanged lines hidden (view full) ---

102{
103 int rv;
104 struct continent *contp = continent->data;
105 char title[256];
106 int isocean = OCEANP(continent - continents);
107 int menulen;
108
109 /* Short cut -- if there's only one country, don't post a menu. */
110 if (contp->nitems == 1) {
111 return set_zone_menu(&contp->menu[0]);
112 }
110 if (contp->nitems == 1)
111 return (contp->menu[0].fire(&contp->menu[0]));
113
114 /* It's amazing how much good grammar really matters... */
115 if (!isocean)
116 snprintf(title, sizeof title, "Countries in %s",
117 continent->title);
118 else
119 snprintf(title, sizeof title, "Islands and groups in the %s",
120 continent->title);

--- 590 unchanged lines hidden ---
112
113 /* It's amazing how much good grammar really matters... */
114 if (!isocean)
115 snprintf(title, sizeof title, "Countries in %s",
116 continent->title);
117 else
118 snprintf(title, sizeof title, "Islands and groups in the %s",
119 continent->title);

--- 590 unchanged lines hidden ---