constants.h sizes

Discussion to talk about software related topics only.
Post Reply
kackle123
Posts: 73
Joined: Tue Nov 23, 2010 1:35 pm

constants.h sizes

Post by kackle123 »

Is there some easy way for me to know what the values in constants.h represent (bytes, words, etc.)? For example:

Code: Select all

HTTP_RX_BUFFERSIZE  10000
Thank you.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: constants.h sizes

Post by dciliske »

Honestly, the quickest way (currently) is to just grep through the install and look for where it is used. Most of the time "SIZE" constants will be for bytes.

We should probably annotate the values in some way...
Dan Ciliske
Project Engineer
Netburner, Inc
kackle123
Posts: 73
Joined: Tue Nov 23, 2010 1:35 pm

Re: constants.h sizes

Post by kackle123 »

I first tried searching through the nburn's "include" and "system" directories using Windows' Explorer, but came up empty. Actually I'm now thinking my Windows search feature is broken. Thank you anyway.

And yes, code comments are nice!
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: constants.h sizes

Post by rnixon »

Agent Ransack is free, and incredibly good for searching files.
kackle123
Posts: 73
Joined: Tue Nov 23, 2010 1:35 pm

Re: constants.h sizes

Post by kackle123 »

Thank you, rnixon. I just downloaded it minutes before your post!
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: constants.h sizes

Post by tod »

I don't know if it's been disabled in NBEclipse but the standard installs that I use allow you to search directories right from inside Eclipse.
Search->Search...
Make sure the Remote Search tab is selected. The green arrows show the folder selection areas. The blue arrows show some features that I find useful.

I've also used the similar feature found in TextPad when I happen to have that open.
Search File Dialog
Search File Dialog
SearchFiles.png (38.37 KiB) Viewed 9091 times
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: constants.h sizes

Post by tod »

Dan,
If it were called

Code: Select all

HTTP_RX_BUFFERSIZE_BYTES  10000
it would be self-documenting. I suppose changing the name would break code but adding a second name would not.
kackle123
Posts: 73
Joined: Tue Nov 23, 2010 1:35 pm

Re: constants.h sizes

Post by kackle123 »

Thanks tod. Shame on me for forgetting that Eclipse can do that.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: constants.h sizes

Post by tod »

<shamelessPromo>
Eclipse does so much it's easy to forget features exist, which is why a certain course or two on Pluralsight should be watched again and again and...
:D
</shamelessPromo>
kackle123
Posts: 73
Joined: Tue Nov 23, 2010 1:35 pm

Re: constants.h sizes

Post by kackle123 »

<shamelessPraise>
Holy cow! Now I know where to go if I need to expand my Eclipse skills...
</shamelessPraise>
Post Reply