Hidden routines

Juergen Wagner gandalf at csli.STANFORD.EDU
Thu Dec 22 13:26:22 AEST 1988


The problem as I see it was to get the following: S in externally accessible,
and it uses X and Y. There may also be some variables A1...An which should be
local to S, X, Y. Everything except S should be hidden to callers.

Well, how about the following:

	# include <handwaving.h>

	static ... A1, ..., An;

	void S(...)
	{  ...  }

	static void X(...)
	{  ...  }

	static void Y(...)
	{  ...  }

Basically, you should declare everything static, except S.

-- 
Juergen Wagner		   			gandalf at csli.stanford.edu
						 wagner at arisia.xerox.com



More information about the Comp.lang.c mailing list