Subversion Repositories SvarDOS

Rev

Rev 1962 | Rev 1964 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1962 Rev 1963
Line 142... Line 142...
142
  unsigned char buff[512];
142
  unsigned char buff[512];
143
  unsigned int len;
143
  unsigned int len;
144
 
144
 
145
  fd = fopen(fname, "rb");
145
  fd = fopen(fname, "rb");
146
  if (fd == NULL) {
146
  if (fd == NULL) {
147
    puts(svarlang_str(10, 1)); /* failed to open file */
147
    outputnl(svarlang_str(10, 1)); /* failed to open file */
148
    return(1);
148
    return(1);
149
  }
149
  }
150
 
150
 
151
  crc = crc32_init();
151
  crc = crc32_init();
152
 
152
 
Line 158... Line 158...
158
  fclose(fd);
158
  fclose(fd);
159
 
159
 
160
  crc32_finish(&crc);
160
  crc32_finish(&crc);
161
 
161
 
162
  printf("%08lX", crc);
162
  printf("%08lX", crc);
163
  puts("");
163
  outputnl("");
164
 
164
 
165
  return(0);
165
  return(0);
166
}
166
}
167
 
167
 
168
 
168
 
Line 192... Line 192...
192
  }
192
  }
193
 
193
 
194
  /* read the DOSDIR environment variable */
194
  /* read the DOSDIR environment variable */
195
  dosdir = getenv("DOSDIR");
195
  dosdir = getenv("DOSDIR");
196
  if (dosdir == NULL) {
196
  if (dosdir == NULL) {
197
    puts(svarlang_str(2, 2)); /* "%DOSDIR% not set! You should make it point to the SvarDOS main directory." */
197
    outputnl(svarlang_str(2, 2)); /* "%DOSDIR% not set! You should make it point to the SvarDOS main directory." */
198
    puts(svarlang_str(2, 3)); /* "Example: SET DOSDIR=C:\SVARDOS" */
198
    outputnl(svarlang_str(2, 3)); /* "Example: SET DOSDIR=C:\SVARDOS" */
199
    goto GAMEOVER;
199
    goto GAMEOVER;
200
  }
200
  }
201
 
201
 
202
  /* load configuration */
202
  /* load configuration */
203
  if (loadconf(dosdir, &dirlist, &bootdrive) != 0) goto GAMEOVER;
203
  if (loadconf(dosdir, &dirlist, &bootdrive) != 0) goto GAMEOVER;