from scratch; write to /dev/tty if possible, block interrupts
[unix-history] / usr / src / lib / libc / gen / timezone.c
index e10bd76..7e3bf8f 100644 (file)
@@ -1,12 +1,23 @@
 /*
  * Copyright (c) 1987 Regents of the University of California.
 /*
  * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)timezone.c 5.5 (Berkeley) %G%";
-#endif LIBC_SCCS and not lint
+static char sccsid[] = "@(#)timezone.c 5.8 (Berkeley) %G%";
+#endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/time.h>
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -30,7 +41,7 @@ timezone(zone, dst)
 {
        register char   *beg,
                        *end;
 {
        register char   *beg,
                        *end;
-       char    *getenv(), *index(), *strncpy(), *tztab();
+       char    *getenv(), *index(), *strncpy(), *_tztab();
 
        if (beg = getenv("TZNAME")) {           /* set in environment */
                if (end = index(beg, ',')) {    /* "PST,PDT" */
 
        if (beg = getenv("TZNAME")) {           /* set in environment */
                if (end = index(beg, ',')) {    /* "PST,PDT" */
@@ -44,7 +55,7 @@ timezone(zone, dst)
                }
                return(beg);
        }
                }
                return(beg);
        }
-       return(tztab(zone,dst));        /* default: table or created zone */
+       return(_tztab(zone,dst));       /* default: table or created zone */
 }
 
 static struct zone {
 }
 
 static struct zone {
@@ -71,7 +82,7 @@ static struct zone {
 };
 
 /*
 };
 
 /*
- * tztab --
+ * _tztab --
  *     check static tables or create a new zone name; broken out so that
  *     we can make a guess as to what the zone is if the standard tables
  *     aren't in place in /etc.  DO NOT USE THIS ROUTINE OUTSIDE OF THE
  *     check static tables or create a new zone name; broken out so that
  *     we can make a guess as to what the zone is if the standard tables
  *     aren't in place in /etc.  DO NOT USE THIS ROUTINE OUTSIDE OF THE