mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-23 23:33:03 +00:00
Added -I option to c02 compiler
This commit is contained in:
parent
e13bd5809c
commit
e16b4dbeae
@ -140,7 +140,7 @@ int popt(int arg, int argc, char *argv[]) {
|
||||
strncpy (argstr, argv[arg], 31);
|
||||
if (strlen(argstr) != 2) ERROR("malformed option %s\n", argstr, EXIT_FAILURE)
|
||||
opt = toupper(argstr[1]);
|
||||
if (strchr("CHS", opt)) {
|
||||
if (strchr("CHIS", opt)) {
|
||||
if (++arg >= argc) ERROR("Option -%c requires an argument\n", opt, EXIT_FAILURE)
|
||||
strncpy(optarg, argv[arg], 31);
|
||||
}
|
||||
@ -158,6 +158,11 @@ int popt(int arg, int argc, char *argv[]) {
|
||||
strcpy(hdrnam, optarg);
|
||||
DEBUG("c02.popt: Header Name set to '%s'\n", hdrnam)
|
||||
break;
|
||||
case 'I':
|
||||
strcpy(incdir, optarg);
|
||||
strcat(incdir, "/");
|
||||
DEBUG("c02.popt: Include Directory set to '%s'\n", incdir)
|
||||
break;
|
||||
case 'S':
|
||||
strcpy(subdir[subcnt], optarg);
|
||||
DEBUG("c02.popt: subdir[%d] ", subcnt)
|
||||
|
Loading…
Reference in New Issue
Block a user