ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/playbook/statskmod-extract
Revision: 1.2
Committed: Thu Sep 7 21:43:16 2006 UTC (17 years, 8 months ago) by pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Moved documents to doc/historic

File Contents

# Content
1
2 BEGIN {
3 # Read the array data from living.c
4 while ((getline buff < living_c) == 1) {
5 if (buff ~ /stat_exp_mult\[/) {
6 get_values(buff);
7 haf = (tind-1)/2;
8 for(i=1;i<=haf;i++)
9 printf("%d & %s & %d & %s \\\\\n",i,array[i],i+haf,array[i+haf]);
10 break;
11 }
12 }
13 close(living_c);
14 }
15
16 function get_values (buff) {
17 tind = 0;
18 while (1) {
19 getline buff < living_c;
20 if (buff ~ /};/)
21 break;
22 gsub("[ \t]*\"", "", buff);
23 nr = split(buff, val, ",");
24 for (i = 1; i<=nr ; i++) {
25 if(val[i]!="") {
26 if(val[i] ~ "/") {
27 nmb = split(val[i], subval, "/");
28 if(subval[1] ~ " ")
29 array[tind++]=subval[1];
30 } else
31 array[tind++]=val[i];
32 }
33 }
34 }
35 }