projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make the maximum number of simultaneous SMTP connections an option
[unix-history]
/
usr
/
src
/
usr.sbin
/
config
/
mkheaders.c
diff --git
a/usr/src/usr.sbin/config/mkheaders.c
b/usr/src/usr.sbin/config/mkheaders.c
index
62fa53b
..
116b579
100644
(file)
--- a/
usr/src/usr.sbin/config/mkheaders.c
+++ b/
usr/src/usr.sbin/config/mkheaders.c
@@
-1,4
+1,4
@@
-/* mkheaders.c 1.1
0 82/10/24
*/
+/* mkheaders.c 1.1
3 82/12/09
*/
/*
* Make all the .h files for the optional entries
/*
* Make all the .h files for the optional entries
@@
-24,7
+24,7
@@
headers()
*/
do_count(dev, hname, search)
register char *dev, *hname;
*/
do_count(dev, hname, search)
register char *dev, *hname;
-
bool
search;
+
int
search;
{
register struct device *dp, *mp;
register int count;
{
register struct device *dp, *mp;
register int count;
@@
-32,7
+32,8
@@
do_count(dev, hname, search)
for (count = 0,dp = dtab; dp != 0; dp = dp->d_next)
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
if (dp->d_type == PSEUDO_DEVICE) {
for (count = 0,dp = dtab; dp != 0; dp = dp->d_next)
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
if (dp->d_type == PSEUDO_DEVICE) {
- count = dp->d_slave != UNKNOWN ? dp->d_slave : 1;
+ count =
+ dp->d_slave != UNKNOWN ? dp->d_slave : 1;
break;
}
count++;
break;
}
count++;
@@
-45,7
+46,8
@@
do_count(dev, hname, search)
count = dp->d_unit + 1;
if (search) {
mp = dp->d_conn;
count = dp->d_unit + 1;
if (search) {
mp = dp->d_conn;
- if (mp != 0 && mp != -1 && mp->d_conn != -1) {
+ if (mp != 0 && mp != (struct device *)-1 &&
+ mp->d_conn != (struct device *)-1) {
do_count(mp->d_name, hname, 0);
search = 0;
}
do_count(mp->d_name, hname, 0);
search = 0;
}
@@
-74,19
+76,19
@@
do_header(dev, hname, count)
exit(1);
}
fprintf(outf, "#define %s %d\n", name, count);
exit(1);
}
fprintf(outf, "#define %s %d\n", name, count);
- fclose(outf);
+
(void)
fclose(outf);
return;
}
fl_head = 0;
for (;;) {
char *cp;
return;
}
fl_head = 0;
for (;;) {
char *cp;
- if ((inw = get_word(inf)) == 0 || inw == EOF)
+ if ((inw = get_word(inf)) == 0 || inw ==
(char *)
EOF)
break;
break;
- if ((inw = get_word(inf)) == 0 || inw == EOF)
+ if ((inw = get_word(inf)) == 0 || inw ==
(char *)
EOF)
break;
inw = ns(inw);
cp = get_word(inf);
break;
inw = ns(inw);
cp = get_word(inf);
- if (cp == 0 || cp == EOF)
+ if (cp == 0 || cp ==
(char *)
EOF)
break;
inc = atoi(cp);
if (eq(inw, name)) {
break;
inc = atoi(cp);
if (eq(inw, name)) {
@@
-94,7
+96,7
@@
do_header(dev, hname, count)
inc = count;
}
cp = get_word(inf);
inc = count;
}
cp = get_word(inf);
- if (cp ==
0 || cp ==
EOF)
+ if (cp ==
(char *)
EOF)
break;
fl = (struct file_list *) malloc(sizeof *fl);
fl->f_fn = inw;
break;
fl = (struct file_list *) malloc(sizeof *fl);
fl->f_fn = inw;
@@
-102,10
+104,10
@@
do_header(dev, hname, count)
fl->f_next = fl_head;
fl_head = fl;
}
fl->f_next = fl_head;
fl_head = fl;
}
- fclose(inf);
+
(void)
fclose(inf);
if (count == oldcount) {
for (fl = fl_head; fl != 0; fl = fl->f_next)
if (count == oldcount) {
for (fl = fl_head; fl != 0; fl = fl->f_next)
- free(fl);
+ free(
(char *)
fl);
return;
}
if (oldcount == -1) {
return;
}
if (oldcount == -1) {
@@
-123,9
+125,9
@@
do_header(dev, hname, count)
for (fl = fl_head; fl != 0; fl = fl->f_next) {
fprintf(outf, "#define %s %d\n",
fl->f_fn, count ? fl->f_type : 0);
for (fl = fl_head; fl != 0; fl = fl->f_next) {
fprintf(outf, "#define %s %d\n",
fl->f_fn, count ? fl->f_type : 0);
- free(fl);
+ free(
(char *)
fl);
}
}
- fclose(outf);
+
(void)
fclose(outf);
}
/*
}
/*
@@
-137,9
+139,9
@@
toheader(dev)
{
static char hbuf[80];
{
static char hbuf[80];
- strcpy(hbuf, path(dev));
- strcat(hbuf, ".h");
- return (hbuf)
+
(void)
strcpy(hbuf, path(dev));
+
(void)
strcat(hbuf, ".h");
+ return (hbuf)
;
}
/*
}
/*
@@
-156,5
+158,5
@@
char *tomacro(dev)
while (*dev)
*cp++ = toupper(*dev++);
*cp++ = 0;
while (*dev)
*cp++ = toupper(*dev++);
*cp++ = 0;
- return (mbuf)
+ return (mbuf)
;
}
}