99 |
|
initambfile(creat) /* initialize ambient file */ |
100 |
|
int creat; |
101 |
|
{ |
102 |
< |
extern char *progname, *octname; |
102 |
> |
extern char *progname, *octname, VersionID[]; |
103 |
|
|
104 |
|
setbuf(ambfp, bmalloc(BUFSIZ)); |
105 |
|
if (creat) { /* new file */ |
110 |
|
fprintf(ambfp, "-ad %d -as %d -ar %d %s\n", |
111 |
|
ambdiv, ambssamp, ambres, |
112 |
|
octname==NULL ? "" : octname); |
113 |
+ |
fprintf(ambfp, "SOFTWARE= %s\n", VersionID); |
114 |
|
fputformat(AMBFMT, ambfp); |
115 |
|
putc('\n', ambfp); |
116 |
|
putambmagic(ambfp); |
118 |
|
} else if (checkheader(ambfp, AMBFMT, NULL) < 0 |
119 |
|
|| !hasambmagic(ambfp)) { |
120 |
|
sprintf(errmsg, "\"%s\" is not an ambient file", afname); |
121 |
< |
error(USER, afname); |
121 |
> |
error(USER, errmsg); |
122 |
|
} |
123 |
|
ambheadlen = ftell(ambfp); |
124 |
|
} |