![]() |
|
Total number of lines in project |
Murat AYIK
Member #6,514
October 2005
![]() |
I asked this in DevC++ mailing list(don't know why!) but can't get responses yet probably for that digest thing. Here it is: > I like to see how many lines of code I wrote, but Currently I count them in "Project Properties" and write all numbers to windows calculator. With file numbers increasing that became harder. _____________________________________________________ |
Onewing
Member #6,152
August 2005
![]() |
You could write a little C/C++ program that simply reads the lines of every cpp file in the current directory and calculates the total for you. ------------ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
|
Marcello
Member #1,860
January 2002
![]() |
Or use wc? |
Evert
Member #794
November 2000
![]() |
No need to use cat. wc * will print the total counts for all files at the bottom. |
Murat AYIK
Member #6,514
October 2005
![]() |
Quote: You could write a little C/C++ program that simply reads the lines of every cpp file in the current directory and calculates the total for you. This might be useful and easy. I need that info only for my main project, so a totally hardcoded prog can do what I want. Quote:
Or if you are too lazy to do that, then: Very nice! Combining this with the previous idea can decrease the coding time of that utility from 5 mins to 2 mins:) EDIT: EDIT2: _____________________________________________________ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: What is that?(I really don't know!) It gives you the number of lines, words, and characters. Just read my post, point 1. Follow the link to download. Quote: I found the cat and wc tools but failed to use them. They start a console where I can write some commands apparently but I don't know what to write there. Copy them to your Windows folder. Go to your programming folder (within a shell) and type: wc *.c |
Marcello
Member #1,860
January 2002
![]() |
Or add the folder they're in to your system path (might be a better idea). Marcello |
ReyBrujo
Moderator
January 2001
![]() |
Use grep to remove blank lines and comments, then wc to count. Maybe... cat *.c | grep -v "^\s*/*.*" | grep -v "^\s*//" | grep -v "^\s*$" | wc -l will work. -- |
Marcello
Member #1,860
January 2002
![]() |
That's cheating! You're supposed to include comments and blank lines. Marcello |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Try sloccount. -- |
Murat AYIK
Member #6,514
October 2005
![]() |
Quote: Use grep to remove blank lines and comments, then wc to count. Maybe... cat *.c | grep -v "^\s*/*.*" | grep -v "^\s*//" | grep -v "^\s*$" | wc -l will work. What is that, ASCII art?:) I think it would be better to post a feature-request to the bloodshed guys. Quote: That's cheating! You're supposed to include comments and blank lines. That's why I like DevCpp's built-in counter. It reports them seperately. I keep three numbers in my "comment.h" file; total lines, without empty lines and code lines only. The third doesn't really help your self-confidence;) Quote: Try sloccount Seems like not so Windows-friendly! I will try something tomorrow, it's 11PM. And sorry I'm out of cookies, Matthew gave me only one plate to serve:)(I know, wrong forum category!) _____________________________________________________ |
HoHo
Member #4,534
April 2004
![]() |
Some quite useless statistics about allegro. Statistics generated by sloccount. Latest SVN version of 4.2: Totals grouped by language (dominant language first): Total Physical Source Lines of Code (SLOC) = 150,894 4.3: Totals grouped by language (dominant language first): Total Physical Source Lines of Code (SLOC) = 152,832 So, Allegro costs around $5,300,000. Not too bad for a ten year old thingie __________ |
GullRaDriel
Member #3,861
September 2003
![]() |
Quote: Total Estimated Cost to Develop = $ 5,309,659 See what you loose ! ;-X "Code is like shit - it only smells if it is not yours" |
Murat AYIK
Member #6,514
October 2005
![]() |
Quote:
Total Estimated Cost to Develop = $ 5,309,659 Well done, Hoho! Now noone will work on Allegro anymore without being paid:P _____________________________________________________ |
HoHo
Member #4,534
April 2004
![]() |
I think the effort estimate is a little off. I doubt combining all developers together would make four full-time developers over ten years. __________ |
Evert
Member #794
November 2000
![]() |
Quote: pascal: 179 (0.12%)
Eh? |
HoHo
Member #4,534
April 2004
![]() |
hoho@box ~/katsepolygon/allegro-svn $ sloccount --details ./4.3/ | grep pascal 74 pascal src_amd64 /home/hoho/katsepolygon/allegro-svn/4.3/src/amd64/asmdefs.inc 105 pascal src_ppc /home/hoho/katsepolygon/allegro-svn/4.3/src/ppc/ppcdef.inc I think it doesn't use anything else but file extensions to see what language is used. __________ |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: I think the effort estimate is a little off. I doubt combining all developers together would make four full-time developers over ten years. It looks like it thinks it was made in 2.16 years, which makes sense since allegro is developed rather slowly compared to commercial products. |
HoHo
Member #4,534
April 2004
![]() |
Quote: It looks like it thinks it was made in 2.16 years ... by 18.19 developers __________ |
Tobias Dammers
Member #2,604
August 2002
![]() |
--- |
|