LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-25-2013, 12:13 PM   #1
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Rep: Reputation: Disabled
Software to read through source code hierarchies?


Hi, I'm wondering what is the best way to sift through a source code hierarchy?

I have little programming experience at all, except for a little Pascal, TurboC and some scripting. I do know Vi basics and would be willing to expand my knowledge of that, but I don't know what my options are. I would like some software with the look of Midnight Commander that helps summarize and arrange the source-code on screen and that would allow me to follow definitions between source files. In my case it is for Debian GNU, but do not limit your reply based on the OS.

I am hoping for open source software, but feel free to mention commercial software as well for the sake of anyone else reading the thread. Any suggestions will be appreciated!
 
Old 08-25-2013, 01:57 PM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Hi.

ctags should be mentioned here. It has no dedicated GUI or TUI, but some text editors support it, e.g. vim. Typical usage looks like (assuming Debian/vim/C):
Code:
$ sudo apt-get install exuberant-ctags
$ cd <source directory>
$ ctags-exuberant -R # this will create the `tags' file in current directory
$ vim -t main # jump to the file with  main(){...};
Enter `:help tags' in vim to get documentation about keybindings etc. Here is a couple of shortcuts to get started:
Code:
CTRL-]    Jump to the definition of the word under cursor.
CTRL-T   Jump back.
 
1 members found this post helpful.
Old 08-26-2013, 11:53 AM   #3
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thank you, firstfire, that looks like it will be very helpful!
 
Old 08-26-2013, 07:36 PM   #4
mariostg
Member
 
Registered: Apr 2011
Location: Gatineau, Quebec
Distribution: OpenBSD
Posts: 80

Rep: Reputation: 5
You might want to look at doxygen too. It creates documentation from your source files. It can also creates dependency diagrams.
 
1 members found this post helpful.
Old 08-30-2013, 01:25 PM   #5
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mariostg View Post
You might want to look at doxygen too. It creates documentation from your source files. It can also creates dependency diagrams.
I thought I'd get back to you on Doxygen. I installed Doxygen on Debian Wheezy (A64), and I used it to take a look at the source code for Mplayer (a huge pile of 'Self Documenting' source code). After installation of Doxygen I found 'Doxywizard' in my menu. I put in the various file paths and added some checks to check boxes in the 'Expert' section, and Doxygen did an excellent job. There was an additional package (Graphviz) I had to "apt-get install" myself to enable Doxygen to automatically create graphs. Then it made graphs and even did them in .svg format. Additionally Doxygen can create tag files, and the developers are talking about adding what they call Autogen support. I'm very impressed with it.

Last edited by greatbear; 08-30-2013 at 01:26 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read source code of linux utilities? zero91 Linux - Software 4 05-13-2012 08:21 PM
software installation from source code sumer Linux - Newbie 3 03-15-2009 02:41 AM
start to read the source code and have questions pipehappy Linux - Newbie 1 01-05-2005 02:19 AM
source code for read() function ? Mike Davies Linux - Software 1 11-03-2004 02:10 PM
Questions about how to read OS source code hegel Programming 1 10-28-2003 12:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration