File:  [LON-CAPA] / capa / capa51 / pProj / capaNewHTML.c
Revision 1.3: download - view: text, annotated - select for diffs
Fri Jul 7 18:33:03 2000 UTC (23 years, 10 months ago) by albertel
Branches: MAIN
CVS tags: version5-1-2-first_release, HEAD
- updating GPL notices

    1: /* broken start to a new HTML wrapper
    2:    Copyright (C) 1992-2000 Michigan State University
    3: 
    4:    The CAPA system is free software; you can redistribute it and/or
    5:    modify it under the terms of the GNU Library General Public License as
    6:    published by the Free Software Foundation; either version 2 of the
    7:    License, or (at your option) any later version.
    8: 
    9:    The CAPA system is distributed in the hope that it will be useful,
   10:    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12:    Library General Public License for more details.
   13: 
   14:    You should have received a copy of the GNU Library General Public
   15:    License along with the CAPA system; see the file COPYING.  If not,
   16:    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   17:    Boston, MA 02111-1307, USA.
   18: 
   19:    As a special exception, you have permission to link this program
   20:    with the TtH/TtM library and distribute executables, as long as you
   21:    follow the requirements of the GNU GPL in regard to all of the
   22:    software in the executable aside from TtH/TtM.
   23: */
   24: 
   25: #include <signal.h>
   26: #include "capaParser.h"
   27: #include "capaCommon.h"
   28: #include "ranlib.h"
   29: 
   30: #include "capaCGI.h"
   31: 
   32: int main(int argc, char *argv[])
   33: {
   34:   int input_return=0;
   35: 
   36:   signal(SIGFPE, SIG_IGN);
   37:   strcpy(g_prog_name,argv[0]);
   38:   setbuf(stdout,NULL);
   39: 
   40:   fprintf(stdout,"Content-type: text/html%c%c",LF,LF);
   41: 
   42:   input_return = web_get_input();
   43:   web_header(stdout);
   44: 
   45: #ifdef  CAPA_WEB
   46:   fprintf(stdout,"<!-- new capasbin, CAPA Version %s, %s -->\n",CAPA_VER,
   47: 	  COMPILE_DATE);
   48: #else
   49:   fprintf(stdout,"<!-- new capahtml, CAPA Version %s, %s -->\n",CAPA_VER,
   50: 	  COMPILE_DATE);
   51: #endif  
   52: 
   53:   if ( input_return ) {
   54:   } else {
   55:     switch( g_run_mode ) {
   56:     case 0: break;
   57:     case WEB_CHECKIN: web_menu(); break;
   58:     case WEB_TRYSET: web_printset(); break;
   59:     case WEB_VIEWPREV: web_viewprevious(); break;
   60:     case WEB_VIEWSUMMARY: 
   61:     case WEB_EXAMSUMMARY:
   62:     case WEB_QUIZSUMMARY: web_summary(g_run_mode);break;
   63: #ifdef CAPA_WEB 
   64:     case WEB_CHECKANS: web_grade(); break;
   65: #endif
   66:     default: break;
   67:     }
   68:   }
   69:   web_footer(stdout);
   70:   return 0;
   71: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>