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

Linux Cross Reference
Tina4/src/file/geom/ffg_new_wrt.c

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

  1 /**@(#)
  2  */
  3 #include <stdio.h>
  4 #include <tina/sys.h>
  5 #include <tina/sysfuncs.h>
  6 #include <tina/math.h>
  7 #include <tina/vision.h>
  8 #include <tina/visionfuncs.h>
  9 
 10 extern Bool fclose_2(FILE * stream, const char *pathname);
 11 
 12 void    ffg_new_write_file_stream(List * cliche_list, FILE * stream,
 13                                           const char *pathname)
 14 {
 15     int     count;
 16     List   *cptr;
 17     List   *ptr;
 18 
 19     for (count = 0, cptr = cliche_list; cptr != NULL; cptr = cptr->next)
 20         count++;
 21 
 22     (void) fprintf(stream, "%d\n", count);
 23 
 24     for (cptr = cliche_list; cptr != NULL; cptr = cptr->next)
 25     {
 26         Match_cliche *m = (Match_cliche *) cptr->to;
 27 
 28         for (count = 0, ptr = m->focus; ptr != NULL; ptr = ptr->next)
 29             count++;
 30         (void) fprintf(stream, "%d %d", count, m->fthres);
 31         for (ptr = m->focus; ptr != NULL; ptr = ptr->next)
 32             (void) fprintf(stream, " %d", geom_label_get(ptr->to, ptr->type));
 33 
 34 
 35         for (count = 0, ptr = m->group; ptr != NULL; ptr = ptr->next)
 36             count++;
 37         (void) fprintf(stream, " %d %d", count, m->gthres);
 38         for (ptr = m->group; ptr != NULL; ptr = ptr->next)
 39             (void) fprintf(stream, " %d", geom_label_get(ptr->to, ptr->type));
 40         (void) fprintf(stream, "\n");
 41     }
 42 }
 43 
 44 /* Match_cliche list */
 45 void    ffg_new_write_file(char *pathname, List * cliche_list)
 46 {
 47     FILE   *stream = fopen(pathname, "w");
 48 
 49     if (stream)
 50     {
 51         ffg_new_write_file_stream(cliche_list, stream, pathname);
 52         (void) fclose_2(stream, pathname);
 53     }
 54 }
 55 

~ [ 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.