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

# viewph(3)

display all the phfig\_lists and their elements

## NAME

viewph - display all the **phfig\_list**s and their elements

## SYNOPSYS

```
#include "mph.h"
void viewph();
```

## DESCRIPTION

**viewph** scans all the elements of the entire **phfig\_list**  loaded in ram, and displays a textual output of the data strcuture contents. All the figures are treated, the first one beeing pointed to by **HEAD\_PHFIG**, the  global variable that points to the head of all **phfig**s.\
 Its use is mostly for debugging purposes, and educational ones, since the output is quite verbose, even if very easy to understand.

## EXAMPLE

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

## SEE ALSO

**mbk**(1), [**phfig**(3)](/phfig/3.md), **view\_phfig**(3), **view\_phins**(3), **view\_phseg**(3), **view\_phref**(3), **view\_phvia**(3), **view\_phfigcon**(3).
