~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/disp.cc

  • 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
 
3
  \ingroup CHKPT
 
4
*/
 
5
 
 
6
#include <cstdlib>
 
7
#include <psifiles.h>
 
8
#include <libpsio/psio.hpp>
 
9
extern "C" {
 
10
#include <libchkpt/chkpt.h>
 
11
}
 
12
#include <libchkpt/chkpt.hpp>
 
13
 
 
14
using namespace psi;
 
15
 
 
16
int Chkpt::rd_disp(void)
 
17
{
 
18
        int disp;
 
19
        char *keyword;
 
20
        keyword = build_keyword("Current displacement");
 
21
 
 
22
        psio->read_entry(PSIF_CHKPT, keyword, (char *) &disp,
 
23
                sizeof(int));
 
24
 
 
25
        free(keyword);
 
26
        return disp;
 
27
}
 
28
 
 
29
void Chkpt::wt_disp(int disp)
 
30
{
 
31
        char *keyword;
 
32
        keyword = build_keyword("Current displacement");
 
33
 
 
34
        psio->write_entry(PSIF_CHKPT, keyword, (char *) &disp,
 
35
                sizeof(int));
 
36
 
 
37
        free(keyword);
 
38
}
 
39
 
 
40
extern "C" {
 
41
/*!
 
42
** chkpt_rd_disp():  Reads in the current geometry displacement number.
 
43
**
 
44
** Parameters: none
 
45
**
 
46
** not used by OPTKING; used by anybody else ???
 
47
**
 
48
** Returns: int disp, the current geometry displacement number
 
49
** \ingroup CHKPT
 
50
*/
 
51
        int chkpt_rd_disp(void)
 
52
        {
 
53
                int disp;
 
54
                disp = _default_chkpt_lib_->rd_disp();
 
55
                return disp;
 
56
        }
 
57
 
 
58
 
 
59
/*!
 
60
** chkpt_wt_disp():  Writes out the current geometry displacement number.
 
61
**
 
62
** \param int disp   the current geometry displacement number
 
63
**
 
64
** Returns: none
 
65
** \ingroup CHKPT
 
66
*/
 
67
        void chkpt_wt_disp(int disp)
 
68
        {
 
69
                _default_chkpt_lib_->wt_disp(disp);
 
70
        }
 
71
}
 
72