Re: How to decipher a large program.
- From: "Chad" <cdalten@xxxxxxxxx>
- Date: 26 Jun 2006 05:53:09 -0700
Rob Thorpe wrote:
Chad wrote:
I recently downloaded a program that inserts captions in .jpeg files.
However, I'm sort of at a loss on where to start to see how it
works.The program has 3 c files and 4 header files. In the header
files, the
person comments on what function is supposed to do.
The question is, how do I figure out how each of these functions
interact with each other? Do I just get
a pen/paper and start jotting down notes? I was maybe thinking of
constructing some kind of flow
diagram to see how these functions interact. Any ideas?
Starting from "main" can be useful, so can starting by debugging.
Often in a C program there is an include file with the same name as the
program which contains the most central definitions. This can also be
a good place to start.
I took a closer look at the files. There is an include file with the
same name as one of the c programs. However, this c file doesn't have
"main". The "main" is in another file. I'll start
debugging this when I get home from work later on today.
Chad
.
- References:
- How to decipher a large program.
- From: Chad
- Re: How to decipher a large program.
- From: Rob Thorpe
- How to decipher a large program.
- Prev by Date: Re: gdb and threads.
- Next by Date: Re: Seeking an algorithm
- Previous by thread: Re: How to decipher a large program.
- Next by thread: Re: How to decipher a large program.
- Index(es):
Relevant Pages
|
|