~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/atom_pos.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
*/
5
5
 
6
6
#include "chkpt.h"
 
7
#include <stdlib.h>
7
8
#include <psifiles.h>
8
9
#include <libpsio/psio.h>
9
10
#include <libciomr/libciomr.h>
29
30
int *chkpt_rd_atom_position(void)
30
31
{
31
32
  int *atom_position, natom;
32
 
  char *key;
 
33
  char *keyword;
 
34
  keyword = chkpt_build_keyword("Atomic symm positions");
33
35
 
34
36
  natom = chkpt_rd_natom();
35
37
  atom_position = init_int_array(natom);
36
38
 
37
 
  key = chkpt_build_keyword("Atomic symm positions");
38
 
  psio_read_entry(PSIF_CHKPT, key, (char *) atom_position, natom*sizeof(int));
39
 
  free(key);
 
39
  psio_read_entry(PSIF_CHKPT, keyword, (char *) atom_position,
 
40
      natom*sizeof(int));
40
41
 
 
42
  free(keyword);
41
43
  return atom_position;
42
44
}
43
45
 
66
68
void chkpt_wt_atom_position(int *atom_position)
67
69
{
68
70
  int natom;
69
 
  char *key;
 
71
  char *keyword;
 
72
  keyword = chkpt_build_keyword("Atomic symm positions");
70
73
 
71
74
  natom = chkpt_rd_natom();
72
75
 
73
 
  key = chkpt_build_keyword("Atomic symm positions");
74
 
  psio_write_entry(PSIF_CHKPT, key, (char *) atom_position, natom*sizeof(int));
75
 
  free(key);
 
76
  psio_write_entry(PSIF_CHKPT, keyword,
 
77
      (char *) atom_position, natom*sizeof(int));
 
78
 
 
79
  free(keyword);
76
80
}