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

Pointless code repetition in bacio.c #54

Closed
edwardhartnett opened this issue Oct 7, 2021 · 0 comments · Fixed by #84
Closed

Pointless code repetition in bacio.c #54

edwardhartnett opened this issue Oct 7, 2021 · 0 comments · Fixed by #84
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

edwardhartnett commented Oct 7, 2021

We have two functions that are mostly identical:

  int bacio_
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {

and

  int baciol_
         (int * mode, long int * start, long int *newpos, int * size, long int * no,
          long int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {

The difference between these functions is that the start, newpos, no, and nactual are long in baciol() and int in bacio().

Otherwise these functions are the same.

In fact, with a few code changes, we could use the baciol() function everywhere, and eliminate the bacio() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant