On 21-Jul-97, Rajesh Dhawan wrote to Dave Boyd about Please help me.
RD> Break your source code into graph.c & graph.h.
RD> Put all your function prototypes (declarations) in graph.h
RD> along with all global variables that you want to use in later
RD> programs.
You shouldn't define anything in the header files, just declarations are
allowed. Ie:
-- baz.h --
int foo(void);
extern unsigned long int bar;
-----
-- baz.c --
static int dummy;
unsigned long int bar;
int foo(void)
{
if (bar == 1) {
return dummy;
} else {
return -dummy;
}
}
-----
dummy can't be writen by external modules, but it can be read through
foo(). bar can be read and writen by everybody.
Javier Kohen [The_Crusher] http://jkohen.base.org
... Pick two: [1] Fast [2] Right [3] Cheap
-!- CrusherTag 0.3.2.
--- Terminate 4.00/Pro
---------------
* Origin: The King of The Ring (4:900/748.3)
|