blob: e5a8b34d64e5729ae4e4dcc36e71ce1c9df7d966 [file] [log] [blame]
<html lang="en">
<head>
<title>Summary of Obstacks - The GNU C Library</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The GNU C Library">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Obstacks.html#Obstacks" title="Obstacks">
<link rel="prev" href="Obstack-Chunks.html#Obstack-Chunks" title="Obstack Chunks">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU C library.
This is Edition 0.12, last updated 2007-10-27,
of `The GNU C Library Reference Manual', for version
2.8 (Sourcery G++ Lite 2011.03-41).
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
2003, 2007, 2008, 2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Free Software Needs Free Documentation''
and ``GNU Lesser General Public License'', the Front-Cover texts being
``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
(a) The FSF's Back-Cover Text is: ``You have the freedom to
copy and modify this GNU manual. Buying copies from the FSF
supports it in developing GNU and promoting software freedom.''-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="Summary-of-Obstacks"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Obstack-Chunks.html#Obstack-Chunks">Obstack Chunks</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Obstacks.html#Obstacks">Obstacks</a>
<hr>
</div>
<h5 class="subsubsection">3.2.4.11 Summary of Obstack Functions</h5>
<p>Here is a summary of all the functions associated with obstacks. Each
takes the address of an obstack (<code>struct obstack *</code>) as its first
argument.
<dl>
<dt><code>void obstack_init (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Initialize use of an obstack. See <a href="Creating-Obstacks.html#Creating-Obstacks">Creating Obstacks</a>.
<br><dt><code>void *obstack_alloc (struct obstack *</code><var>obstack-ptr</var><code>, int </code><var>size</var><code>)</code><dd>Allocate an object of <var>size</var> uninitialized bytes.
See <a href="Allocation-in-an-Obstack.html#Allocation-in-an-Obstack">Allocation in an Obstack</a>.
<br><dt><code>void *obstack_copy (struct obstack *</code><var>obstack-ptr</var><code>, void *</code><var>address</var><code>, int </code><var>size</var><code>)</code><dd>Allocate an object of <var>size</var> bytes, with contents copied from
<var>address</var>. See <a href="Allocation-in-an-Obstack.html#Allocation-in-an-Obstack">Allocation in an Obstack</a>.
<br><dt><code>void *obstack_copy0 (struct obstack *</code><var>obstack-ptr</var><code>, void *</code><var>address</var><code>, int </code><var>size</var><code>)</code><dd>Allocate an object of <var>size</var>+1 bytes, with <var>size</var> of them copied
from <var>address</var>, followed by a null character at the end.
See <a href="Allocation-in-an-Obstack.html#Allocation-in-an-Obstack">Allocation in an Obstack</a>.
<br><dt><code>void obstack_free (struct obstack *</code><var>obstack-ptr</var><code>, void *</code><var>object</var><code>)</code><dd>Free <var>object</var> (and everything allocated in the specified obstack
more recently than <var>object</var>). See <a href="Freeing-Obstack-Objects.html#Freeing-Obstack-Objects">Freeing Obstack Objects</a>.
<br><dt><code>void obstack_blank (struct obstack *</code><var>obstack-ptr</var><code>, int </code><var>size</var><code>)</code><dd>Add <var>size</var> uninitialized bytes to a growing object.
See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>void obstack_grow (struct obstack *</code><var>obstack-ptr</var><code>, void *</code><var>address</var><code>, int </code><var>size</var><code>)</code><dd>Add <var>size</var> bytes, copied from <var>address</var>, to a growing object.
See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>void obstack_grow0 (struct obstack *</code><var>obstack-ptr</var><code>, void *</code><var>address</var><code>, int </code><var>size</var><code>)</code><dd>Add <var>size</var> bytes, copied from <var>address</var>, to a growing object,
and then add another byte containing a null character. See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>void obstack_1grow (struct obstack *</code><var>obstack-ptr</var><code>, char </code><var>data-char</var><code>)</code><dd>Add one byte containing <var>data-char</var> to a growing object.
See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>void *obstack_finish (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Finalize the object that is growing and return its permanent address.
See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>int obstack_object_size (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Get the current size of the currently growing object. See <a href="Growing-Objects.html#Growing-Objects">Growing Objects</a>.
<br><dt><code>void obstack_blank_fast (struct obstack *</code><var>obstack-ptr</var><code>, int </code><var>size</var><code>)</code><dd>Add <var>size</var> uninitialized bytes to a growing object without checking
that there is enough room. See <a href="Extra-Fast-Growing.html#Extra-Fast-Growing">Extra Fast Growing</a>.
<br><dt><code>void obstack_1grow_fast (struct obstack *</code><var>obstack-ptr</var><code>, char </code><var>data-char</var><code>)</code><dd>Add one byte containing <var>data-char</var> to a growing object without
checking that there is enough room. See <a href="Extra-Fast-Growing.html#Extra-Fast-Growing">Extra Fast Growing</a>.
<br><dt><code>int obstack_room (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Get the amount of room now available for growing the current object.
See <a href="Extra-Fast-Growing.html#Extra-Fast-Growing">Extra Fast Growing</a>.
<br><dt><code>int obstack_alignment_mask (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>The mask used for aligning the beginning of an object. This is an
lvalue. See <a href="Obstacks-Data-Alignment.html#Obstacks-Data-Alignment">Obstacks Data Alignment</a>.
<br><dt><code>int obstack_chunk_size (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>The size for allocating chunks. This is an lvalue. See <a href="Obstack-Chunks.html#Obstack-Chunks">Obstack Chunks</a>.
<br><dt><code>void *obstack_base (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Tentative starting address of the currently growing object.
See <a href="Status-of-an-Obstack.html#Status-of-an-Obstack">Status of an Obstack</a>.
<br><dt><code>void *obstack_next_free (struct obstack *</code><var>obstack-ptr</var><code>)</code><dd>Address just after the end of the currently growing object.
See <a href="Status-of-an-Obstack.html#Status-of-an-Obstack">Status of an Obstack</a>.
</dl>
</body></html>