SCCS-vsn: usr.sbin/config/main.c 1.2
SCCS-vsn: usr.sbin/config/config.h 1.2
- * config.h 1.1 81/02/25
+ * config.h 1.2 81/02/25
* Definitions that everybody needs to know
*/
#define eq(a,b) (strcmp(a,b) == 0)
* Definitions that everybody needs to know
*/
#define eq(a,b) (strcmp(a,b) == 0)
-#define PREFIX "_unix/"
-#define path(file) "_unix/file"
#define TRUE 1
#define FALSE 0
#define DRIVER 1
#define TRUE 1
#define FALSE 0
#define DRIVER 1
char errbuf[80];
int yyline;
struct file_list *ftab, *conf_list, *confp;
char errbuf[80];
int yyline;
struct file_list *ftab, *conf_list, *confp;
* Config
* Do system configuration for VAX/UNIX
* 1) Build system data structures
* Config
* Do system configuration for VAX/UNIX
* 1) Build system data structures
fprintf(stderr, "usage: config <sysname>\n");
exit(1);
}
fprintf(stderr, "usage: config <sysname>\n");
exit(1);
}
if (freopen(argv[1], "r", stdin) == NULL)
{
perror(argv[1]);
if (freopen(argv[1], "r", stdin) == NULL)
{
perror(argv[1]);
ungetc(ch, fp);
return line;
}
ungetc(ch, fp);
return line;
}
+
+/*
+ * path:
+ * Prepend the path to a filename
+ */
+
+path(file)
+char *file;
+{
+ register char *cp;
+
+ cp = malloc(strlen(PREFIX)+strlen(file)+1);
+ strcpy(cp, PREFIX);
+ strcpy(cp, file);
+ return cp;
+}