version 1.4, 2004/09/27 11:18:23 |
version 1.7, 2004/11/23 01:37:47 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/plugin/oxcgi.c,v 1.3 2004/09/27 01:20:46 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/plugin/oxcgi.c,v 1.6 2004/09/28 12:27:17 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
Line 35 struct object cgiUrlEncodingToKeyValuePair(char *s) { |
|
Line 35 struct object cgiUrlEncodingToKeyValuePair(char *s) { |
|
for (i=0; i<n; i++) { |
for (i=0; i<n; i++) { |
if (s[i] == '?') { start=i+1; break;} |
if (s[i] == '?') { start=i+1; break;} |
} |
} |
if (start == -1) start=0; |
if (start == -1) { |
|
start = 0; |
|
for (i=0; i<n; i++) { |
|
if (s[i] > ' ') { start = i; break; } |
|
} |
|
} |
for (k=0; k<2; k++) { |
for (k=0; k<2; k++) { |
/* k==0 path one. Count nOfPairs. */ |
/* k==0 path one. Count nOfPairs. */ |
/* k==1 path two. generate array. */ |
/* k==1 path two. generate array. */ |
Line 312 int cgiKeyValuePairToUrlEncodingFile2(struct object ob |
|
Line 317 int cgiKeyValuePairToUrlEncodingFile2(struct object ob |
|
eob = getoa(ob,i); |
eob = getoa(ob,i); |
eob0 = getoa(eob,0); eob1 = getoa(eob,1); |
eob0 = getoa(eob,0); eob1 = getoa(eob,1); |
key = KopString(eob0); |
key = KopString(eob0); |
if (i == 0) { |
if ((i == 0) && (strcmp(key,"URL")==0)) { |
if (strcmp(key,"URL") != 0) warningKan("Key word should be URL.\n"); |
|
if (eob1.tag != Sdollar) errorKan1("%s\n","URL value must be a string."); |
if (eob1.tag != Sdollar) errorKan1("%s\n","URL value must be a string."); |
fp2fputs(KopString(eob1),fp); |
fp2fputs(KopString(eob1),fp); |
if ( n > 1 ) fp2fputc('?',fp); |
if ( n > 1 ) fp2fputc('?',fp); |