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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/sym_label.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 sym_label.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_sym_label():  Reads in the symmetry label.
 
13
**
 
14
**   takes no arguments.
 
15
**
 
16
**   returns: symmetry = symmetry label.
 
17
**
 
18
** \ingroup (CHKPT)
 
19
*/
 
20
 
 
21
char *chkpt_rd_sym_label(void)
 
22
{
 
23
  char *sym_label;
 
24
  char *key;
 
25
 
 
26
  sym_label = (char *) malloc(4*sizeof(char));
 
27
 
 
28
  key = chkpt_build_keyword("Symmetry label");
 
29
  psio_read_entry(PSIF_CHKPT, key, (char *) sym_label, 4*sizeof(char));
 
30
  sym_label[3] = '\0';
 
31
  free(key);
 
32
 
 
33
  return sym_label;  
 
34
}
 
35
 
 
36
 
 
37
/*!
 
38
** chkpt_wt_sym_label():  Writes out the symmetry label.
 
39
**
 
40
** \param symmetry = symmetry label.
 
41
**
 
42
** returns none
 
43
**
 
44
** \ingroup (CHKPT)
 
45
*/
 
46
 
 
47
void chkpt_wt_sym_label(char *sym_label)
 
48
{
 
49
  char *key;
 
50
  key = chkpt_build_keyword("Symmetry label");
 
51
  psio_write_entry(PSIF_CHKPT, "::Symmetry label", (char *) sym_label, 
 
52
                   4*sizeof(char));
 
53
  free(key);
 
54
}
 
55