00001
00002
00003
00004
00005
00006 #include "common.h"
00007 #include "portable.h"
00008 #include "portimpl.h"
00009 #include "obscure.h"
00010
00011 static char const rcsid[] = "$Id: servCrunx.c,v 1.7 2006/06/19 22:02:56 hiram Exp $";
00012
00013 static char *__trashDir = "/home/httpd/html/trash";
00014
00015 static void _makeTempName(struct tempName *tn, char *base, char *suffix)
00016
00017 {
00018 char *tname;
00019 char *tempDirCgi = __trashDir;
00020 char *tempDirHtml = "/trash";
00021 int tlcLen = strlen(tempDirCgi);
00022 int tlhLen = strlen(tempDirHtml);
00023
00024 tname = rTempName(tempDirCgi, base, suffix);
00025 strcpy(tn->forCgi, tname);
00026 memcpy(tn->forHtml, tempDirHtml, tlhLen);
00027 strcpy(tn->forHtml+tlhLen, tn->forCgi+tlcLen);
00028 }
00029
00030 static char *_cgiDir()
00031 {
00032 return "../cgi-bin/";
00033 }
00034
00035 static char *_trashDir()
00036 {
00037 return __trashDir;
00038 }
00039
00040 static double _speed()
00041 {
00042 return 3.0;
00043 }
00044
00045 struct webServerSpecific wssLinux =
00046 {
00047 "linux",
00048 _makeTempName,
00049 _cgiDir,
00050 _speed,
00051 _trashDir,
00052 };