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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2006-09-10 14:01:33 UTC
  • Revision ID: james.westby@ubuntu.com-20060910140133-ib2j86trekykfsfv
Tags: upstream-3.2.3
ImportĀ upstreamĀ versionĀ 3.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
  \file num_unique_shell.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
** int chkpt_rd_num_unique_shell()  
 
13
** Reads in the number of symmetry unique shells. 
 
14
**
 
15
** returns: nunique = number of symmetry unique shells.
 
16
** \ingroup (CHKPT)
 
17
*/
 
18
 
 
19
int chkpt_rd_num_unique_shell(void)
 
20
{
 
21
  int nunique;
 
22
  char *key;
 
23
 
 
24
  key = chkpt_build_keyword("Num. unique shells");
 
25
  psio_read_entry(PSIF_CHKPT, key, (char *) &nunique, sizeof(int));
 
26
  free(key);
 
27
  return nunique;
 
28
}
 
29
 
 
30
 
 
31
/*!
 
32
** void chkpt_wt_num_unique_shell(int)  
 
33
** Writes out the number of symmetry unique shells. 
 
34
**
 
35
** \param nunique = number of symmetry unique shells.
 
36
**
 
37
** returns: none
 
38
** \ingroup (CHKPT)
 
39
*/
 
40
 
 
41
void chkpt_wt_num_unique_shell(int nunique)
 
42
{
 
43
  char *key;
 
44
  key = chkpt_build_keyword("Num. unique shells");
 
45
  psio_write_entry(PSIF_CHKPT, key, (char *) &nunique, sizeof(int));
 
46
  free(key);
 
47
}