lib/servcl.c

Go to the documentation of this file.
00001 /* "Web Server" for command line execution. 
00002  *
00003  * This file is copyright 2002 Jim Kent, but license is hereby
00004  * granted for all use - public, private or commercial. */
00005 
00006 #include "common.h"
00007 #include "portable.h"
00008 #include "portimpl.h"
00009 #include "obscure.h"
00010 
00011 static char const rcsid[] = "$Id: servcl.c,v 1.7 2006/06/19 22:02:57 hiram Exp $";
00012 
00013 static char *__trashDir = ".";
00014 
00015 static void _makeTempName(struct tempName *tn, char *base, char *suffix)
00016 /* Figure out a temp name, and how CGI and HTML will access it. */
00017 {
00018 char *tname = rTempName(__trashDir, base, suffix);
00019 strcpy(tn->forCgi, tname);
00020 strcpy(tn->forHtml, tn->forCgi);
00021 }
00022 
00023 static char *_cgiDir()
00024 {
00025 char *jkwebDir;
00026 if ((jkwebDir = getenv("JKWEB")) == NULL)
00027     return "";
00028 else
00029     return jkwebDir;
00030 }
00031 
00032 static char *_trashDir()
00033 {
00034 return __trashDir;
00035 }
00036 
00037 static double _speed()
00038 {
00039 return 1.0;
00040 }
00041     
00042     
00043 struct webServerSpecific wssCommandLine =
00044     {
00045     "commandLine",
00046     _makeTempName,
00047     _cgiDir,
00048     _speed,
00049     _trashDir,
00050     };

Generated on Tue Dec 25 18:39:31 2007 for blat by  doxygen 1.5.2