Tagged files with gromacs 3.0 header and added some license info
[alexxy/gromacs.git] / src / contrib / prfn.c
1 /*
2  * $Id$
3  * 
4  *                This source code is part of
5  * 
6  *                 G   R   O   M   A   C   S
7  * 
8  *          GROningen MAchine for Chemical Simulations
9  * 
10  *                        VERSION 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Gromacs Runs On Most of All Computer Systems
35  */
36 static char *SRCID_prfn_c = "$Id$";
37 #include "filenm.h"
38 #include "futil.h"
39 #include "wman.h"
40
41 void pr_texdefs(FILE *fp)
42 {
43   int i;
44
45   fprintf(fp,"\\begin{table}\n");
46   fprintf(fp,"\\begin{tabularx}{\\linewidth}{|r@{\\tt.}lccX|}\n");
47   fprintf(fp,"\\dline\n");
48   fprintf(fp,"\\mc{2}{|c}{%s} & %4s & %7s & %s \\\\[-0.1ex]\n",
49           "Default","","Default","");
50   fprintf(fp,"\\mc{1}{|c}{%s} & \\mc{1}{c}{%s} & %4s & %7s & %s "
51           "\\\\[-0.1ex]\n",
52           "Name","Ext.","Type","Option","Description");
53   fprintf(fp,"\\hline\n");
54   for(i=0; (i<efNR); i++)
55     if ( (i!=efGCT) && (i!=efHAT) )
56       pr_def(fp,i);
57   fprintf(fp,"\\dline\n");
58   fprintf(fp,"\\end{tabularx}\n");
59   fprintf(fp,"\\caption{The {\\gromacs} file types.}\n");
60   fprintf(fp,"\\label{tab:form}\n");
61   fprintf(fp,"\\end{table}\n");
62 }
63
64 void pr_htmldefs(FILE *fp)
65 {
66   int i;
67
68   fprintf(fp,"<title>GROMACS</title>\n");
69   fprintf(fp,"<h1>GROMACS Files</h1>\n");
70   fprintf(fp,"<b>GRO</b>ningen <b>MA</b>chine for <b>S</b>imulating <b>C</b>hemistry\n");
71   fprintf(fp,"<p>\n");
72   fprintf(fp,"The following %d filetypes are used by Gromacs:\n",efNR);
73   fprintf(fp,"<dl>\n");
74   for(i=0; (i<efNR); i++) {
75     fprintf(fp,"<dt><a href=\"%s.html\">%s.%s</a> (%s)<dd>%s\n",
76             ftp2ext(i),ftp2defnm(i),ftp2ext(i),ftp2ftype(i),
77             check_html(ftp2desc(i),NULL));
78   }
79   fprintf(fp,"</dl>\n");
80 }
81
82
83 void main()
84 {
85   FILE *out;
86   
87   out=ffopen("files.tex","w");
88   pr_texdefs(out);
89   fclose(out);
90   
91   out=ffopen("files.html","w");
92   pr_htmldefs(out);
93   fclose(out);
94 }
95