#include <stdlib.h>
#include <string.h>
-#include "getopt.h"
+#include "getopt_.h"
#include "cpmfs.h"
#ifdef USE_DMALLOC
int main(int argc, char *argv[]) /*{{{*/
{
char *image;
- const char *format=FORMAT;
+ const char *format;
int c,usage=0;
struct cpmSuperBlock drive;
struct cpmInode root;
char *bootTracks;
const char *boot[4]={(const char*)0,(const char*)0,(const char*)0,(const char*)0};
+ if (!(format=getenv("CPMTOOLSFMT"))) format=FORMAT;
while ((c=getopt(argc,argv,"b:f:L:h?"))!=EOF) switch(c)
{
case 'b':
}
if (optind!=(argc-1)) usage=1;
- else image=argv[optind];
+ else image=argv[optind++];
if (usage)
{