~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/binary2txt.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2013-11-20 22:41:36 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131120224136-tzx7leh606fqnckm
Tags: 0~20131119.git7162cf0-1
* [e65b919] Imported Upstream version 0~20131119.git7162cf0
* [f7bddd4] Fix some problems, introduced by upstream recently.
* [3616dfc] Use wrap-and-sort script.
* [7e92030] Ignore quilt dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "stdio.h"
23
23
#include "string.h"
24
24
 
25
 
// this should match setting in src/lmptype.h
 
25
// these must match settings in src/lmptype.h which builds LAMMPS with
 
26
//   -DLAMMPS_SMALLBIG (the default), -DLAMMPS_BIGBIG, or -DLAMMPS_SMALLSMALL
 
27
// you can edit the tools/Makefile to enforce the same setting
 
28
//   for the build of binary2txt, e.g.
 
29
//   g++ -g -DLAMMPS_BIGBIG binarytxt.o -o binary2txt
 
30
//   again -DLAMMPS_SMALLBIG is the default
26
31
 
27
32
#include "stdint.h"
28
33
#define __STDC_FORMAT_MACROS
29
34
#include "inttypes.h"
30
35
 
31
 
typedef int tagint;
32
 
typedef int64_t bigint;
33
 
#define BIGINT_FORMAT "%" PRId64
 
36
#ifndef PRId64
 
37
#define PRId64 "ld"
 
38
#endif
 
39
 
 
40
#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG)
 
41
#define LAMMPS_SMALLBIG
 
42
#endif
 
43
 
 
44
#if defined(LAMMPS_SMALLBIG)
 
45
typedef int tagint;
 
46
typedef int64_t bigint;
 
47
#define BIGINT_FORMAT "%" PRId64
 
48
#elif defined(LAMMPS_SMALLSMALL)
 
49
typedef int tagint;
 
50
typedef int bigint;
 
51
#define BIGINT_FORMAT "%d"
 
52
#else /* LAMMPS_BIGBIG */
 
53
typedef int64_t tagint;
 
54
typedef int64_t bigint;
 
55
#define BIGINT_FORMAT "%" PRId64
 
56
#endif
34
57
 
35
58
int main(int narg, char **arg)
36
59
{