ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/playbook/spellpath-extract
Revision: 1.1.1.1 (vendor branch)
Committed: Fri Feb 3 07:12:39 2006 UTC (18 years, 4 months ago) by root
Branch: UPSTREAM
CVS Tags: UPSTREAM_2006_03_15, LAST_C_VERSION, STABLE, UPSTREAM_2006_02_22, difficulty_fix_merge_060810_2300, UPSTREAM_2006_02_03
Branch point for: difficulty_fix
Changes since 1.1: +0 -0 lines
Log Message:
initial import

File Contents

# User Rev Content
1 root 1.1
2     BEGIN {
3     # Read the array data from living.c
4     while ((getline buff < living_c) == 1) {
5     if (buff ~ /spellpathnames\[/) {
6     get_values(buff);
7     fth = (tind-1)/4;
8     for(i=1;i<tind;i+=5)
9     printf("&%s &%s &%s &%s &%s & \\\\\n",array[i],
10     array[i+1],array[i+2],array[i+3],array[i+4]);
11     break;
12     }
13     }
14     close(living_c);
15     }
16    
17     function get_values (buff) {
18     tind = 1;
19     while (1) {
20     getline buff < living_c;
21     if (buff ~ /};/)
22     break;
23     gsub("[ \t]*\"", "", buff);
24     nr = split(buff, val, ",");
25     for (i = 1; i<=nr ; i++)
26     if(val[i]!="") array[tind++]=val[i];
27     }
28     }