\File{main.c},{07:36},{May 15 1997}
\L{\LB{\C{}\/* }\Tab{8}{3d SOR solver}}
\L{\LB{}\Tab{8}{by Matthew Gray, \<mkgray@mit.edu\> *\/\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#include} \S{}\"main.h\"\SE{}}}
\L{\LB{\K{\#include} \S{}\"sor.h\"\SE{}}}
\L{\LB{\K{\#include} \S{}\"xgraphics.h\"\SE{}}}
\L{\LB{}}
\L{\LB{\K{\#include} \<unistd.h\>}}
\L{\LB{\K{\#include} \<stdio.h\>}}
\L{\LB{\K{\#include} \<math.h\>}}
\L{\LB{\K{\#include} \<string.h\>}}
\L{\LB{}}
\L{\LB{fpt     *Data;}}
\L{\LB{\K{char}    *realData;}}
\L{\LB{\K{int}     *Boundary;}}
\L{\LB{\K{int}}\Tab{8}{*Objects;}}
\L{\LB{\K{int} c, i, j, k,ct;}}
\L{\LB{\K{double} alpha;}}
\L{\LB{fpt ch;}}
\L{\LB{\K{int} viewslice;}}
\L{\LB{\K{char} useX=0;}}
\L{\LB{\K{char} dump=0;}}
\L{\LB{\K{int} nobj;}}
\L{\LB{}}
\L{\LB{\K{extern} NPTS;}}
\L{\LB{}}
\L{\LB{\K{void} clear\_data\_and\_boundaries();}}
\L{\LB{\K{void} read\_boundaries\_file();}}
\L{\LB{\K{void} set\_boundaries(\K{int} o1, \K{int} o2);}}
\L{\LB{fpt run\_simulation(\K{int} f, \K{int} s);}}
\L{\LB{\K{void} gaussj(\K{float} a[7][7], \K{int} n, \K{float} b[7][2], \K{int} m);}}
\L{\LB{}}
\L{\LB{\K{void}}}
\L{\LB{\Proc{main}main(\K{int} argc, \K{char} **argv)\{}}
\L{\LB{}\Tab{8}{\K{extern} \K{char} *optarg;}}
\L{\LB{}\Tab{8}{\K{extern} \K{int} optind;}}
\L{\LB{}\Tab{8}{\K{int} o1, o2, o3, o4;}}
\L{\LB{}\Tab{8}{fpt cap, thermalnoise, tmp;}}
\L{\LB{}\Tab{8}{fpt capmat[7][7];}}
\L{\LB{}\Tab{8}{fpt solveme[6][6], solvemeo[6][6];}}
\L{\LB{}\Tab{8}{fpt rhs[6][2];}}
\L{\LB{}\Tab{8}{\K{int} node, ct;}}
\L{\LB{}\Tab{8}{\K{int} FREQ = 250000;}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Process the command line options *\/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{NPTS = 50;}}
\L{\LB{}\Tab{8}{\K{while}((c = getopt(argc, argv, \S{}\"a:v:n:f:xd\"\SE{})) != EOF)}}
\L{\LB{}\Tab{8}{  \K{switch} (c) \{}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'a\'\SE{}:}}
\L{\LB{}\Tab{8}{    alpha = (\K{double}) strtod(optarg, NULL);}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'v\'\SE{}:}}
\L{\LB{}\Tab{8}{    viewslice = (\K{int}) atoi(optarg);}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'n\'\SE{}:}}
\L{\LB{}\Tab{8}{    NPTS = (\K{int}) atoi(optarg);}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'d\'\SE{}:}}
\L{\LB{}\Tab{8}{    dump = 1;}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'f\'\SE{}:}}
\L{\LB{}\Tab{8}{    FREQ = (\K{int}) atoi(optarg);}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \K{case} \S{}\'x\'\SE{}:}}
\L{\LB{}\Tab{8}{    useX =  1;}}
\L{\LB{}\Tab{8}{    \K{break};}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Alpha is \%f.\!n\"\SE{}, alpha);}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Allocate memory for field solver*\/\CE{}}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Allocating memory for a \%d cubic grid\!n\"\SE{}, NPTS);}}
\L{\LB{}\Tab{8}{Data = malloc(NPTS*NPTS*NPTS*\K{sizeof}(fpt));}}
\L{\LB{}\Tab{8}{realData = malloc(NPTS*NPTS*\K{sizeof}(\K{char}));}}
\L{\LB{}\Tab{8}{Boundary = malloc(NPTS*NPTS*NPTS*\K{sizeof}(\K{int}));}}
\L{\LB{}\Tab{8}{Objects = malloc(NPTS*NPTS*NPTS*\K{sizeof}(\K{int}));}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{if}(useX)}}
\L{\LB{}\Tab{16}{initialize\_graphics();}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Initialized graphics\!n\"\SE{});}}
\L{\LB{}\Tab{8}{clear\_data\_and\_boundaries();}\Tab{40}{}}
\L{\LB{}\Tab{8}{read\_boundaries\_file();}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* First, do the field solution for each pair of objects *\/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{for}(o1=1; o1 \<=nobj; o1++)\{}}
\L{\LB{}\Tab{16}{\K{for}(o2=(o1+1);o2\<=nobj;o2++) \{}}
\L{\LB{}\Tab{24}{\K{if}(o1 == o2)}}
\L{\LB{}\Tab{32}{\K{continue};}}
\L{\LB{}\Tab{24}{fprintf(stderr, \S{}\"Starting simulation between objects \%d and \%d.\!n\"\SE{}, o1, o2);}}
\L{\LB{}\Tab{24}{set\_boundaries(o1, o2);}}
\L{\LB{}\Tab{24}{cap = run\_simulation(o1, o2);}}
\L{\LB{}\Tab{24}{capmat[o1][o2]=cap;}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Ok, now we do the circuit half of the problem *\/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* First, clear the matrix *\/\CE{}}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<7;o1++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<7;o2++)\{}}
\L{\LB{}\Tab{8}{    solvemeo[o1][o2] = 0.0;}}
\L{\LB{}\Tab{8}{    rhs[o1][1] = 0.0;}}
\L{\LB{}\Tab{8}{    \K{if}(o1\>=o2)\{}}
\L{\LB{}\Tab{8}{      fprintf(stdout, \S{}\"\-\-\-\-\-\- \"\SE{});}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{    \K{else}\{}}
\L{\LB{}\Tab{8}{      fprintf(stdout, \S{}\"\%6.4f \"\SE{}, capmat[o1][o2]*1000000000);}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{  fprintf(stdout, \S{}\"\!n\"\SE{});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Now, set the total current to each node to 0 *\/\CE{}}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<6;o2++)\{}}
\L{\LB{}\Tab{8}{    \K{if}(o1\>o2)\{}}
\L{\LB{}\Tab{8}{      solvemeo[o1][o2] = FREQ*capmat[o2][o1];}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{    \K{else} \K{if} (o2\>o1)\{}}
\L{\LB{}\Tab{8}{      solvemeo[o1][o2] = FREQ*capmat[o1][o2];}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{8}{  solvemeo[o1][o1] =  0;}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<7;o2++)\{}}
\L{\LB{}\Tab{8}{    \K{if}(o1 != o2)\{}}
\L{\LB{}\Tab{8}{      \K{if}(o1\>o2)\{}}
\L{\LB{}\Tab{16}{solvemeo[o1][o1] \-= FREQ*capmat[o2][o1];}}
\L{\LB{}\Tab{8}{      \}}}
\L{\LB{}\Tab{8}{      \K{else}\{}}
\L{\LB{}\Tab{16}{solvemeo[o1][o1] \-= FREQ*capmat[o1][o2];}}
\L{\LB{}\Tab{8}{      \}}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<6;o2++)\{}}
\L{\LB{}\Tab{8}{    solveme[o1][o2] = solvemeo[o1][o2];}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Add the transmitter current *\/\CE{}}}
\L{\LB{}\Tab{8}{rhs[4][1] = .00100;}}
\L{\LB{}\Tab{8}{rhs[3][1] = \-.00100;}}
\L{\LB{}}
\L{\LB{}\Tab{8}{gaussj(solveme, 5, rhs, 1);}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\!n\"\SE{});}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<6;o2++)\{}}
\L{\LB{}\Tab{8}{    fprintf(stdout, \S{}\"\%4.4f \"\SE{}, solveme[o1][o2]);}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{  fprintf(stdout, \S{}\"    \%4.10f\!n\"\SE{}, rhs[o1][1]);}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{fprintf(stdout, \S{}\"Receiver voltage per transmission volt: \%f\!n\"\SE{},}}
\L{\LB{}\Tab{16}{rhs[5][1]\/(rhs[3][1]\-rhs[4][1]));}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Noise propagation*\/\CE{}}}
\L{\LB{}\Tab{8}{thermalnoise=0.0;}}
\L{\LB{}\Tab{8}{\K{for}(o3=1;o3\<6;o3++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o4=1;o4\<6;o4++)\{}}
\L{\LB{}\Tab{8}{    \K{if}(o4\>o3)\{}}
\L{\LB{}\Tab{8}{      \K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{16}{rhs[o1][1] = 0.0;}}
\L{\LB{}\Tab{16}{\K{for}(o2=1;o2\<6;o2++)\{}}
\L{\LB{}\Tab{16}{  solveme[o1][o2] = solvemeo[o1][o2];}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{8}{      \}}}
\L{\LB{}\Tab{8}{      rhs[o4][1] = .01;}}
\L{\LB{}\Tab{8}{      rhs[o3][1] = \-.01;}}
\L{\LB{}\Tab{8}{      gaussj(solveme, 5, rhs, 1);}}
\L{\LB{}\Tab{8}{      tmp = ((4.14e\-21)\/capmat[o3][o4])*rhs[5][1]\/(rhs[o3][1]\-rhs[o4][1]);}}
\L{\LB{}\Tab{8}{      thermalnoise += (tmp*tmp);}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{fprintf(stdout, \S{}\"Thermal noise in V\^2: \%.12f x 10\^\-9\!n\"\SE{}, thermalnoise*1000000000);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{for}(o1=1;o1\<6;o1++)\{}}
\L{\LB{}\Tab{8}{  \K{for}(o2=1;o2\<6;o2++)\{}}
\L{\LB{}\Tab{8}{    solveme[o1][o2] = solvemeo[o1][o2];}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\C{}\/* Add the transmitter current *\/\CE{}}}
\L{\LB{}\Tab{8}{rhs[5][1] = 1.0;}}
\L{\LB{}}
\L{\LB{}\Tab{8}{gaussj(solveme, 5, rhs, 1);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{fprintf(stdout, \S{}\"Impedance at amplifier is \%f\!n\"\SE{}, rhs[5][1]);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{exit(0);}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{fpt run\_simulation(\K{int} firstob, \K{int} secondob) \{}}
\L{\LB{}\Tab{8}{\K{int} ct;}}
\L{\LB{}\Tab{8}{fpt stab, cap;}}
\L{\LB{}\Tab{8}{\K{static} lastsim = 0;}}
\L{\LB{}}
\L{\LB{}\Tab{8}{stab = 1.0;}}
\L{\LB{}\Tab{8}{ct = 0;}}
\L{\LB{}\Tab{8}{\K{if}(firstob != lastsim)\{}}
\L{\LB{}\Tab{8}{  lastsim = firstob;}}
\L{\LB{}\Tab{8}{\K{while}((10000*stab\/(NPTS*NPTS*NPTS) \> 1) \|\| (ct \<=3))\{}}
\L{\LB{}\Tab{8}{  ct++;}}
\L{\LB{}\Tab{8}{  stab = relax(alpha, Data, Boundary);}}
\L{\LB{}\Tab{8}{  \K{if}(useX)\{}}
\L{\LB{}\Tab{8}{    i = viewslice;}}
\L{\LB{}\Tab{8}{    \K{for}(j = 0; j \< NPTS; j++)}}
\L{\LB{}\Tab{8}{      \K{for}(k=0;k\<NPTS;k++) \{}}
\L{\LB{}\Tab{16}{Dd(realData, j, k) = (\K{int}) F(Data, i, j, k);}}
\L{\LB{}\Tab{8}{      \}}}
\L{\LB{}\Tab{8}{    }}
\L{\LB{}\Tab{8}{    update\_image((\K{char} **) realData);}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{  fprintf(stderr, \S{}\".\"\SE{});}}
\L{\LB{}\Tab{8}{  \K{if}(ct\%25 == 0) \{}}
\L{\LB{}\Tab{8}{    fprintf(stderr, \S{}\"\%d (\%f)\!n\"\SE{}, ct, stab);}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"\!n\"\SE{});}}
\L{\LB{}\Tab{8}{\K{if}(dump)\{}}
\L{\LB{}\Tab{8}{  fprintf(stdout, \S{}\"Dump of potential map between \%d and \%d\!n\"\SE{},}}
\L{\LB{}\Tab{16}{  firstob, secondob);}}
\L{\LB{}\Tab{8}{  \K{for}(i = 0; i \< NPTS; i++) \{}}
\L{\LB{}\Tab{8}{    \K{for}(j=0;j\<NPTS;j++) \{}}
\L{\LB{}\Tab{8}{      \K{for}(k=0;k\<NPTS;k++)\{}}
\L{\LB{}\Tab{16}{fprintf(stdout, \S{}\"\%d \"\SE{}, (\K{int}) F(Data, i, j, k));}}
\L{\LB{}\Tab{8}{      \}}}
\L{\LB{}\Tab{8}{      fprintf(stdout, \S{}\"\!n\"\SE{});}}
\L{\LB{}\Tab{8}{    \}}}
\L{\LB{}\Tab{8}{    fprintf(stdout, \S{}\"\!n\"\SE{});}}
\L{\LB{}\Tab{8}{  \}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{ch = charge(Data, Objects, secondob);}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Charge of object 2 is \%f\!n\"\SE{}, ch);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{cap = fabs(8.854e\-12*(ch\/CHARGE\_UP));}}
\L{\LB{}\Tab{8}{ch = charge(Data, Objects, firstob);}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Charge of object 1 is \%f\!n\"\SE{}, ch);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{fprintf(stderr, \S{}\"Intraobject capacitance is \%f\!n\"\SE{}, cap);}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{return} cap;}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\K{void}}}
\L{\LB{\Proc{clear\_data\_and\_boundaries}clear\_data\_and\_boundaries() \{}}
\L{\LB{  \K{int} i,j,k;}}
\L{\LB{}\Tab{8}{}}
\L{\LB{  \K{for} (i = 0; i \< NPTS; ++i)}}
\L{\LB{    \K{for} (j = 0; j \< NPTS; ++j) \{}}
\L{\LB{      \K{for} (k = 0; k \< NPTS; ++k) \{}}
\L{\LB{}\Tab{8}{F(Data, i, j, k) = 0;}}
\L{\LB{}\Tab{8}{F(Boundary, i, j, k) = \-1;}}
\L{\LB{}\Tab{8}{F(Objects, i, j, k) = \-1;}}
\L{\LB{      \}}}
\L{\LB{    \}}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{void}}}
\L{\LB{\Proc{set\_boundaries}set\_boundaries(\K{int} obj1, \K{int} obj2)\{}}
\L{\LB{  \K{int} i,j,k;}}
\L{\LB{}\Tab{8}{}}
\L{\LB{  \K{for} (i = 0; i \< NPTS; ++i)}}
\L{\LB{    \K{for} (j = 0; j \< NPTS; ++j) \{}}
\L{\LB{      \K{for} (k = 0; k \< NPTS; ++k) \{}}
\L{\LB{}\Tab{8}{\K{if}(F(Objects, i, j, k) == obj1)}}
\L{\LB{}\Tab{16}{F(Boundary, i, j, k) = CHARGE\_UP;}\Tab{56}{}}
\L{\LB{}\Tab{8}{\K{else} \K{if}(F(Objects, i, j, k) \> 0)}}
\L{\LB{}\Tab{16}{F(Boundary, i, j, k) = 0;}}
\L{\LB{}\Tab{8}{\K{else} }}
\L{\LB{}\Tab{16}{F(Boundary, i, j, k) = \-1;}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{void}}}
\L{\LB{\Proc{read\_boundaries\_file}read\_boundaries\_file() \{}}
\L{\LB{\C{}\/*}}
\L{\LB{}\Tab{8}{Ok.  The boundaries file gives the locations of the equipotentials}}
\L{\LB{}\Tab{8}{for the body(s), the ground, the txmit body plate, the txmit ground}}
\L{\LB{}\Tab{8}{plate, the recv body plate, and the recv ground plate}}
\L{\LB{}\Tab{8}{The format of the file is as follows:}}
\L{\LB{}}
\L{\LB{}\Tab{8}{xcoord ycoord zcoord part}}
\L{\LB{}}
\L{\LB{}\Tab{8}{where, xcoord, ycoord, and zcoord are integer coordinates}}
\L{\LB{}\Tab{8}{and part is one of:}}
\L{\LB{}}
\L{\LB{}\Tab{8}{1}\Tab{16}{Body}}
\L{\LB{}\Tab{8}{2}\Tab{16}{Ground}}
\L{\LB{}\Tab{8}{3}\Tab{16}{txmit body}}
\L{\LB{}\Tab{8}{4}\Tab{16}{txmit ground}}
\L{\LB{}\Tab{8}{5}\Tab{16}{recv body}}
\L{\LB{}\Tab{8}{6}\Tab{16}{recv ground}}
\L{\LB{*\/\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{char} readme[100];}}
\L{\LB{}\Tab{8}{\K{char} *sp;}}
\L{\LB{}\Tab{8}{\K{char} *sp2;}}
\L{\LB{}\Tab{8}{\K{char} *sp3;}}
\L{\LB{}\Tab{8}{\K{char} *sp4;}}
\L{\LB{}\Tab{8}{\K{int} i, j, k;}}
\L{\LB{}\Tab{8}{\K{int} val, obj;}}
\L{\LB{}\Tab{8}{\K{int} tmpobj=0;}}
\L{\LB{}\Tab{8}{nobj = 0;}}
\L{\LB{}}
\L{\LB{   \K{while}(fgets(readme, 100, stdin))\{}}
\L{\LB{}\Tab{8}{sp = (\K{char} *) strchr(readme, (\K{int}) \S{}\' \'\SE{});}}
\L{\LB{}\Tab{8}{*sp = (\K{char}) \S{}\'\!0\'\SE{};}}
\L{\LB{}\Tab{8}{sp2= (\K{char} *) strchr((\K{char} *) sp+1, (\K{int}) \S{}\' \'\SE{});}}
\L{\LB{}\Tab{8}{*sp2 = \S{}\'\!0\'\SE{};}}
\L{\LB{}\Tab{8}{sp3= (\K{char} *) strchr((\K{char} *) sp2+1, (\K{int}) \S{}\' \'\SE{});}}
\L{\LB{}\Tab{8}{*sp3 = \S{}\'\!0\'\SE{};}}
\L{\LB{}\Tab{8}{i = atoi(readme);}}
\L{\LB{}\Tab{8}{j = atoi(sp+1);}}
\L{\LB{}\Tab{8}{k = atoi(sp2+1);}}
\L{\LB{}\Tab{8}{obj = atoi(sp3+1);}}
\L{\LB{}\Tab{8}{F(Objects, i, j, k) = obj;}}
\L{\LB{}\Tab{8}{nobj = (nobj \> obj) ? nobj:obj;}}
\L{\LB{   \}}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
