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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/atom_dummy.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 atom_dummy.c
3
 
  \ingroup (CHKPT)
4
 
*/
5
 
 
6
 
#include <stdlib.h>
7
 
#include "chkpt.h"
8
 
#include <psifiles.h>
9
 
#include <libpsio/psio.h>
10
 
 
11
 
/*!
12
 
** chkpt_rd_atom_dummy()  
13
 
**
14
 
** Reads the array of flags which indicate whether the atom in full_geom is dummy
15
 
**
16
 
** takes no arguments.
17
 
**
18
 
** returns: atom_dummy = array of integers nallatom long.
19
 
** \ingroup (CHKPT)
20
 
*/
21
 
 
22
 
int* chkpt_rd_atom_dummy(void)
23
 
{
24
 
  int num_allatoms;
25
 
  int *atom_dummy;
26
 
  char *keyword;
27
 
  keyword = chkpt_build_keyword("Dummy atom flags");
28
 
 
29
 
  num_allatoms = chkpt_rd_nallatom();
30
 
  atom_dummy = (int *) malloc(sizeof(int)*num_allatoms);
31
 
 
32
 
  psio_read_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
33
 
                  num_allatoms*sizeof(int));
34
 
 
35
 
  free(keyword);
36
 
  return atom_dummy;
37
 
}
38
 
 
39
 
 
40
 
/*!
41
 
** chkpt_wt_atom_dummy()
42
 
**
43
 
** Writes the array of flags which indicate whether the atom in full_geom is dummy
44
 
**
45
 
** \param atom_dummy = array of integers nallatom long.
46
 
**
47
 
** returns: none
48
 
** \ingroup (CHKPT)
49
 
*/
50
 
 
51
 
void chkpt_wt_atom_dummy(int* atom_dummy)
52
 
{
53
 
  int num_allatoms = chkpt_rd_nallatom();
54
 
  char *keyword;
55
 
  keyword = chkpt_build_keyword("Dummy atom flags");
56
 
 
57
 
  psio_write_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
58
 
                   num_allatoms*sizeof(int));
59
 
 
60
 
  free(keyword);
61
 
}