ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/playbook/sorter
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

# Content
1 BEGIN {
2 a=11;
3 b=12;
4 halv=int(lengde/2);
5 hopp=lengde-(2*halv);
6 lim=halv+hopp;
7 }
8 {
9 str = toupper(substr($0, 1, 1)) substr($0, 2);
10 if (NR>lim) { num=b; b+=2;}
11 else { num=a; a+=2;}
12
13 if (NR>halv) hale="\\\\\n";
14 else hale="& \n";
15
16 if (hopp && NR==lim)
17 {
18 hale="";
19 for (i=0; i<NF ; i++) hale=hale "& ";
20 hale=hale "\\\\\n";
21 }
22
23 printf("%d &%s %s", num, str, hale);
24 }