Skip to content

Commit

Permalink
map filename support
Browse files Browse the repository at this point in the history
  • Loading branch information
prokushev committed Oct 18, 2024
1 parent 1ffd1a0 commit f90996e
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions tools/bind/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ typedef struct _opts {
int logo;
char outfile[_MAX_PATH];
char infile[_MAX_PATH];
char mapfile[_MAX_PATH];
int map;
int dosformat;
} opts;
Expand Down Expand Up @@ -318,6 +319,7 @@ int main(int argc, char *argv[])
options.logo=1;
options.outfile[0]=0;;
options.infile[0]=0;;
options.mapfile[0]=0;;
options.map=0;
options.dosformat=0;

Expand Down Expand Up @@ -346,13 +348,15 @@ int main(int argc, char *argv[])
{
case 'm':
case 'M':
if (!strncmp(_strupr(optarg), "AP", 2))
if (!strnicmp(optarg, "AP", 2))
{
options.map=1;
break;
}

exit(1);
strcpy(options.mapfile, argv[optind]);
} else
{
strcpy(options.mapfile, optarg);
}
options.map=1;
break;

case 'n':
case 'N':
Expand Down Expand Up @@ -915,7 +919,12 @@ int main(int argc, char *argv[])
fputs("system dos\n",f);
fputs("name fstub.exe\n" , f);
fputs("file tmp.obj\n", f);
if (options.map) fputs("op m\n", f);
if (options.map)
{
fputs("op m ", f);
fputs(options.mapfile, f);
fputs("\n", f);
}
/*if (DoscallsLIB)
{
fputs("lib doscalls.lib\n", f);
Expand Down

0 comments on commit f90996e

Please sign in to comment.