Fixing copyright issues and code contributors
[alexxy/gromacs.git] / src / contrib / prfn.c
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5  * Copyright (c) 2001-2006, The GROMACS development team,
6  * check out http://www.gromacs.org for more information.
7  * Copyright (c) 2012,2013, by the GROMACS development team, led by
8  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9  * others, as listed in the AUTHORS file in the top-level source
10  * directory and at http://www.gromacs.org.
11  *
12  * GROMACS is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public License
14  * as published by the Free Software Foundation; either version 2.1
15  * of the License, or (at your option) any later version.
16  *
17  * GROMACS is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with GROMACS; if not, see
24  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
26  *
27  * If you want to redistribute modifications to GROMACS, please
28  * consider that scientific software is very special. Version
29  * control is crucial - bugs must be traceable. We will be happy to
30  * consider code for inclusion in the official distribution, but
31  * derived work must not be called official GROMACS. Details are found
32  * in the README & COPYING files - if they are missing, get the
33  * official version at http://www.gromacs.org.
34  *
35  * To help us fund GROMACS development, we humbly ask that you cite
36  * the research papers on the package. Check out http://www.gromacs.org.
37  */
38 #ifdef HAVE_CONFIG_H
39 #include <config.h>
40 #endif
41
42 #include "filenm.h"
43 #include "futil.h"
44 #include "wman.h"
45
46 void pr_texdefs(FILE *fp)
47 {
48   int i;
49
50   fprintf(fp,"\\begin{table}\n");
51   fprintf(fp,"\\begin{tabularx}{\\linewidth}{|r@{\\tt.}lccX|}\n");
52   fprintf(fp,"\\dline\n");
53   fprintf(fp,"\\mc{2}{|c}{%s} & %4s & %7s & %s \\\\[-0.1ex]\n",
54           "Default","","Default","");
55   fprintf(fp,"\\mc{1}{|c}{%s} & \\mc{1}{c}{%s} & %4s & %7s & %s "
56           "\\\\[-0.1ex]\n",
57           "Name","Ext.","Type","Option","Description");
58   fprintf(fp,"\\hline\n");
59   for(i=0; (i<efNR); i++)
60     if ( (i!=efGCT) && (i!=efHAT) )
61       pr_def(fp,i);
62   fprintf(fp,"\\dline\n");
63   fprintf(fp,"\\end{tabularx}\n");
64   fprintf(fp,"\\caption{The {\\gromacs} file types.}\n");
65   fprintf(fp,"\\label{tab:form}\n");
66   fprintf(fp,"\\end{table}\n");
67 }
68
69 void pr_htmldefs(FILE *fp)
70 {
71   int i;
72
73   fprintf(fp,"<title>GROMACS</title>\n");
74   fprintf(fp,"<h1>GROMACS Files</h1>\n");
75   fprintf(fp,"<b>GRO</b>ningen <b>MA</b>chine for <b>S</b>imulating <b>C</b>hemistry\n");
76   fprintf(fp,"<p>\n");
77   fprintf(fp,"The following %d filetypes are used by Gromacs:\n",efNR);
78   fprintf(fp,"<dl>\n");
79   for(i=0; (i<efNR); i++) {
80     fprintf(fp,"<dt><a href=\"%s.html\">%s.%s</a> (%s)<dd>%s\n",
81             ftp2ext(i),ftp2defnm(i),ftp2ext(i),ftp2ftype(i),
82             check_html(ftp2desc(i),NULL));
83   }
84   fprintf(fp,"</dl>\n");
85 }
86
87
88 int main()
89 {
90   FILE *out;
91   
92   out=ffopen("files.tex","w");
93   pr_texdefs(out);
94   ffclose(out);
95   
96   out=ffopen("files.html","w");
97   pr_htmldefs(out);
98   ffclose(out);
99
100   return 0;
101 }
102