~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/camera/cam_g3_rd.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2   */
  3 
  4 #include <stdio.h>
  5 #include <tina/sys.h>
  6 #include <tina/sysfuncs.h>
  7 #include <tina/file.h>
  8 #include <tina/math.h>
  9 #include <tina/mathfuncs.h>
 10 #include <tina/vision.h>
 11 #include <tina/visionfuncs.h>
 12 
 13 extern Bool fclose_2(FILE * stream, const char *pathname);
 14 extern FILE *fopen_2(const char *pathname, const char *mode);
 15 
 16 List   *cal_geom3_list_read(char *pathname)
 17 {
 18     FILE   *stream = fopen_2(pathname, "r");
 19     List   *world_3d = NULL;
 20 
 21     if (stream)
 22     {
 23         Match  *match_to_3d;
 24         Vec3   *point;
 25         char    ch[1024];
 26         int     i = 0;
 27 
 28         while (freadline(stream, ch) != EOF)
 29         {
 30             match_to_3d = match_alloc(0);
 31             match_to_3d->to1 = point = vec3_alloc();
 32             match_to_3d->label = i++;
 33             (void) sscanf(ch, "  %f %f %f", &point->el[0], &point->el[1], &point->el[2]);
 34             world_3d = list_append(world_3d, link_alloc((void *) match_to_3d, 0));
 35         }
 36         (void) fclose_2(stream, pathname);
 37     } else
 38     {
 39         errorf(warning, "unable to find 3D data\n");
 40     }
 41     return (world_3d);
 42 }
 43 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.