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

ctags: Use C99 bool instead of defining our own #1107

Closed
wants to merge 1 commit into from

Conversation

collinfunk
Copy link
Contributor

Use stdbool.h definitions instead of defining non-standard ones.

@collinfunk
Copy link
Contributor Author

Two of the style(9) failures are from the weird GETC macro. The others are because I did not add previously missing parentheses around return values. Should I amend or leave it for a different patch?

@bsdimp
Copy link
Member

bsdimp commented Feb 7, 2024

I'd match the existing style, so don't change the returns.
The GETC stuff is a weird macro, and it's just a false positive, so it's good.

@bsdimp bsdimp added the ready label Feb 7, 2024
@bsdimp bsdimp self-assigned this Feb 7, 2024
@bsdimp
Copy link
Member

bsdimp commented Feb 7, 2024

I think this is ready. I'll try to land it later today.

@@ -48,7 +48,7 @@ PF_funcs(void)
char *cp;
char tok[MAXTOKEN];

for (pfcnt = NO;;) {
for (pfcnt = false;;) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should int PF_funcs(void) be changed to bool PF_funcs(void) due to these changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so because we're return pfcnt 3 lines below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking, you are right. While fixing it I also noticed that "skip_key" in C.c and ctags.h should return bool. I'll amend those changes to the commit.

Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
@collinfunk
Copy link
Contributor Author

That should be all of them hopefully...

@bsdimp bsdimp assigned markjdb and unassigned bsdimp Apr 19, 2024
freebsd-git pushed a commit that referenced this pull request Apr 19, 2024
Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>

Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	#1107
@markjdb markjdb added merged and removed ready labels Apr 19, 2024
@markjdb
Copy link
Member

markjdb commented Apr 19, 2024

Merged.

@markjdb markjdb closed this Apr 19, 2024
@collinfunk collinfunk deleted the ctags-stdbool branch April 27, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants