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

# delphseg(3)

delete a physical segment

## NAME

delphseg - delete a physical segment

## SYNOPSYS

```
#include "mph.h"
int delphseg(ptfig, ptseg)
phfig_list ∗ptfig;
phseg_list ∗ptseg;
```

## PARAMETERS

- *ptfig*

  Pointer to the figure in which the segment should be deleted

- *ptseg*

  Pointer to the segment to be deleted

## DESCRIPTION

**delphseg** delete the segment pointed to by *ptseg* in the figure  pointed to by *ptfig*. The list consistency is maintainded, and the space freed.

## RETURN VALUE

**delphseg** returns **1** if the segment has been deleted, **0** if no such segment exists in the list.

## EXAMPLE

```
#include "mph.h"
char ∗was_existing(ptfig, ptseg)
phfig_list ∗ptfig;
phseg_list ∗ptseg;
{
   /∗ if only one exists, it's this one ∗/
   return delphseg(ptfig, ptseg) ? "you just killed it!"
                                 : "wasn't here anyway";
}
```

## SEE ALSO

**mbk**(1), [**phfig**(3)](/phfig/3.md), [**phseg**(3)](/phseg/3.md), [**addphseg**(3)](/addphseg/3.md).
