diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 03:57:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 03:57:47 +0000 |
commit | 4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (patch) | |
tree | 15a9c7203efd47ba6dde2896fdb6327dddd4547f /usr.sbin/tzsetup | |
parent | 30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff) | |
download | FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/tzsetup')
-rw-r--r-- | usr.sbin/tzsetup/main.c | 22 | ||||
-rw-r--r-- | usr.sbin/tzsetup/tzmenu.c | 16 | ||||
-rw-r--r-- | usr.sbin/tzsetup/tzsetup.h | 4 |
3 files changed, 21 insertions, 21 deletions
diff --git a/usr.sbin/tzsetup/main.c b/usr.sbin/tzsetup/main.c index bfdd1e1..4b64810 100644 --- a/usr.sbin/tzsetup/main.c +++ b/usr.sbin/tzsetup/main.c @@ -12,7 +12,7 @@ * no representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -28,7 +28,7 @@ */ static const char rcsid[] = - "$Id$"; + "$Id: main.c,v 1.1 1995/04/24 21:04:33 wollman Exp $"; #include <stdio.h> #include <ncurses.h> @@ -51,7 +51,7 @@ static int time_adjust = 0; static enum cmos cmos(enum cmos); static void fiddle_cmos(void); -int +int main(void) { const char *tz; @@ -69,7 +69,7 @@ main(void) dialog_notify("Reboot the machine for changes to take effect.\n"); end_dialog(); - fprintf(stderr, + fprintf(stderr, "Now reboot your computer for the changes to take effect.\n"); return tz ? 0 : 1; } @@ -97,7 +97,7 @@ set_time(void) cmos_state = CMOS_LEAVE; return 0; } - + usertm = systm; usertm.tm_isdst = -1; @@ -162,7 +162,7 @@ cmos(enum cmos state) unsigned char buf[_POSIX2_LINE_MAX]; unsigned char result[_POSIX2_LINE_MAX]; - snprintf(buf, sizeof buf, "%s seems most likely", + snprintf(buf, sizeof buf, "%s seems most likely", state == CMOS_UTC ? "UTC" : "local time"); rv = dialog_menu("CMOS clock in local time or UTC", @@ -208,11 +208,11 @@ setzone(const char *zone) systime += time_adjust; tm = localtime(&systime); - snprintf(msg, sizeof msg, + snprintf(msg, sizeof msg, "Does %02d:%02d:%02d %d.%d.%04d %s look reasonable?", tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_mday, tm->tm_mon, tm->tm_year + 1900, tm->tm_zone); - + rv = dialog_yesno("Verifying timezone selection", msg, -1, -1); if (rv) @@ -230,7 +230,7 @@ setzone(const char *zone) ofp = fopen(PATH_LOCALTIME, "w"); if (!ofp) { - snprintf(msg, sizeof msg, "Could not open " PATH_LOCALTIME + snprintf(msg, sizeof msg, "Could not open " PATH_LOCALTIME ": %s", strerror(errno)); dialog_notify(msg); fclose(ifp); @@ -240,7 +240,7 @@ setzone(const char *zone) while((rv = fread(msg, 1, sizeof msg, ifp)) > 0) { int rv2; if((rv2 = fwrite(msg, 1, rv, ofp)) != rv) { - snprintf(msg, sizeof msg, + snprintf(msg, sizeof msg, "Could not write " PATH_LOCALTIME ": %s", strerror(errno)); out: @@ -250,7 +250,7 @@ out: unlink(PATH_LOCALTIME); return 1; } - } + } if (rv < 0) { snprintf(msg, sizeof msg, "Could not read timezone file: %s", strerror(errno)); diff --git a/usr.sbin/tzsetup/tzmenu.c b/usr.sbin/tzsetup/tzmenu.c index c27c417..bec4cfd 100644 --- a/usr.sbin/tzsetup/tzmenu.c +++ b/usr.sbin/tzsetup/tzmenu.c @@ -12,7 +12,7 @@ * no representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -28,7 +28,7 @@ */ static const char rcsid[] = - "$Id$"; + "$Id: tzmenu.c,v 1.1 1995/04/24 21:04:34 wollman Exp $"; #include <stdio.h> #include <ncurses.h> @@ -71,7 +71,7 @@ tzmenu(void) int item = 0; int sc = 0; const char *res; - + while(1) { dialog_clear(); rv = dialog_menu("Timezone Selector", @@ -92,7 +92,7 @@ tzmenu(void) res = country_menu(regions[item], regmenu[2 * item + 1]); - + if (res) return res; } @@ -109,7 +109,7 @@ country_menu(const struct region *reg, const char *name) int item = 0; int sc = 0; const char *res; - + snprintf(title, sizeof title, "Timezone Selector - %s", name); while(1) { @@ -133,7 +133,7 @@ country_menu(const struct region *reg, const char *name) res = location_menu(reg->r_ctrylist[rv - 1], reg->r_menu[2 * (rv - 1) + 1]); - + if (res) return res; } @@ -148,7 +148,7 @@ location_menu(const struct country *ctry, const char *name) int item = 0; int sc = 0; const char *res; - + snprintf(title, sizeof title, "Timezone Selector - %s", name); while(1) { @@ -170,7 +170,7 @@ location_menu(const struct country *ctry, const char *name) rv = setzone(ctry->c_filelist[item]); - + if (rv == 0) return ctry->c_filelist[item]; } diff --git a/usr.sbin/tzsetup/tzsetup.h b/usr.sbin/tzsetup/tzsetup.h index ab8731b..bceff7e 100644 --- a/usr.sbin/tzsetup/tzsetup.h +++ b/usr.sbin/tzsetup/tzsetup.h @@ -12,7 +12,7 @@ * no representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: tzsetup.h,v 1.1 1995/04/24 21:04:35 wollman Exp $ */ struct country { |