---
name: "xo_finish_h"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/xo_finish"
---

# xo\_finish\_h(3)

finish formatting output

Part of [xo\_finish(3)](/xo_finish/3.md).

## NAME

**xo\_finish**, **xo\_finish\_h** – finish formatting output

## LIBRARY

library “libxo”

## SYNOPSIS

**#include \<libxo/xo.h\>**

*xo\_ssize\_t*\

**xo\_finish**(*void*);

*xo\_ssize\_t*\

**xo\_finish\_h**(*xo\_handle\_t \*xop*);

## DESCRIPTION

When the program is ready to exit or close a handle, a call to **xo\_finish**() is required. This flushes any buffered data, closes open **libxo** constructs, and completes any pending operations.

Calling this function is *vital* to the proper operation of libxo, especially for the non-TEXT output styles.

## SEE ALSO

[xo\_emit(3)](/xo_emit/3.md), [libxo(3)](/libxo/3.md)

## HISTORY

The **libxo** library first appeared in FreeBSD 11.0.

## AUTHORS

**libxo** was written by Phil Shafer ⟨*phil@freebsd.org*⟩.
