---
name: "viewphfig"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/viewphfig"
---

# viewphfig(3)

display elements of a phfig\_list

## NAME

viewphfig - display elements of a **phfig\_list**

## SYNOPSYS

```
#include "mph.h"
void viewphfig(ptfig)
phfig_list ∗ptfig;
```

## PARAMETER

- *ptfig*

  Pointer to the **phfig** to be scaned

## DESCRIPTION

**viewphfig** scans all the primary elements of the **phfig\_list**  loaded in ram, and displays a textual output of the data strcuture contents. The *PHINS*, *PHCON*, *PHSEG*, *PHVIA* and *PHREF* are scaned, and their contents displayed.\
 Its use is mostly for debugging purposes, and educational ones, since the output is quite verbose, if very easy to understand.

## EXAMPLE

```
#include <stdio.h>
#include "mph.h"
void view_fig_to_file(ptfig)
phfig_list ∗ptfig;
{
FILE ∗file = freopen(ptfig->NAME, WRITE_TEXT, stdout);
	if (!file) {
		(void)fputs("Can't reopen stdout!\n", stderr);
		EXIT();
	}
	viewphfig(ptfig); /∗ to file called name ∗/
	(void)fclose(file);
}
```

## SEE ALSO

**mbk**(1), [**phfig**(3)](/phfig/3.md), [**viewph**(3)](/viewph/3.md), [**viewphins**(3)](/viewphins/3.md), [**viewphseg**(3)](/viewphseg/3.md), [**viewphref**(3)](/viewphref/3.md), [**viewphvia**(3)](/viewphvia/3.md), [**viewphcon**(3)](/viewphcon/3.md).
