Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: allow multple include paths and -I short option #90

Open
GitMensch opened this issue Jun 5, 2023 · 0 comments
Open

FR: allow multple include paths and -I short option #90

GitMensch opened this issue Jun 5, 2023 · 0 comments

Comments

@GitMensch
Copy link
Contributor

currently there is only "none" or "exactly one":

Open-COBOL-ESQL/ocesql/ppout.c

Lines 1967 to 1973 in eec3a23

if(include_path){
com_sprintf(filename,sizeof(filename), "%s/", include_path);
}
com_strcat(filename,sizeof(filename), l->incfileName);
incf = fopen_or_die(filename, "r");

if(strcmp("inc", opthead) == 0){
if(optval != NULL){
include_path = com_strdup(optval);
} else {
printf("invalid option: --inc is get directory path parameter.\n");
}

(side note: if specified multiple times then each tie there is memory allocated, but it is never freed, nor an error displayed that --inc may be only used once)

FR: allow to use -I as alias for --inc and allow to specify multiple ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant