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

Minor modification to Inivar #2796

Merged
merged 3 commits into from
Jan 7, 2024
Merged

Minor modification to Inivar #2796

merged 3 commits into from
Jan 7, 2024

Conversation

havardAasen
Copy link
Contributor

Some minor refactoring in inivar, most is related to Clang-Tidy and
Clang warnings.

  • Renamed a couple of variables.
  • Be more consistent regarding return value, -1 on error and 1 if
    variable is not found, 0 is still success.
  • Change to headers adapted for C++.
  • Simplified conditions for several of the if-statements.
  • Removed two unused headers.
  • Use strtol() instead of sscanf() to get number from command-line
    argument. This also sets a limit of accepted numbers between 0 and
    'INT_MAX'.
  • Change name for '-num' argument to 'occurrence_number'.

The return value is the only change noticeable from the outside.

The man page was extended and rewritten in asciidoc.

Some minor refactoring in inivar, most is related to Clang-Tidy and
Clang warnings.
- Renamed a couple of variables.
- Be more consistent regarding return value, -1 on error and 1 if
  variable is not found, 0 is still success.
- Change to headers adapted for C++.
- Simplified conditions for several of the if-statements.
- Removed two unused headers.
- Use strtol() instead of sscanf() to get number from command-line
  argument. This also sets a limit of accepted numbers between 0 and
  'INT_MAX'.
- Change name for '-num' argument to 'occurrence_number'.
Include information that the return value can be NULL.
This includes information about all command-line arguments. The section
'SEE ALSO' has been removed.
@havardAasen
Copy link
Contributor Author

Rebased against master to ensure successful CI integration.

@andypugh andypugh merged commit 76d66d0 into LinuxCNC:master Jan 7, 2024
8 of 11 checks passed
@havardAasen havardAasen deleted the inivar branch January 8, 2024 07:25
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

Successfully merging this pull request may close these issues.

2 participants