/*** analog 1.9beta ***/
/* Please read Readme.html, or http://www.statslab.cam.ac.uk/~sret1/analog/ */
/*** formgen.c; generate a form for the analog form interface ***/
#include "analhea2.h"
void genopts(FILE *outf, char name[17], char plural[16], int sortby,
char codeletter)
{
fprintf(outf, "\n
%s options
\n\n", name);
fprintf(outf, "Sort the %s \n\n");
fprintf(outf, " (*) Include all %s with at least\n", plural);
fprintf(outf, " requests\n",
codeletter);
fprintf(outf, "or the top ");
fprintf(outf, " %s.\n",
codeletter, plural);
fprintf(outf, " (*) Include all %s with at least\n", plural);
fprintf(outf, " bytes\n",
codeletter);
fprintf(outf, "transferred or the top ");
fprintf(outf, " %s.\n",
codeletter, plural);
}
void formgen(void)
{
extern flag xq, mq, Wq, dq, Dq, hq, oq, Sq, iq, rq, Bq, bq, fq, eq, cq;
extern char reportorder[];
extern int domsortby, dirsortby, hostsortby, reqsortby, refsortby;
extern int browsortby, fullbrowsortby;
extern int dirlevel, reqtype, kq;
extern char hostname[], hosturl[], logourl[], commandname[];
extern char outfile[];
extern struct timestruct fromtime, totime;
char *ro;
FILE *outf;
if (STREQ(outfile, "stdout"))
outf = stdout;
else if ((outf = fopen(outfile, "w")) == NULL) {
fprintf(stderr, "%s: Error: failed to open output file %s for writing.\n",
commandname, outfile);
exit(ERR); /* shouldn't get here because also tested at the beginning */
}
fprintf(outf, "\n");
fprintf(outf, "Analog form interface\n");
fprintf(outf, "\n\n");
fprintf(outf, "\n");
if (hosturl[0] == '-')
fprintf(outf, "