---
name: "pack_fclose"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/pack_fclose"
---

# pack\_fclose(3alleg)

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**(3alleg)](/pack_fopen/3alleg.md), [**pack\_fopen\_vtable**(3alleg)](/pack_fopen_vtable/3alleg.md), [**packfile\_password**(3alleg)](/packfile_password/3alleg.md), [**expackf**(3alleg)](/expackf/3alleg.md)
