args for _fmt(), _secs(), and _add() should all be const (!!)
This commit is contained in:
parent
316aac5b98
commit
58f52170c8
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
/*static char *sccsid = "from: @(#)strftime.c 5.11 (Berkeley) 2/24/91";*/
|
/*static char *sccsid = "from: @(#)strftime.c 5.11 (Berkeley) 2/24/91";*/
|
||||||
static char *rcsid = "$Id: strftime.c,v 1.11 1996/06/01 21:23:25 jtc Exp $";
|
static char *rcsid = "$Id: strftime.c,v 1.12 1996/12/20 20:27:22 cgd Exp $";
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include <sys/localedef.h>
|
#include <sys/localedef.h>
|
||||||
@ -72,8 +72,8 @@ strftime(s, maxsize, format, t)
|
|||||||
((t)->tm_wday ? (t)->tm_wday - 1 : 6)) / 7)
|
((t)->tm_wday ? (t)->tm_wday - 1 : 6)) / 7)
|
||||||
static size_t
|
static size_t
|
||||||
_fmt(format, t)
|
_fmt(format, t)
|
||||||
register char *format;
|
register const char *format;
|
||||||
struct tm *t;
|
const struct tm *t;
|
||||||
{
|
{
|
||||||
for (; *format; ++format) {
|
for (; *format; ++format) {
|
||||||
if (*format == '%') {
|
if (*format == '%') {
|
||||||
@ -278,7 +278,7 @@ _fmt(format, t)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_secs(t)
|
_secs(t)
|
||||||
struct tm *t;
|
const struct tm *t;
|
||||||
{
|
{
|
||||||
static char buf[15];
|
static char buf[15];
|
||||||
register time_t s;
|
register time_t s;
|
||||||
@ -310,7 +310,7 @@ _conv(n, digits, pad)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_add(str)
|
_add(str)
|
||||||
register char *str;
|
register const char *str;
|
||||||
{
|
{
|
||||||
for (;; ++pt, --gsize) {
|
for (;; ++pt, --gsize) {
|
||||||
if (!gsize)
|
if (!gsize)
|
||||||
|
Loading…
Reference in New Issue
Block a user