W3C libwww C-Style

Function Declarations

External functions are declared in include files. There are three kinds of include files:

Application Include Files

The .c file should #include its own .h file. A .h file should be protected so that no errors occur if it is #include'd twice. This can be done by the following directives:

	#ifndef HTFOO_H
	#define HTFOO_H

	All the stuff

	#endif /* HTFOO_H */

An interface which relies on other interfaces should include those interface files. An implementation file which uses other modules should include the .h file if it not already included by its own .h file.

WARNING The text format in description files which are converted into declaration files MUST NOT be more than 90 characters wide - otherwise it will get chopped off by the Line Mode Browser the way the conversion currently is set up.

Library Include Files

If you are making a Library module then you need to include all the modules that you reference in your code. You will in all cases need the following:

	#include "wwwsys.h"
	#include "WWWUtil.h"

If you are not making a Library module, then you need the following:

	#include "wwwsys.h"
	#include "WWWLib.h"

System include files and standard C include files

As these are included in the libwww code then do not include any system header files directly. The reason is that these include files are very difficult to get portable over multiple platforms.


Tim BL, and Henrik Frystyk Nielsen,
@(#) $Id: IncludeFiles.html,v 1.10 1998/10/27 23:10:23 frystyk Exp $