---
name: "pack_fclose"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pack_fclose/3alleg4"
---

# pack\_fclose(3alleg4)

Closes a stream previously opened. Allegro game programming library.

## NAME

pack\_fclose - Closes a stream previously opened. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int pack\_fclose(PACKFILE \*f);**

## DESCRIPTION

Closes the stream \`f' previously opened with pack\_fopen() or pack\_fopen\_vtable(). After you have closed the stream, performing operations on it will yield errors in your application (e.g. crash it) or even block your OS.

## RETURN VALUE

Returns zero on success. On error, returns an error code which is also stored in \`errno'. This function can fail only when writing to files: if the file was opened in read mode, it will always succeed.

## SEE ALSO

**pack\_fopen**(3alleg4), **pack\_fopen\_vtable**(3alleg4), **packfile\_password**(3alleg4), **expackf**(3alleg4)
