SCCS-vsn: usr.sbin/config/lang.l 1.4
SCCS-vsn: usr.sbin/config/mkheaders.c 1.5
SCCS-vsn: usr.sbin/config/mkmakefile.c 1.3
SCCS-vsn: usr.sbin/config/mkubglue.c 1.3
-/* lang.l 1.3 81/02/25 */
+/* lang.l 1.4 81/02/26 */
#include <ctype.h>
#include "y.tab.h"
#include <ctype.h>
#include "y.tab.h"
- sscanf(str, "%x", &num);
+ sscanf(str+2, "%x", &num);
- * mkheaders.c 1.4 81/02/26
+ * mkheaders.c 1.5 81/02/26
* Make all the .h files for the optional entries
*/
* Make all the .h files for the optional entries
*/
if (inf == NULL)
{
outf = fopen(file, "w");
if (inf == NULL)
{
outf = fopen(file, "w");
+ if (outf == NULL) {
+ perror(file);
+ exit(1);
+ }
fprintf(outf, "#define %s %d\n", name, count);
fclose(outf);
return;
fprintf(outf, "#define %s %d\n", name, count);
fclose(outf);
return;
fl_head = fl;
}
outf = fopen(file, "w");
fl_head = fl;
}
outf = fopen(file, "w");
+ if (outf == NULL) {
+ perror(file);
+ exit(1);
+ }
for (fl = fl_head; fl != NULL; fl = fl->f_next)
{
fprintf(outf, "#define %s %d\n", fl->f_fn, fl->f_type);
for (fl = fl_head; fl != NULL; fl = fl->f_next)
{
fprintf(outf, "#define %s %d\n", fl->f_fn, fl->f_type);
- * mkmakefile.c 1.2 81/02/26
+ * mkmakefile.c 1.3 81/02/26
* Functions in this file build the makefile from the files list
* and the information in the config table
*/
* Functions in this file build the makefile from the files list
* and the information in the config table
*/
makefile()
{
FILE *ifp, *ofp;
makefile()
{
FILE *ifp, *ofp;
read_files(); /* Read in the "files" file */
read_files(); /* Read in the "files" file */
- ifp = fopen("../unix/makefile", "r");
+ ifp = fopen("../conf/makefile", "r");
ofp = fopen(path("makefile"), "w");
fprintf(ofp, "IDENT=-D%s -D%s\n", raise(ident), cpu_type);
ofp = fopen(path("makefile"), "w");
fprintf(ofp, "IDENT=-D%s -D%s\n", raise(ident), cpu_type);
- while(fgets(line, 80, ifp) != NULL)
+ while(fgets(line, BUFSIZ, ifp) != NULL)
else if (eq(line, "%LOAD\n"))
do_load(ofp);
else
else if (eq(line, "%LOAD\n"))
do_load(ofp);
else
- fprintf(stderr, "Unknown %% thingy in generic makefile %s", line);
+ fprintf(stderr, "Unknown %% construct in generic makefile: %s", line);
}
fclose(ifp);
fclose(ofp);
}
fclose(ifp);
fclose(ofp);
register char *wd, *this;
int type;
register char *wd, *this;
int type;
- fp = fopen("../unix/files", "r");
-
+ fp = fopen("../conf/files", "r");
+ if (fp == NULL) {
+ perror("../conf/files");
+ exit(1);
+ }
ftab = NULL;
while((wd = get_word(fp)) != EOF)
{
ftab = NULL;
while((wd = get_word(fp)) != EOF)
{
putc('\n', f);
for (fl = conf_list; fl != NULL; fl = fl->f_next)
{
putc('\n', f);
for (fl = conf_list; fl != NULL; fl = fl->f_next)
{
- fprintf(f, "\n%s: makefile locore.o ${OBJS} swap%s.o\n",
+ fprintf(f, "\n%s: makefile locore.o ${OBJS} ioconf.o swap%s.o\n",
fl->f_needs, fl->f_fn);
fprintf(f, "\t@echo loading %s\n\t@rm -f %s\n\t",
fl->f_needs, fl->f_needs);
fprintf(f,
fl->f_needs, fl->f_fn);
fprintf(f, "\t@echo loading %s\n\t@rm -f %s\n\t",
fl->f_needs, fl->f_needs);
fprintf(f,
- "@ld -n -o %s -e start -x -T 80000000 locore.o ${OBJS} swap%s.o\n",
+ "@ld -n -o %s -e start -x -T 80000000 locore.o ${OBJS} ioconf.o swap%s.o\n",
fl->f_needs, fl->f_fn);
fprintf(f, "\t@echo rearranging symbols\n");
fl->f_needs, fl->f_fn);
fprintf(f, "\t@echo rearranging symbols\n");
- fprintf(f, "\t@-symorder ../conf/symbols.sort %s\n", fl->f_needs);
+ fprintf(f, "\t@-symorder ../sys/symbols.sort %s\n", fl->f_needs);
fprintf(f, "\t@size %s\n", fl->f_needs);
fprintf(f, "\t@chmod 755 %s\n", fl->f_needs);
}
for (fl = conf_list; fl != NULL; fl = fl->f_next)
{
fprintf(f, "\t@size %s\n", fl->f_needs);
fprintf(f, "\t@chmod 755 %s\n", fl->f_needs);
}
for (fl = conf_list; fl != NULL; fl = fl->f_next)
{
- fprintf(f, "\nswap%s.o: ../conf/swap%s.c\n", fl->f_fn, fl->f_fn);
- fprintf(f, "\t${CC} -I. -c -S ${COPTS} ../conf/swap%s.c\n", fl->f_fn);
+ fprintf(f, "\nswap%s.o: ../dev/swap%s.c\n", fl->f_fn, fl->f_fn);
+ fprintf(f, "\t${CC} -I. -c -S ${COPTS} ../dev/swap%s.c\n", fl->f_fn);
fprintf(f,
"\t${C2} swap%s.s | sed -f ../sys/asm.sed | ${AS} -o swap%s.o\n",
fl->f_fn, fl->f_fn);
fprintf(f,
"\t${C2} swap%s.s | sed -f ../sys/asm.sed | ${AS} -o swap%s.o\n",
fl->f_fn, fl->f_fn);
/*
* Make the uba interrupt file ubglue.s
/*
* Make the uba interrupt file ubglue.s
- * mkubglue.c 1.2 81/02/26
+ * mkubglue.c 1.3 81/02/26
*/
#include <stdio.h>
#include "config.h"
*/
#include <stdio.h>
#include "config.h"
register struct device *dp, *mp;
fp = fopen(path("ubglue.s"), "w");
register struct device *dp, *mp;
fp = fopen(path("ubglue.s"), "w");
+ if (fp == NULL) {
+ perror(path("ubglue.s"));
+ exit(1);
+ }
for (dp = dtab ; dp != NULL; dp = dp->d_next)
{
mp = dp->d_conn;
for (dp = dtab ; dp != NULL; dp = dp->d_next)
{
mp = dp->d_conn;