turn on command options

svn path=/trunk/; revision=16885
This commit is contained in:
Steven Edwards 2005-07-29 23:01:16 +00:00
parent 42f41fa7c2
commit 4214fc67a7
2 changed files with 5 additions and 12 deletions

View file

@ -1,5 +1,5 @@
CC=mingw32-gcc CC=mingw32-gcc
OBJECTS = boot.o check.o common.o dosfsck.o fat.o file.o io.o lfn.o OBJECTS = getopt.o boot.o check.o common.o dosfsck.o fat.o file.o io.o lfn.o
all: dosfsck.exe all: dosfsck.exe

View file

@ -12,8 +12,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
//#include <unistd.h> #include <unistd.h>
//#include <getopt.h> #include <getopt.h>
#include "common.h" #include "common.h"
#include "dosfsck.h" #include "dosfsck.h"
@ -82,7 +82,6 @@ static void check_atari( void )
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
int optind;
DOS_FS fs; DOS_FS fs;
int rw,salvage_files,verify,c; int rw,salvage_files,verify,c;
unsigned long free_clusters; unsigned long free_clusters;
@ -91,11 +90,6 @@ int main(int argc,char **argv)
interactive = 1; interactive = 1;
check_atari(); check_atari();
#if 1
optind = 1;
verbose = 1;
list = 1;
#else
while ((c = getopt(argc,argv,"Aad:flnrtu:vVwy")) != EOF) while ((c = getopt(argc,argv,"Aad:flnrtu:vVwy")) != EOF)
switch (c) { switch (c) {
case 'A': /* toggle Atari format */ case 'A': /* toggle Atari format */
@ -149,7 +143,6 @@ int main(int argc,char **argv)
exit(2); exit(2);
} }
if (optind != argc-1) usage(argv[0]); if (optind != argc-1) usage(argv[0]);
#endif
printf( "dosfsck " VERSION ", " VERSION_DATE ", FAT32, LFN\n" ); printf( "dosfsck " VERSION ", " VERSION_DATE ", FAT32, LFN\n" );
fs_open(argv[optind],rw); fs_open(argv[optind],rw);