diff options
author | allen <allen@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-10-04 05:33:14 +0000 |
---|---|---|
committer | allen <allen@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-10-04 05:33:14 +0000 |
commit | cb5462e263b2216229b16fcc53ed516eb966d3c2 (patch) | |
tree | 36bb3db4ac96cb8fced8767a5eab92c0542dd172 | |
parent | cb6d31122082362afcd6abaf1aa4cf0981ca16aa (diff) |
Display just the parameter filename instead of the whole path
Fixed a couple of small string bugs
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@92 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r-- | src/Content.c | 5 | ||||
-rw-r--r-- | src/Headers.c | 8 | ||||
-rw-r--r-- | src/Parameters.c | 8 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/Content.c b/src/Content.c index 4b16b41..4e7380b 100644 --- a/src/Content.c +++ b/src/Content.c @@ -296,6 +296,8 @@ static int MainPage(cGH *cctkGH, httpRequest *request, void *data) char message[10098]; char title[4098]; char menu[4098]; + char *dir; + char *file; struct httpLink *link; int seconds,minutes,hours,days,weeks; @@ -462,7 +464,8 @@ static int MainPage(cGH *cctkGH, httpRequest *request, void *data) HTTP_Write(request, message, strlen(message)); filelen = CCTK_ParameterFilename(4098,message); - HTTP_Write(request, message, filelen); + Util_SplitFilename(&dir,&file,message); + HTTP_Write(request, file, strlen(file)); strcpy(message,"</font>\n"); HTTP_Write(request, message, strlen(message)); diff --git a/src/Headers.c b/src/Headers.c index 23899df..d9646ed 100644 --- a/src/Headers.c +++ b/src/Headers.c @@ -99,6 +99,8 @@ int HTTP_ContentHeader(cGH *GH, int choice, int len, char *header, char *menu) char currenttime[50]; char quicklinks[524]; struct httpLink *link; + char *file; + char *dir; int titlelen,datelen,timelen,parlen; @@ -120,7 +122,9 @@ int HTTP_ContentHeader(cGH *GH, int choice, int len, char *header, char *menu) { /* Find strings needed for nonmain-page headers */ titlelen = CCTK_RunTitle(TITLE_ARRAY_SIZE,title); - parlen = CCTK_ParameterFilename(200,parfile); + parlen = CCTK_ParameterFilename(200,parfile); + Util_SplitFilename(&dir,&file,parfile); + datelen = Util_CurrentDate(50,currentdate); timelen = Util_CurrentTime(50,currenttime); @@ -149,7 +153,7 @@ int HTTP_ContentHeader(cGH *GH, int choice, int len, char *header, char *menu) "<dt>Iteration: %d\n" "<dt>Physical time: %4.2f\n" "</dl>\n" - ,header,title,parfile, + ,header,title,file, GH ? GH->cctk_iteration : 0 , GH ? GH->cctk_time : 0); if (ContentLinks) { diff --git a/src/Parameters.c b/src/Parameters.c index 9eaa592..7b76285 100644 --- a/src/Parameters.c +++ b/src/Parameters.c @@ -782,20 +782,16 @@ static int ParameterPage(cGH *cctkGH, httpRequest *request, void *data) /* Menu for this page */ first = 1; - printf("Set is %d\n",pData->n_set); - printf("Name is %s\n",pData->name); - printf("Thorn = %s\n",pData->thorn); while(CCTK_ParameterWalk(first, pData->thorn, NULL, &pDataWalk) == 0) { if (first==1) { - sprintf(menu,"%s<DT><B>%s:</B>\n",menu,pDataWalk->thorn); + sprintf(menu,"<DT><B>%s:</B>\n",pDataWalk->thorn); } first = 0; sprintf(menu, - "%s<DT> <A HREF=\"/Parameters/%s/%s\">%s</A>\n", + "%s <DT> <A HREF=\"/Parameters/%s/%s\">%s</A>\n", menu,pDataWalk->thorn,pDataWalk->name,pDataWalk->name); - printf("NEW: %s\n",menu); } HTTP_ContentHeader(cctkGH,0,4098,message,menu); |