1 |
– |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Create a closed environment from a holodeck section |
6 |
|
*/ |
39 |
|
error(SYSTEM, "out of memory in main"); |
40 |
|
while (n--) |
41 |
|
gabmi[n].h = ourhp; |
42 |
+ |
fputs("# ", stdout); |
43 |
+ |
printargs(argc, argv, stdout); |
44 |
|
hdcachesize = 0; |
45 |
|
for (n = 0; n < 6; n++) |
46 |
|
mkwall(argv[2], sect, n); |
55 |
|
char *fname; |
56 |
|
int sect; |
57 |
|
{ |
59 |
– |
extern long ftell(); |
58 |
|
FILE *fp; |
59 |
|
int fd; |
60 |
< |
int4 nextloc; |
60 |
> |
int32 nextloc; |
61 |
|
int n; |
62 |
|
/* open holodeck file */ |
63 |
|
if ((fp = fopen(fname, "r")) == NULL) { |
73 |
|
nextloc = ftell(fp); /* get stdio position */ |
74 |
|
fclose(fp); /* done with stdio */ |
75 |
|
for (n = 0; nextloc > 0L; n++) { /* get the indicated section */ |
76 |
< |
lseek(fd, (long)nextloc, 0); |
76 |
> |
lseek(fd, (off_t)nextloc, 0); |
77 |
|
read(fd, (char *)&nextloc, sizeof(nextloc)); |
78 |
|
if (n == sect) { |
79 |
|
hdinit(fd, NULL); |
320 |
|
} |
321 |
|
|
322 |
|
|
323 |
+ |
void |
324 |
|
eputs(s) /* put error message to stderr */ |
325 |
|
register char *s; |
326 |
|
{ |