Changeset 147 for anr/gantt.l
- Timestamp:
- Feb 14, 2010, 6:25:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anr/gantt.l
r145 r147 41 41 }; 42 42 struct partner_def { char *key, *name, *fnfull, *fnshort; } partner_table[] = { 43 { "UNKNOW" ,"relax" ,0 ,0 },43 { "UNKNOW" ,"relax" ,0 ,0 }, 44 44 { "irisa" ,"irisa" ,"table_inria_cairn_full.tex" ,"table_inria_cairn_short.tex" }, 45 { " inria_compsys" ,"inria_compsys" ,"table_inria_compsys_full.tex","table_inria_compsys_short.tex" },46 { "tima" ,"tima" ,"table_tima_full.tex" ,"table_tima_short.tex" },47 { "ubs" ,"ubs" ,"table_ubs_full.tex" ,"table_ubs_short.tex" },48 { "upmc" ,"upmc" ,"table_upmc_full.tex" ,"table_upmc_short.tex" },49 { "altera" ,"altera" ,"table_altera_full.tex" ,"table_altera_short.tex" },50 { "xilinx" ,"xilinx" ,"table_xilinx_full.tex" ,"table_xilinx_short.tex" },51 { "bull" ,"bull" ,"table_bull_full.tex" ,"table_bull_short.tex" },52 { "thales" ,"thales" ,"table_thales_full.tex" ,"table_thales_short.tex" },53 { "zied" ,"zied" ,"table_zied_full.tex" ,"table_zied_short.tex" },54 { "navtel" ,"navtel" ,"table_navtel_full.tex" ,"table_navtel_short.tex" },55 { 0 ,0 ,0 ,0 },45 { "lip" ,"lip" ,"table_inria_compsys_full.tex","table_inria_compsys_short.tex" }, 46 { "tima" ,"tima" ,"table_tima_full.tex" ,"table_tima_short.tex" }, 47 { "ubs" ,"ubs" ,"table_ubs_full.tex" ,"table_ubs_short.tex" }, 48 { "upmc" ,"upmc" ,"table_upmc_full.tex" ,"table_upmc_short.tex" }, 49 { "altera" ,"altera" ,"table_altera_full.tex" ,"table_altera_short.tex" }, 50 { "xilinx" ,"xilinx" ,"table_xilinx_full.tex" ,"table_xilinx_short.tex" }, 51 { "bull" ,"bull" ,"table_bull_full.tex" ,"table_bull_short.tex" }, 52 { "thales" ,"thales" ,"table_thales_full.tex" ,"table_thales_short.tex" }, 53 { "zied" ,"zied" ,"table_zied_full.tex" ,"table_zied_short.tex" }, 54 { "navtel" ,"navtel" ,"table_navtel_full.tex" ,"table_navtel_short.tex" }, 55 { 0 ,0 ,0 ,0 }, 56 56 }; 57 57 … … 383 383 Tlivrable* lu= p->vers[p->nbvers-1]; 384 384 int i; 385 fprintf(stderr,"--------------------\n");385 //fprintf(stderr,"--------------------\n"); 386 386 for (i=0 ; i<p->nbvers ; i++) { 387 387 Tlivrable* l= p->vers[i]; … … 764 764 } 765 765 766 void do_livrable_tables_open(int tablenum, int last) 767 { 768 char fn[1024]; 769 770 if (curr->os!=0) { 771 fprintf(curr->os,"\\end{tabular}\n"); 772 fclose(curr->os); 773 curr->os = 0; 774 } 775 776 if ( last ) 777 return; 778 779 sprintf(fn,"table_livrable_%02d.tex",tablenum); 780 if ( (curr->os=fopen(fn,"w"))==0 ) { 781 fprintf(stderr,"FATAL: can not open %s file for writing.\n",fn); 782 exit(1); 783 } 784 fprintf(curr->os,"\\begin{tabular}[t]{|l|c|c|c|p{\\desclen}|}\\hline\n"); 785 fprintf(curr->os,"number & resp. & T0+ & kd & description\\\\\\hline\\hline\n"); 786 } 787 788 void do_livrable_tables(int maxlines) 789 { 790 int nblines=maxlines; 791 int nbfile=1; 792 int tn,stn,dn,v; 793 do_livrable_tables_open(nbfile,0); nbfile +=1 ; 794 for (tn=0 ; tn<T_MAX ; tn++) { if ( curr->ls[tn][0][0][0]==0 ) break; 795 for (stn=0; stn<S_MAX; stn++) { if ( curr->ls[tn][stn][0][0]==0 ) break; 796 for (dn=0; dn<D_MAX; dn++) { 797 Tlivrable* top = curr->ls[tn][stn][dn][0]; 798 if ( top==0 ) break; 799 Tlivrable* last=top->vers[top->nbvers-1]; 800 if ( (nblines-top->nbvers) <= 0 ) { 801 do_livrable_tables_open(nbfile,0); nbfile +=1 ; 802 nblines = maxlines; 803 } 804 for (v=0; v<V_MAX; v++) { 805 Tlivrable* l = curr->ls[tn][stn][dn][v]; 806 if ( l==0 ) break; 807 if ( l->dn<0 ) continue; 808 char label[1000],resp[100],date[100],kind[100],desc[1000]; 809 gen_label_full(label,l); 810 sprintf(resp,"\\S%s",partner_table[l->partner].key); 811 sprintf(date,"%d",l->em); 812 sprintf(kind,"%s","x"); 813 if ( top->nbvers == 1 ) 814 sprintf(desc,"%s \\\\\\hline\n",last->title); 815 else if ( v==(top->nbvers-1) ) 816 sprintf(desc, 817 "\\multirow{-%d}{\\desclen}{%s}\\\\\\hline\n", 818 top->nbvers,last->title); 819 //else if ( v==(top->nbvers-1) ) 820 // sprintf(desc, "\\\\\\hline\n"); 821 else 822 sprintf(desc, "\\\\\\cline{1-4}\n"); 823 824 fprintf(curr->os,"%-15s", label); 825 fprintf(curr->os," & %-10s", resp); 826 fprintf(curr->os," & %-10s", date); 827 fprintf(curr->os," & %-8s", kind); 828 fprintf(curr->os," & %s", desc); 829 nblines -= 1; 830 } 831 }}} 832 do_livrable_tables_open(nbfile,1); 833 } 834 766 835 int main() 767 836 { … … 779 848 prepare2(curr); 780 849 prepare3(curr); 781 do_partner_table_full(1); do_partner_table_short(1); 782 do_partner_table_full(3); do_partner_table_short(3); 783 do_partner_table_full(4); do_partner_table_short(4); 784 do_partner_table_full(5); do_partner_table_short(5); 785 do_partner_table_full(7); do_partner_table_short(7); 786 do_partner_table_full(8); do_partner_table_short(8); 787 do_partner_table_full(9); do_partner_table_short(9); 850 do_partner_table_full(1); do_partner_table_short(1); 851 do_partner_table_full(2); do_partner_table_short(3); 852 do_partner_table_full(3); do_partner_table_short(3); 853 do_partner_table_full(4); do_partner_table_short(4); 854 do_partner_table_full(5); do_partner_table_short(5); 855 do_partner_table_full(7); do_partner_table_short(7); 856 do_partner_table_full(8); do_partner_table_short(8); 857 do_partner_table_full(9); do_partner_table_short(9); 788 858 do_partner_table_full(10); do_partner_table_short(10); 789 859 do_partner_table_full(11); do_partner_table_short(10); 790 860 861 curr = data_new(0,0); 862 prepare0(curr); 863 prepare1(curr); 864 prepare2(curr); 865 prepare3(curr); 866 do_livrable_tables(66); 791 867 return 0; 792 868 }
Note: See TracChangeset
for help on using the changeset viewer.