# File warn-raw.c

RCS Header: /home/amb/cxref/RCS/warn-raw.c 1.26 1999/01/24 16:53:50 amb Exp

C Cross Referencing & Documentation tool. Version 1.5.
Writes the raw information and / or warnings out.

## Included Files

- `#include <stdlib.h>`

- `#include <stdio.h>`

- `#include <string.h>`

- `#include "datatype.h"`

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

- `#include "memory.h"`

## External Variables

option_warn
Output option.

`extern int option_warn`

Defined in: | cxref.c

option_raw
Output option.

`extern int option_raw`

Defined in: | cxref.c

option_xref
Output option.

`extern int option_xref`

Defined in: | cxref.c

option_index
Output option.

`extern int option_index`

Defined in: | cxref.c

## Local Variables

filename
The name of the current file.

`static char* filename`

Used in: | WriteWarnRawDefine()
| WriteWarnRawFile()
| WriteWarnRawFilePart()
| WriteWarnRawFunction()
| WriteWarnRawInclude()
| WriteWarnRawTypedef()
| WriteWarnRawVariable()

## Global Function CopyOrSkip()

Decide if to copy or skip the next line.

`int CopyOrSkip ( char* string, char* type, int* copy, int* skip )`

`int CopyOrSkip`
  Returns the number of characters to skip.
`char* string`
  The string that starts the next line.
`char* type`
  The type of file we are outputing.
`int* copy`
  Returns true if we are to copy the line verbatim.
`int* skip`
  Returns true if we are to skip the line.

Prototyped in: | cxref.h
Calls: | strncmp()
Called by: | html() | html.c
| latex() | latex.c
| rtf() | rtf.c
| sgml() | sgml.c

## Global Function WriteWarnRawAppendix()

Write out a raw version of the appendix.

`void WriteWarnRawAppendix ( StringList files, StringList2 funcs, StringList2 vars, StringList2 types )`

`StringList files`
  The list of files to write.
`StringList2 funcs`
  The list of functions to write.
`StringList2 vars`
  The list of variables to write.
`StringList2 types`
  The list of types to write.

Prototyped in: | cxref.h
Calls: | printf()
Called by: | main() | cxref.c
References Variables: | option_index | cxref.c
| option_warn | cxref.c

## Global Function WriteWarnRawFile()

Write the raw / warning output for a complete File structure and all components.

`void WriteWarnRawFile ( File file )`

`File file`
  The File structure to output.

The file structure is broken into its components and they are each written out.

Prototyped in: | cxref.h
Calls: | WriteWarnRawDefine() | warn-raw.c
| WriteWarnRawFilePart() | warn-raw.c
| WriteWarnRawFunction() | warn-raw.c
| WriteWarnRawInclude() | warn-raw.c
| WriteWarnRawTypedef() | warn-raw.c
| WriteWarnRawVariable() | warn-raw.c
| printf()
Called by: | main() | cxref.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c

## Local Function WriteWarnRawDefine()

Write a Define structure out.

`static void WriteWarnRawDefine ( Define def )`

`Define def`
  The Define structure to output.

Prototyped in: | warn-raw.c
Calls: | printf()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c

## Local Function WriteWarnRawFilePart()

Write a File structure out.

`static void WriteWarnRawFilePart ( File file )`

`File file`
  The File structure to output.

Prototyped in: | warn-raw.c
Calls: | printf(), strcmp(), strlen()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c
| option_xref | cxref.c

## Local Function WriteWarnRawFunction()

Write a Function structure out.

`static void WriteWarnRawFunction ( Function func )`

`Function func`
  The Function structure to output.

Prototyped in: | warn-raw.c
Calls: | printf(), strcmp(), strncmp()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c
| option_xref | cxref.c

## Local Function WriteWarnRawInclude()

Write an Include structure out.

`static void WriteWarnRawInclude ( Include inc )`

`Include inc`
  The Include structure to output.

Prototyped in: | warn-raw.c
Calls: | WriteWarnRawSubInclude() | warn-raw.c
| printf()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c

## Local Function WriteWarnRawStructUnion()

Write a structure / union / enum out.

`static void WriteWarnRawStructUnion ( StructUnion su, int depth, StructUnion base )`

`StructUnion su`
  The structure / union / enum to write.
`int depth`
  The depth within the structure.
`StructUnion base`
  The base struct union that this one is part of.

Prototyped in: | warn-raw.c
Calls: | WriteWarnRawStructUnion() | warn-raw.c
| printf(), strstr()
Called by: | WriteWarnRawStructUnion() | warn-raw.c
| WriteWarnRawTypedef() | warn-raw.c
References Variables: | option_raw | cxref.c
| option_warn | cxref.c

## Local Function WriteWarnRawSubInclude()

Write an Sub-Include structure out.

`static void WriteWarnRawSubInclude ( Include inc, int depth )`

`Include inc`
  The Include structure to output.
`int depth`
  The depth of the include hierarchy.

Prototyped in: | warn-raw.c
Calls: | WriteWarnRawSubInclude() | warn-raw.c
| printf()
Called by: | WriteWarnRawInclude() | warn-raw.c
| WriteWarnRawSubInclude() | warn-raw.c

## Local Function WriteWarnRawTypedef()

Write a Typedef structure out.

`static void WriteWarnRawTypedef ( Typedef type )`

`Typedef type`
  The Typedef structure to output.

Prototyped in: | warn-raw.c
Calls: | WriteWarnRawStructUnion() | warn-raw.c
| printf()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c

## Local Function WriteWarnRawVariable()

Write a Variable structure out.

`static void WriteWarnRawVariable ( Variable var )`

`Variable var`
  The Variable structure to output.

Prototyped in: | warn-raw.c
Calls: | printf(), strcmp()
Called by: | WriteWarnRawFile() | warn-raw.c
References Variables: | filename | warn-raw.c
| option_raw | cxref.c
| option_warn | cxref.c
| option_xref | cxref.c