OSDN Git Service

some fix.
authorvisor <visor@users.sourceforge.jp>
Thu, 27 Oct 2011 15:32:25 +0000 (00:32 +0900)
committervisor <visor@users.sourceforge.jp>
Thu, 27 Oct 2011 15:32:25 +0000 (00:32 +0900)
bin/MKID.pl
bin/MKTABLE.pl
ext/ml-fetch.cc
ml/Makefile
ml/main.cc

index 1bdbde2..9416d9c 100755 (executable)
@@ -6,15 +6,15 @@ my $target = "ml-id.h";
 my $targetTmp = "$target-$$";
 my $FileList = $ARGV[0];
 
-#open (IN, "../Makefile.conf");
-open (IN, $FileList);
-while (<IN>) {
-    chomp;
-    if (/^MSRCS\s*\+?=\s*(.*\.cc)/) {
-       push (@SRCS, $1);
-    }
-}
-close (IN);
+#open (IN, $FileList);
+#while (<IN>) {
+#    chomp;
+#    if (/^MSRCS\s*\+?=\s*(.*\.cc)/) {
+#      push (@SRCS, $1);
+#    }
+#}
+#close (IN);
+@SRCS = split (/[ \t\n]+/, `make -f ../bin/Makefile.msrc msrcs`);
 
 foreach (@SRCS) {
     if (-f "../ext/$_") {
index 2f02f95..3ff0c9c 100755 (executable)
@@ -10,17 +10,17 @@ my @HDR;
 my @SRCS;
 my $target = "ftable.cc";
 my $targetTmp = "$target-$$";
-my $FileList = $ARGV[0];
-
-#open (IN, "../Makefile.conf");
-open (IN, $FileList);
-while (<IN>) {
-    chomp;
-    if (/^MSRCS\s*\+?=\s*(.*\.cc)/) {
-       push (@SRCS, $1);
-    }
-}
-close (IN);
+#my $FileList = $ARGV[0];
+
+#open (IN, $FileList);
+#while (<IN>) {
+#    chomp;
+#    if (/^MSRCS\s*\+?=\s*(.*\.cc)/) {
+#      push (@SRCS, $1);
+#    }
+#}
+#close (IN);
+@SRCS = split (/[ \t\n]+/, `make -f ../bin/Makefile.msrc msrcs`);
 
 foreach (@SRCS) {
     if (-f "../ext/$_") {
index 73a21d7..2c409db 100644 (file)
@@ -40,6 +40,7 @@ ustring  MLFetch::queryString (MNode* e) {
            if (c > 0)
                ans.append (uAmp);
            ans.append (urlencode (cv (to_string (a->car ())))).append (uEq).append (urlencode (cv (to_string (a->cdr ()))));
+           c ++;
        }
        nextNode (e);
     }
@@ -50,7 +51,7 @@ ustring  MLFetch::queryString (MNode* e) {
 
 /*DOC:
 ==$fetch==
- ($fetch URL [#post] [#sjis] [:id STRING] [:password STRING | :pw STRING] [:query '((NAME. VALUE) ...)] [:cookie '((NAME . VALUE) ...)] [:header '((NAME . VALUE) ...)] [SUBFUNCTION...])
+ ($fetch URL [#sjis] [:query '((NAME. VALUE) ...)] [SUBFUNCTION...])
 
 */
 //#MFUNC       $fetch  ml_fetch        cMLFetchID
@@ -72,10 +73,14 @@ MNode*  ml_fetch (MNode* cell, MlEnv* mlenv) {
     setParams (arg, 1, &params, kwlist, &keywords, &rest);
     url = eval_str (params[0], mlenv);
     if (keywords[0])           // query
-       query = eval (keywords[4], mlenv);
+       query = eval (keywords[0], mlenv);
     if (keywords[1])           // sjis
        obj.sjis = true;
 
+    if (query ()) {
+       // GETのみ
+       url.append (CharConst ("?")).append (obj.queryString (query ()));
+    }
     obj.parseURL (url);
 
     mlenv->setMStack (&obj);
index d8d7445..10caa08 100644 (file)
@@ -125,7 +125,8 @@ beforedepend: ml-id.h ftable.cc wikitable.cc
 
 #ftable.cc:
 ftable.cc: ${MSRCS} ../Makefile.src
-       ../bin/MKTABLE.pl ../Makefile.src
+       ../bin/MKTABLE.pl
+#      ../bin/MKTABLE.pl ../Makefile.src
 
 #wikitable.cc:
 wikitable.cc: wikicmd.cc wikiline.cc
@@ -133,6 +134,7 @@ wikitable.cc: wikicmd.cc wikiline.cc
 
 #ml-id.h:
 ml-id.h: ${MSRCS} ../Makefile.src
-       ../bin/MKID.pl ../Makefile.src
+       ../bin/MKID.pl
+#      ../bin/MKID.pl ../Makefile.src
 
 .include <bsd.prog.mk>
index 31b345f..b03bef6 100644 (file)
@@ -60,6 +60,7 @@ int  main (int argc, char** argv) {
 //     char*  em = getenv (kREQUEST_METHOD);
 //     char*  en = getenv (kSCRIPT_NAME);
        std::cerr << "============================================================\n";
+       std::cerr << mailDate ();
 #if 0
        if (em) {
            std::cerr << em << " ";