]> git.mxchange.org Git - flightgear.git/blob - SplitTris/splittris.c
c40000794b66c8f01d34ede279aef92b981a066c
[flightgear.git] / SplitTris / splittris.c
1 /* splittris.c -- read in a .ele/.node file pair generated by the
2  *                triangle program and output a simple Wavefront .obj
3  *                file for the north, south, east, and west edge
4  *                verticies ... including the normals.
5  *
6  * Written by Curtis Olson, started January 1998.
7  *
8  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  * $Id$
25  * (Log is kept at end of this file) */
26
27
28 #include <math.h>
29 #include <stdio.h>
30 #include <stdlib.h>   /* for atoi() */
31 #include <string.h>
32 #include <sys/stat.h> /* for stat() */
33 #include <unistd.h>   /* for stat() */
34
35 #include "splittris.h"
36
37 #include <Include/fg_constants.h>
38 #include <Include/fg_types.h>
39 #include <Bucket/bucketutils.h>
40
41 #include <Math/fg_geodesy.h>
42 #include <Math/mat3.h>
43 #include <Math/polar3d.h>
44
45 int nodecount, tricount;
46 double xmin, xmax, ymin, ymax;
47
48 static double nodes_orig[MAX_NODES][3];
49 static int tris[MAX_TRIS][3];
50 /* static int new_tris[MAX_TRIS][3]; */
51
52 static fgCartesianPoint3d nodes_cart[MAX_NODES];
53
54 struct fgBUCKET ne_index, nw_index, sw_index, se_index;
55 struct fgBUCKET north_index, south_index, east_index, west_index;
56
57 /* convert a geodetic point lon(arcsec), lat(arcsec), elev(meter) to
58  * a cartesian point */
59 fgCartesianPoint3d geod_to_cart(double geod[3]) {
60     fgCartesianPoint3d cp;
61     fgPolarPoint3d pp;
62     double gc_lon, gc_lat, sl_radius;
63
64     /* printf("A geodetic point is (%.2f, %.2f, %.2f)\n", 
65            geod[0], geod[1], geod[2]); */
66
67     gc_lon = geod[0]*ARCSEC_TO_RAD;
68     fgGeodToGeoc(geod[1]*ARCSEC_TO_RAD, geod[2], &sl_radius, &gc_lat);
69
70     /* printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon, 
71            gc_lat, sl_radius+geod[2]); */
72
73     pp.lon = gc_lon;
74     pp.lat = gc_lat;
75     pp.radius = sl_radius+geod[2];
76     cp = fgPolarToCart3d(pp);
77     
78     /* printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z); */
79
80     return(cp);
81 }
82
83
84 /* given three points defining a triangle, calculate the normal */
85 void calc_normal(fgCartesianPoint3d p1, fgCartesianPoint3d p2, 
86                  fgCartesianPoint3d p3, double normal[3])
87 {
88     double v1[3], v2[3];
89     double temp;
90
91     v1[0] = p2.x - p1.x; v1[1] = p2.y - p1.y; v1[2] = p2.z - p1.z;
92     v2[0] = p3.x - p1.x; v2[1] = p3.y - p1.y; v2[2] = p3.z - p1.z;
93
94     MAT3cross_product(normal, v1, v2);
95     MAT3_NORMALIZE_VEC(normal,temp);
96
97 /*  printf("  Normal = %.2f %.2f %.2f\n", normal[0], normal[1], normal[2]); */
98 }
99
100
101 /* return the file base name ( foo/bar/file.ext = file.ext ) */
102 void extract_file(char *in, char *base) {
103     int len, i;
104
105     len = strlen(in);
106
107     i = len - 1;
108     while ( (i >= 0) && (in[i] != '/') ) {
109         i--;
110     }
111
112     in += (i + 1);
113     strcpy(base, in);
114 }
115
116
117 /* return the file path name ( foo/bar/file.ext = foo/bar ) */
118 void extract_path(char *in, char *base) {
119     int len, i;
120
121     len = strlen(in);
122     strcpy(base, in);
123
124     i = len - 1;
125     while ( (i >= 0) && (in[i] != '/') ) {
126         i--;
127     }
128
129     base[i] = '\0';
130 }
131
132
133 /* return the index of all triangles containing the specified node */
134 void find_tris(int n, int *t1, int *t2, int *t3, int *t4, int *t5) {
135     int i;
136
137     *t1 = *t2 = *t3 = *t4 = *t5 = 0;
138
139     i = 1;
140     while ( i <= tricount ) {
141         if ( (n == tris[i][0]) || (n == tris[i][1]) || (n == tris[i][2]) ) {
142             if ( *t1 == 0 ) {
143                 *t1 = i;
144             } else if ( *t2 == 0 ) {
145                 *t2 = i;
146             } else if ( *t3 == 0 ) {
147                 *t3 = i;
148             } else if ( *t4 == 0 ) {
149                 *t4 = i;
150             } else {
151                 *t5 = i;
152             }
153         }
154         i++;
155     }
156 }
157
158
159 /* Initialize a new mesh structure */
160 void triload(char *basename) {
161     char nodename[256], elename[256];
162     FILE *node, *ele;
163     int dim, junk1, junk2;
164     int i;
165
166     strcpy(nodename, basename);
167     strcat(nodename, ".node");
168     strcpy(elename, basename);
169     strcat(elename, ".ele");
170
171     printf("Loading node file:  %s ...\n", nodename);
172     if ( (node = fopen(nodename, "r")) == NULL ) {
173         printf("Cannot open file '%s'\n", nodename);
174         exit(-1);
175     }
176
177     fscanf(node, "%d %d %d %d", &nodecount, &dim, &junk1, &junk2);
178
179     if ( nodecount > MAX_NODES - 1 ) {
180         printf("Error, too many nodes, need to increase array size\n");
181         exit(-1);
182     } else {
183         printf("    Expecting %d nodes\n", nodecount);
184     }
185
186     for ( i = 1; i <= nodecount; i++ ) {
187         fscanf(node, "%d %lf %lf %lf %d\n", &junk1, 
188                &nodes_orig[i][0], &nodes_orig[i][1], &nodes_orig[i][2], &junk2);
189         /* printf("%d %.2f %.2f %.2f\n", junk1, n[0], n[1], n[2]); */
190         nodes_cart[i] = geod_to_cart(nodes_orig[i]);
191         /* printf("%d %.2f %.2f %.2f\n", 
192                junk1, nodes_cart[i].x, nodes_cart[i].y, nodes_cart[i].z); */
193
194         if ( i == 1 ) {
195             xmin = xmax = nodes_orig[i][0];
196             ymin = ymax = nodes_orig[i][1];
197         } else {
198             if ( nodes_orig[i][0] < xmin ) {
199                 xmin = nodes_orig[i][0];
200             }
201             if ( nodes_orig[i][0] > xmax ) {
202                 xmax = nodes_orig[i][0];
203             }
204             if ( nodes_orig[i][1] < ymin ) {
205                 ymin = nodes_orig[i][1];
206             }
207             if ( nodes_orig[i][1] > ymax ) {
208                 ymax = nodes_orig[i][1];
209             }
210         }
211     }
212
213     fclose(node);
214
215     printf("Loading element file:  %s ...\n", elename);
216     if ( (ele = fopen(elename, "r")) == NULL ) {
217         printf("Cannot open file '%s'\n", elename);
218         exit(-1);
219     }
220
221     fscanf(ele, "%d %d %d", &tricount, &junk1, &junk2);
222
223     if ( tricount > MAX_TRIS - 1 ) {
224         printf("Error, too many elements, need to increase array size\n");
225         exit(-1);
226     } else {
227         printf("    Expecting %d elements\n", tricount);
228     }
229
230     for ( i = 1; i <= tricount; i++ ) {
231         fscanf(ele, "%d %d %d %d\n", &junk1, 
232                &tris[i][0], &tris[i][1], &tris[i][2]);
233         /* printf("%d %d %d %d\n", junk1, tris[i][0], tris[i][1], tris[i][2]);*/
234     }
235
236     fclose(ele);
237 }
238
239
240 /* check if a file exists */
241 int file_exists(char *file) {
242     struct stat stat_buf;
243     int result;
244
245     printf("checking %s ... ", file);
246
247     result = stat(file, &stat_buf);
248
249     if ( result != 0 ) {
250         /* stat failed, no file */
251         printf("not found.\n");
252         return(0);
253     } else {
254         /* stat succeeded, file exists */
255         printf("exists.\n");
256         return(1);
257     }
258 }
259
260
261 /* check to see if a shared object exists */
262 int shared_object_exists(char *basepath, char *ext) {
263     char file[256], scene_path[256];
264     long int index;
265
266     if ( strcmp(ext, ".sw") == 0 ) {
267         fgBucketGenBasePath(&west_index, scene_path);
268         index = fgBucketGenIndex(&west_index);
269         sprintf(file, "%s/%s/%ld.1.se", basepath, scene_path, index);
270         if ( file_exists(file) ) {
271             return(1);
272         }
273         fgBucketGenBasePath(&sw_index, scene_path);
274         index = fgBucketGenIndex(&sw_index);
275         sprintf(file, "%s/%s/%ld.1.ne", basepath, scene_path, index);
276         if ( file_exists(file) ) {
277             return(1);
278         }
279         fgBucketGenBasePath(&south_index, scene_path);
280         index = fgBucketGenIndex(&south_index);
281         sprintf(file, "%s/%s/%ld.1.nw", basepath, scene_path, index);
282         if ( file_exists(file) ) {
283             return(1);
284         }
285     }
286
287     if ( strcmp(ext, ".se") == 0 ) {
288         fgBucketGenBasePath(&east_index, scene_path);
289         index = fgBucketGenIndex(&east_index);
290         sprintf(file, "%s/%s/%ld.1.sw", basepath, scene_path, index);
291         if ( file_exists(file) ) {
292             return(1);
293         }
294         fgBucketGenBasePath(&se_index, scene_path);
295         index = fgBucketGenIndex(&se_index);
296         sprintf(file, "%s/%s/%ld.1.nw", basepath, scene_path, index);
297         if ( file_exists(file) ) {
298             return(1);
299         }
300         fgBucketGenBasePath(&south_index, scene_path);
301         index = fgBucketGenIndex(&south_index);
302         sprintf(file, "%s/%s/%ld.1.ne", basepath, scene_path, index);
303         if ( file_exists(file) ) {
304             return(1);
305         }
306     }
307
308     if ( strcmp(ext, ".ne") == 0 ) {
309         fgBucketGenBasePath(&east_index, scene_path);
310         index = fgBucketGenIndex(&east_index);
311         sprintf(file, "%s/%s/%ld.1.nw", basepath, scene_path, index);
312         if ( file_exists(file) ) {
313             return(1);
314         }
315         fgBucketGenBasePath(&ne_index, scene_path);
316         index = fgBucketGenIndex(&ne_index);
317         sprintf(file, "%s/%s/%ld.1.sw", basepath, scene_path, index);
318         if ( file_exists(file) ) {
319             return(1);
320         }
321         fgBucketGenBasePath(&north_index, scene_path);
322         index = fgBucketGenIndex(&north_index);
323         sprintf(file, "%s/%s/%ld.1.se", basepath, scene_path, index);
324         if ( file_exists(file) ) {
325             return(1);
326         }
327     }
328
329     if ( strcmp(ext, ".nw") == 0 ) {
330         fgBucketGenBasePath(&west_index, scene_path);
331         index = fgBucketGenIndex(&west_index);
332         sprintf(file, "%s/%s/%ld.1.ne", basepath, scene_path, index);
333         if ( file_exists(file) ) {
334             return(1);
335         }
336         fgBucketGenBasePath(&nw_index, scene_path);
337         index = fgBucketGenIndex(&nw_index);
338         sprintf(file, "%s/%s/%ld.1.se", basepath, scene_path, index);
339         if ( file_exists(file) ) {
340             return(1);
341         }
342         fgBucketGenBasePath(&north_index, scene_path);
343         index = fgBucketGenIndex(&north_index);
344         sprintf(file, "%s/%s/%ld.1.sw", basepath, scene_path, index);
345         if ( file_exists(file) ) {
346             return(1);
347         }
348     }
349
350     if ( strcmp(ext, ".south") == 0 ) {
351         fgBucketGenBasePath(&south_index, scene_path);
352         index = fgBucketGenIndex(&south_index);
353         sprintf(file, "%s/%s/%ld.1.north", basepath, scene_path, index);
354         if ( file_exists(file) ) {
355             return(1);
356         }
357     }
358
359     if ( strcmp(ext, ".north") == 0 ) {
360         fgBucketGenBasePath(&north_index, scene_path);
361         index = fgBucketGenIndex(&north_index);
362         sprintf(file, "%s/%s/%ld.1.south", basepath, scene_path, index);
363         if ( file_exists(file) ) {
364             return(1);
365         }
366     }
367
368     if ( strcmp(ext, ".west") == 0 ) {
369         fgBucketGenBasePath(&west_index, scene_path);
370         index = fgBucketGenIndex(&west_index);
371         sprintf(file, "%s/%s/%ld.1.east", basepath, scene_path, index);
372         if ( file_exists(file) ) {
373             return(1);
374         }
375     }
376
377     if ( strcmp(ext, ".east") == 0 ) {
378         fgBucketGenBasePath(&east_index, scene_path);
379         index = fgBucketGenIndex(&east_index);
380         sprintf(file, "%s/%s/%ld.1.west", basepath, scene_path, index);
381         if ( file_exists(file) ) {
382             return(1);
383         }
384     }
385
386     return(0);
387 }
388
389
390 /* my custom file opening routine ... don't open if a shared edge or
391  * vertex alread exists */
392 FILE *my_open(char *basename, char *basepath, char *ext) {
393     FILE *fp;
394     char filename[256];
395
396     /* create the output file name */
397     strcpy(filename, basename);
398     strcat(filename, ext);
399
400     /* check if a shared object already exist from a different tile */
401
402     if ( shared_object_exists(basepath, ext) ) {
403         /* not an actual file open error, but we've already got the
404          * shared edge, so we don't want to create another one */
405         printf("not opening\n");
406         return(NULL);
407     } else {
408         /* open the file */
409         fp = fopen(filename, "w");
410         printf("Opening %s\n", filename);
411         return(fp);
412     }
413 }
414
415
416 /* dump in WaveFront .obj format */
417 void dump_obj(char *basename, char *basepath) {
418     double n1[3], n2[3], n3[3], n4[3], n5[3], norm[3], temp;
419     FILE *fp, *sw, *se, *ne, *nw, *north, *south, *east, *west, *body;
420     int i, t1, t2, t3, t4, t5, count;
421
422     sw = my_open(basename, basepath, ".sw");
423     se = my_open(basename, basepath, ".se");
424     ne = my_open(basename, basepath, ".ne");
425     nw = my_open(basename, basepath, ".nw");
426
427     north = my_open(basename, basepath, ".north");
428     south = my_open(basename, basepath, ".south");
429     east = my_open(basename, basepath, ".east");
430     west = my_open(basename, basepath, ".west");
431
432     body = my_open(basename, basepath, ".body");
433
434     printf("Dumping edges file basename:  %s ...\n", basename);
435
436     /* dump vertices */
437     printf("  writing vertices\n");
438     for ( i = 1; i <= nodecount; i++ ) {
439
440         if ( (fabs(nodes_orig[i][1] - ymin) < FG_EPSILON) && 
441              (fabs(nodes_orig[i][0] - xmin) < FG_EPSILON) ) {
442             fp = sw;
443         } else if ( (fabs(nodes_orig[i][1] - ymin) < FG_EPSILON) &&
444                     (fabs(nodes_orig[i][0] - xmax) < FG_EPSILON) ) {
445             fp = se;
446         } else if ( (fabs(nodes_orig[i][1] - ymax) < FG_EPSILON) &&
447                     (fabs(nodes_orig[i][0] - xmax) < FG_EPSILON)) {
448             fp = ne;
449         } else if ( (fabs(nodes_orig[i][1] - ymax) < FG_EPSILON) &&
450                     (fabs(nodes_orig[i][0] - xmin) < FG_EPSILON) ) {
451             fp = nw;
452         } else if ( fabs(nodes_orig[i][0] - xmin) < FG_EPSILON ) {
453             fp = west;
454         } else if ( fabs(nodes_orig[i][0] - xmax) < FG_EPSILON ) {
455             fp = east;
456         } else if ( fabs(nodes_orig[i][1] - ymin) < FG_EPSILON ) {
457             fp = south;
458         } else if ( fabs(nodes_orig[i][1] - ymax) < FG_EPSILON ) {
459             fp = north;
460         } else {
461             fp = body;
462         }
463
464         if ( fp != NULL ) {
465             fprintf(fp, "gdn %.2f %.2f %.2f\n", 
466                     nodes_orig[i][0], nodes_orig[i][1], nodes_orig[i][2]);
467         }
468     }
469
470     printf("  calculating and writing normals\n");
471     /* calculate and generate normals */
472     for ( i = 1; i <= nodecount; i++ ) {
473 /*      printf("Finding normal\n"); */
474
475         find_tris(i, &t1, &t2, &t3, &t4, &t5);
476
477         n1[0] = n1[1] = n1[2] = 0.0;
478         n2[0] = n2[1] = n2[2] = 0.0;
479         n3[0] = n3[1] = n3[2] = 0.0;
480         n4[0] = n4[1] = n4[2] = 0.0;
481         n5[0] = n5[1] = n5[2] = 0.0;
482
483         count = 1;
484         calc_normal(nodes_cart[tris[t1][0]], nodes_cart[tris[t1][1]], 
485                     nodes_cart[tris[t1][2]], n1);
486
487         if ( t2 > 0 ) {
488             calc_normal(nodes_cart[tris[t2][0]], nodes_cart[tris[t2][1]], 
489                         nodes_cart[tris[t2][2]], n2);
490             count = 2;
491         }
492
493         if ( t3 > 0 ) {
494             calc_normal(nodes_cart[tris[t3][0]], nodes_cart[tris[t3][1]],
495                         nodes_cart[tris[t3][2]], n3);
496             count = 3;
497         }
498
499         if ( t4 > 0 ) {
500             calc_normal(nodes_cart[tris[t4][0]], nodes_cart[tris[t4][1]],
501                         nodes_cart[tris[t4][2]], n4);
502             count = 4;
503         }
504
505         if ( t5 > 0 ) {
506             calc_normal(nodes_cart[tris[t5][0]], nodes_cart[tris[t5][1]],
507                         nodes_cart[tris[t5][2]], n5);
508             count = 5;
509         }
510
511 /*      printf("  norm[2] = %.2f %.2f %.2f\n", n1[2], n2[2], n3[2]); */
512
513         norm[0] = ( n1[0] + n2[0] + n3[0] + n4[0] + n5[0] ) / (double)count;
514         norm[1] = ( n1[1] + n2[1] + n3[1] + n4[1] + n5[1] ) / (double)count;
515         norm[2] = ( n1[2] + n2[2] + n3[2] + n4[2] + n5[2] ) / (double)count;
516         
517 /*      printf("  count = %d\n", count); */
518 /*      printf("  Ave. normal = %.4f %.4f %.4f\n", norm[0], norm[1], norm[2]);*/
519         MAT3_NORMALIZE_VEC(norm, temp);
520 /*      printf("  Normalized ave. normal = %.4f %.4f %.4f\n",  */
521 /*             norm[0], norm[1], norm[2]); */
522         
523         fp = NULL;
524
525         if ( (fabs(nodes_orig[i][1] - ymin) < FG_EPSILON) && 
526              (fabs(nodes_orig[i][0] - xmin) < FG_EPSILON) ) {
527             fp = sw;
528         } else if ( (fabs(nodes_orig[i][1] - ymin) < FG_EPSILON) &&
529                     (fabs(nodes_orig[i][0] - xmax) < FG_EPSILON) ) {
530             fp = se;
531         } else if ( (fabs(nodes_orig[i][1] - ymax) < FG_EPSILON) &&
532                     (fabs(nodes_orig[i][0] - xmax) < FG_EPSILON)) {
533             fp = ne;
534         } else if ( (fabs(nodes_orig[i][1] - ymax) < FG_EPSILON) &&
535                     (fabs(nodes_orig[i][0] - xmin) < FG_EPSILON) ) {
536             fp = nw;
537         } else if ( fabs(nodes_orig[i][0] - xmin) < FG_EPSILON ) {
538             fp = west;
539         } else if ( fabs(nodes_orig[i][0] - xmax) < FG_EPSILON ) {
540             fp = east;
541         } else if ( fabs(nodes_orig[i][1] - ymin) < FG_EPSILON ) {
542             fp = south;
543         } else if ( fabs(nodes_orig[i][1] - ymax) < FG_EPSILON ) {
544             fp = north;
545         }
546         if ( fp != NULL ) {
547             fprintf(fp, "vn %.4f %.4f %.4f\n", norm[0], norm[1], norm[2]);
548         }
549     }
550
551     if ( sw ) { fclose(sw); }
552     if ( se ) { fclose(se); }
553     if ( ne ) { fclose(ne); }
554     if ( nw ) { fclose(nw); }
555
556     if ( north ) { fclose(north); }
557     if ( south ) { fclose(south); }
558     if ( east ) { fclose(east); }
559     if ( west ) { fclose(west); }
560
561     if ( body ) { fclose(body); }
562 }
563
564
565 int main(int argc, char **argv) {
566     char basename[256], basepath[256], temp[256];
567     struct fgBUCKET p;
568     long int index;
569     int len;
570
571     strcpy(basename, argv[1]);
572
573     /* find the base path of the file */
574     extract_path(basename, basepath);
575     extract_path(basepath, basepath);
576     extract_path(basepath, basepath);
577     printf("%s\n", basepath);
578
579     /* find the index of the current file */
580     extract_file(basename, temp);
581     len = strlen(temp);
582     if ( len >= 2 ) {
583         temp[len-2] = '\0';
584     }
585     index = atoi(temp);
586     printf("%ld\n", index);
587     fgBucketParseIndex(index, &p);
588
589     printf("bucket = %d %d %d %d\n", p.lon, p.lat, p.x, p.y);
590     /* generate the indexes of the neighbors */
591     fgBucketOffset(&p, &ne_index,  1,  1);
592     fgBucketOffset(&p, &nw_index, -1,  1);
593     fgBucketOffset(&p, &se_index,  1, -1);
594     fgBucketOffset(&p, &sw_index, -1, -1);
595
596     fgBucketOffset(&p, &north_index,  0,  1);
597     fgBucketOffset(&p, &south_index,  0, -1);
598     fgBucketOffset(&p, &east_index,  1,  0);
599     fgBucketOffset(&p, &west_index, -1,  0);
600
601     /*
602     printf("Corner indexes = %ld %ld %ld %ld\n", 
603            ne_index, nw_index, sw_index, se_index);
604     printf("Edge indexes = %ld %ld %ld %ld\n",
605            north_index, south_index, east_index, west_index);
606            */
607
608     /* load the input data files */
609     triload(basename);
610
611     /* dump in WaveFront .obj format */
612     dump_obj(basename, basepath);
613
614     return(0);
615 }
616
617
618 /* $Log$
619 /* Revision 1.10  1998/05/02 01:54:37  curt
620 /* Converting to polar3d.h routines.
621 /*
622  * Revision 1.9  1998/04/18 04:01:20  curt
623  * Now use libMath rather than having local copies of math routines.
624  *
625  * Revision 1.8  1998/04/14 02:26:08  curt
626  * Code reorganizations.  Added a Lib/ directory for more general libraries.
627  *
628  * Revision 1.7  1998/04/08 23:21:13  curt
629  * Adopted Gnu automake/autoconf system.
630  *
631  * Revision 1.6  1998/03/03 15:36:13  curt
632  * Tweaks for compiling with g++
633  *
634  * Revision 1.5  1998/03/03 03:37:04  curt
635  * Cumulative tweaks.
636  *
637  * Revision 1.4  1998/01/31 00:41:26  curt
638  * Made a few changes converting floats to doubles.
639  *
640  * Revision 1.3  1998/01/27 18:37:04  curt
641  * Lots of updates to get back in sync with changes made over in .../Src/
642  *
643  * Revision 1.2  1998/01/14 15:54:43  curt
644  * Initial revision completed.
645  *
646  * Revision 1.1  1998/01/14 02:11:31  curt
647  * Initial revision.
648  *
649  */