Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail add more const
details: https://anonhg.NetBSD.org/src/rev/7966cd13e617
branches: trunk
changeset: 586913:7966cd13e617
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 05 02:13:41 2006 +0000
description:
add more const
diffstat:
usr.bin/mail/extern.h | 14 +++++++-------
usr.bin/mail/head.c | 28 ++++++++++++++--------------
2 files changed, 21 insertions(+), 21 deletions(-)
diffs (145 lines):
diff -r 774a8773263e -r 7966cd13e617 usr.bin/mail/extern.h
--- a/usr.bin/mail/extern.h Thu Jan 05 02:10:01 2006 +0000
+++ b/usr.bin/mail/extern.h Thu Jan 05 02:13:41 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.21 2005/07/19 23:07:10 christos Exp $ */
+/* $NetBSD: extern.h,v 1.22 2006/01/05 02:13:41 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 4/20/95
- * $NetBSD: extern.h,v 1.21 2005/07/19 23:07:10 christos Exp $
+ * $NetBSD: extern.h,v 1.22 2006/01/05 02:13:41 christos Exp $
*/
struct name;
@@ -50,7 +50,7 @@
FILE *Popen(const char *, const char *);
FILE *collect(struct header *, int);
char *copy(char *, char *);
-char *copyin(char *, char **);
+char *copyin(const char *, char **);
char *detract(struct name *, int);
const char *expand(const char *);
const char *getdeadletter(void);
@@ -61,7 +61,7 @@
char *ishfield(const char [], char[], const char *);
char *name1(struct message *, int);
char *nameof(struct message *, int);
-char *nextword(char *, char *);
+const char *nextword(const char *, char *);
char *readtty(const char [], char []);
char *reedit(char *);
FILE *run_editor(FILE *, off_t, int, int);
@@ -120,7 +120,7 @@
int evalcol(int);
int execute(char [], int);
int exwrite(const char [], FILE *, int);
-void fail(char [], const char []);
+void fail(const char [], const char []);
int file(void *);
struct grouphead *
findgroup(char []);
@@ -157,7 +157,7 @@
int isdate(const char []);
int isdir(const char []);
int isfileaddr(char *);
-int ishead(char []);
+int ishead(const char []);
int isign(const char *, struct ignoretab []);
int isprefix(char *, const char *);
void istrcpy(char *, const char *);
@@ -185,7 +185,7 @@
int next(void *);
int null(void *);
struct headline;
-void parse(char [], struct headline *, char []);
+void parse(const char [], struct headline *, char []);
int pcmdlist(void *);
int pdot(void *);
void prepare_child(sigset_t *, int, int);
diff -r 774a8773263e -r 7966cd13e617 usr.bin/mail/head.c
--- a/usr.bin/mail/head.c Thu Jan 05 02:10:01 2006 +0000
+++ b/usr.bin/mail/head.c Thu Jan 05 02:13:41 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: head.c,v 1.14 2005/07/19 23:07:10 christos Exp $ */
+/* $NetBSD: head.c,v 1.15 2006/01/05 02:13:41 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)head.c 8.2 (Berkeley) 4/20/95";
#else
-__RCSID("$NetBSD: head.c,v 1.14 2005/07/19 23:07:10 christos Exp $");
+__RCSID("$NetBSD: head.c,v 1.15 2006/01/05 02:13:41 christos Exp $");
#endif
#endif /* not lint */
@@ -53,9 +53,9 @@
* accomodate all funny formats.
*/
int
-ishead(char linebuf[])
+ishead(const char linebuf[])
{
- char *cp;
+ const char *cp;
struct headline hl;
char parbuf[BUFSIZ];
@@ -80,14 +80,14 @@
/*ARGSUSED*/
void
-fail(char linebuf[], const char reason[])
+fail(const char linebuf[], const char reason[])
{
-
- /*
+#if 0
if (value("debug") == NULL)
return;
- (void)fprintf(stderr, "\"%s\"\nnot a header because %s\n", linebuf, reason);
- */
+ (void)fprintf(stderr, "\"%s\"\nnot a header because %s\n", linebuf,
+ reason);
+#endif
}
/*
@@ -97,9 +97,9 @@
* structure. Actually, it scans.
*/
void
-parse(char line[], struct headline *hl, char pbuf[])
+parse(const char line[], struct headline *hl, char pbuf[])
{
- char *cp;
+ const char *cp;
char *sp;
char word[LINESIZE];
@@ -130,7 +130,7 @@
* the left string into it.
*/
char *
-copyin(char *src, char **space)
+copyin(const char *src, char **space)
{
char *cp;
char *begin;
@@ -223,8 +223,8 @@
* passed. Also, return a pointer to the next word following that,
* or NULL if none follow.
*/
-char *
-nextword(char *wp, char *wbuf)
+const char *
+nextword(const char *wp, char *wbuf)
{
int c;
Home |
Main Index |
Thread Index |
Old Index