# File file.c

RCS Header: /home/amb/cxref/RCS/file.c 1.10 1997/05/17 15:06:01 amb Exp

C Cross Referencing & Documentation tool. Version 1.4.
Sets up the top level File structure.

## Included Files

- `#include <stdlib.h>`

- `#include <stdio.h>`

- `#include <string.h>`

- `#include "memory.h"`

- `#include "datatype.h"`

- `#include "cxref.h"`
  - `#include "datatype.h"`

## Preprocessor definitions

To control the debugging in this file.

`#define DEBUG 0`

## External Variables

CurFile
This contains the File that is currently being documented to allow the other functions access to it.

`extern File CurFile`

Defined in: | cxref.c

## Global Function DeleteFile()

Deletes a file structure.

`void DeleteFile ( File file )`

`File file`
  The file structure to be deleted.

This is required to go through each of the elements in the File structure and delete each of them in turn.

Prototyped in: | cxref.h
Calls: | DeleteDefineType() | preproc.c
| DeleteFunctionType() | func.c
| DeleteIncludeType() | preproc.c
| DeleteStringList() | slist.c
| DeleteStringList2() | slist.c
| DeleteTypedefType() | type.c
| DeleteVariableType() | var.c
| SafeFree() | memory.c
Called by: | main() | cxref.c

## Global Function NewFile()

Creates a new File structure.

`File NewFile ( char* name )`

`File NewFile`
  Returns the new file structure.
`char* name`
  The name of the file.

Prototyped in: | cxref.h
Calls: | NewStringList() | slist.c
| NewStringList2() | slist.c
| SafeCalloc() | memory.c
| SafeMallocString() | memory.c
Called by: | main() | cxref.c

## Global Function SeenFileComment()

Called when a file comment has been seen. Only the first of multiple comments in a file are used.

`void SeenFileComment ( char* comment )`

`char* comment`
  The comment for the file.

Prototyped in: | cxref.h
Calls: | SafeMallocString() | memory.c
Called by: | SeenComment() | comment.c
References Variables: | CurFile | cxref.c