~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/lib/libiwl/buf_toend.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*!
2
 
  \file buf_toend.c
3
 
  \ingroup (IWL)
4
 
*/
5
 
#include <stdio.h>
6
 
#include <stdlib.h>
7
 
#include <libpsio/psio.h>
8
 
#include "iwl.h"
9
 
 
10
 
extern FILE *outfile;
11
 
 
12
 
/*!
13
 
** iwl_buf_toend()
14
 
**
15
 
** Set IWL Buffer's pointer to the end. Useful when want to append to
16
 
** an already existing file
17
 
**
18
 
** Edward Valeev, January 2001
19
 
** \ingroup (IWL)
20
 
*/
21
 
void iwl_buf_toend(struct iwlbuf *Buf)
22
 
{
23
 
  psio_tocentry *this_entry;
24
 
  ULI entry_length;
25
 
 
26
 
  this_entry = psio_tocscan(Buf->itap, IWL_KEY_BUF);
27
 
  if (this_entry == NULL) {
28
 
    fprintf(outfile,
29
 
        "iwl_buf_toend: Can't find IWL buffer entry in file %d\n", Buf->itap);
30
 
    iwl_buf_close(Buf,1);
31
 
    return;
32
 
  } 
33
 
 
34
 
  /* set up buffer pointer */
35
 
  entry_length = psio_get_length(this_entry->sadd,this_entry->eadd);
36
 
  Buf->bufpos = psio_get_address(PSIO_ZERO,entry_length);
37
 
  
38
 
  return;
39
 
}
40