~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/bin/cphf/zval_to_symbol.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:
 
1
/*** ZVAL_TO_SYMBOL() return atom symbol ***/ 
 
2
 
 
3
#include <stdio.h>
 
4
#include <stdlib.h>
 
5
#include <string.h>
 
6
 
 
7
void zval_to_symbol(double zval, char *sym) {
 
8
  int z;
 
9
  z = (int) zval;
 
10
 
 
11
  if (z==0) strcpy(sym,"G");
 
12
  else if (z==1) strcpy(sym,"H"); 
 
13
  else if (z==2) strcpy(sym,"HE"); 
 
14
  else if (z==3) strcpy(sym,"LI"); 
 
15
  else if (z==4) strcpy(sym,"BE"); 
 
16
  else if (z==5) strcpy(sym,"B"); 
 
17
  else if (z==6) strcpy(sym,"C"); 
 
18
  else if (z==7) strcpy(sym,"N"); 
 
19
  else if (z==8) strcpy(sym,"O"); 
 
20
  else if (z==9) strcpy(sym,"F"); 
 
21
  else if (z==10) strcpy(sym,"NE"); 
 
22
  else if (z==11) strcpy(sym,"NA"); 
 
23
  else if (z==12) strcpy(sym,"MG"); 
 
24
  else if (z==13) strcpy(sym,"AL"); 
 
25
  else if (z==14) strcpy(sym,"SI"); 
 
26
  else if (z==15) strcpy(sym,"P"); 
 
27
  else if (z==16) strcpy(sym,"S"); 
 
28
  else if (z==17) strcpy(sym,"CL"); 
 
29
  else if (z==18) strcpy(sym,"AR"); 
 
30
  else if (z==19) strcpy(sym,"K"); 
 
31
  else if (z==20) strcpy(sym,"CA"); 
 
32
  else if (z==21) strcpy(sym,"SC"); 
 
33
  else if (z==22) strcpy(sym,"TI"); 
 
34
  else if (z==23) strcpy(sym,"V"); 
 
35
  else if (z==24) strcpy(sym,"CR"); 
 
36
  else if (z==25) strcpy(sym,"MN"); 
 
37
  else if (z==26) strcpy(sym,"FE"); 
 
38
  else if (z==27) strcpy(sym,"CO"); 
 
39
  else if (z==28) strcpy(sym,"NI"); 
 
40
  else if (z==29) strcpy(sym,"CU"); 
 
41
  else if (z==30) strcpy(sym,"ZN"); 
 
42
  else if (z==31) strcpy(sym,"GA"); 
 
43
  else if (z==32) strcpy(sym,"GE"); 
 
44
  else if (z==33) strcpy(sym,"AS"); 
 
45
  else if (z==34) strcpy(sym,"SE"); 
 
46
  else if (z==35) strcpy(sym,"BR"); 
 
47
  else if (z==36) strcpy(sym,"KR"); 
 
48
  else if (z==37) strcpy(sym,"RB"); 
 
49
  else if (z==38) strcpy(sym,"SR"); 
 
50
  else if (z==39) strcpy(sym,"Y"); 
 
51
  else if (z==40) strcpy(sym,"ZR"); 
 
52
  else if (z==41) strcpy(sym,"NB");
 
53
  else if (z==42) strcpy(sym,"MO");
 
54
  else if (z==43) strcpy(sym,"TC");
 
55
  else if (z==44) strcpy(sym,"RU");
 
56
  else if (z==45) strcpy(sym,"RH");
 
57
  else if (z==46) strcpy(sym,"PD");
 
58
  else if (z==47) strcpy(sym,"AG");
 
59
  else if (z==48) strcpy(sym,"CD");
 
60
  else if (z==49) strcpy(sym,"IN"); 
 
61
  else if (z==50) strcpy(sym,"SN");
 
62
  else if (z==51) strcpy(sym,"SB");
 
63
  else if (z==52) strcpy(sym,"TE");
 
64
  else if (z==53) strcpy(sym,"I");
 
65
  else if (z==54) strcpy(sym,"XE");
 
66
  else if (z==55) strcpy(sym,"CS");
 
67
  else if (z==56) strcpy(sym,"BA");
 
68
  else if (z==57) strcpy(sym,"LA");
 
69
  else if (z==58) strcpy(sym,"CE");
 
70
  else if (z==59) strcpy(sym,"PR");
 
71
  else if (z==60) strcpy(sym,"ND");
 
72
  else if (z==61) strcpy(sym,"PM");
 
73
  else if (z==62) strcpy(sym,"SM");
 
74
  else if (z==63) strcpy(sym,"EU");
 
75
  else if (z==64) strcpy(sym,"GD");
 
76
  else if (z==65) strcpy(sym,"TB");
 
77
  else if (z==66) strcpy(sym,"DY");
 
78
  else if (z==67) strcpy(sym,"HO");
 
79
  else if (z==68) strcpy(sym,"ER");
 
80
  else if (z==69) strcpy(sym,"TM");
 
81
  else if (z==70) strcpy(sym,"TY");
 
82
  else if (z==71) strcpy(sym,"LU");
 
83
  else if (z==72) strcpy(sym,"HF");
 
84
  else if (z==73) strcpy(sym,"TA");
 
85
  else if (z==74) strcpy(sym,"W");
 
86
  else if (z==75) strcpy(sym,"RE");
 
87
  else if (z==76) strcpy(sym,"OS");
 
88
  else if (z==77) strcpy(sym,"IR");
 
89
  else if (z==78) strcpy(sym,"PT");
 
90
  else if (z==79) strcpy(sym,"AU");
 
91
  else if (z==80) strcpy(sym,"HG");
 
92
  else if (z==81) strcpy(sym,"TL");
 
93
  else if (z==82) strcpy(sym,"PB");
 
94
  else if (z==83) strcpy(sym,"BI");
 
95
  else if (z==84) strcpy(sym,"PO");
 
96
  else if (z==85) strcpy(sym,"AT");
 
97
  else if (z==86) strcpy(sym,"RN");
 
98
  else if (z==87) strcpy(sym,"FR");
 
99
  else if (z==88) strcpy(sym,"RA");
 
100
  else if (z==89) strcpy(sym,"AC");
 
101
  else if (z==90) strcpy(sym,"TH");
 
102
  else if (z==91) strcpy(sym,"PA");
 
103
  else if (z==92) strcpy(sym,"U");
 
104
  else if (z==93) strcpy(sym,"NP");
 
105
  else if (z==94) strcpy(sym,"PU");
 
106
  else if (z==95) strcpy(sym,"AM");
 
107
  else if (z==96) strcpy(sym,"CM");
 
108
  else if (z==97) strcpy(sym,"BK");
 
109
  else if (z==98) strcpy(sym,"CF");
 
110
  else if (z==99) strcpy(sym,"ES");
 
111
  else if (z==100) strcpy(sym,"FM");
 
112
  else if (z==101) strcpy(sym,"MD");
 
113
  else if (z==102) strcpy(sym,"NO");
 
114
  else if (z==103) strcpy(sym,"UNQ");
 
115
  else if (z==104) strcpy(sym,"UNP");
 
116
  else if (z==105) strcpy(sym,"UNH");
 
117
  else if (z==106) strcpy(sym,"UNS");
 
118
  return ;
 
119
}