BSD = 1
#Linux = 1
-MSRCS += ml-tcpserver.cc
-MSRCS += ml-http.cc
MSRCS += diff.cc
-MSRCS += ml-config.cc
-MSRCS += ml-db.cc
-MSRCS += ml-debug.cc
-MSRCS += ml-diff.cc
MSRCS += ml-addon.cc
MSRCS += ml-apache.cc
MSRCS += ml-bool.cc
+MSRCS += ml-config.cc
MSRCS += ml-cookielogin.cc
+MSRCS += ml-db.cc
+MSRCS += ml-debug.cc
MSRCS += ml-defun.cc
+MSRCS += ml-diff.cc
MSRCS += ml-encode.cc
MSRCS += ml-formvar.cc
+MSRCS += ml-http.cc
MSRCS += ml-include.cc
MSRCS += ml-inet.cc
MSRCS += ml-math.cc
MSRCS += ml-motor.cc
MSRCS += ml-sendmail.cc
MSRCS += ml-sqlite3.cc
+MLDADD += ../ext/libsqlite3.a
MSRCS += ml-store.cc
MSRCS += ml-string.cc
MSRCS += ml-struct.cc
+MSRCS += ml-tcpserver.cc
MSRCS += ml-time.cc
MSRCS += ml-variable.cc
MSRCS += ml-wiki.cc
MSRCS += ml-xml.cc
-MSRCS += motor-function.cc
-
-MLDADD += ../ext/libsqlite3.a
MLDADD += -lexpat
+MSRCS += motor-function.cc
if (http.params.size () > 0)
http.params.append (uAmp);
if (a->isCons ()) {
- http.params.append (urlencode (to_string (a->car ()))).append (uEq);
- nextNode (a);
- http.params.append (urlencode (to_string (a->car ())));
+ http.params.append (urlencode (to_string (a->car ()))).append (uEq).append (urlencode (to_string (a->cdr ())));
} else {
http.params.append (urlencode (to_string (a))).append (uEq);
nextNode (query);
if (http.cookie.size () > 0)
http.cookie.append (CharConst ("; "));
if (a->isCons ()) {
- http.cookie.append (cookieencode (to_string (a->car ()))).append (uEq);
- nextNode (a);
- http.cookie.append (cookieencode (to_string (a->car ())));
+ http.cookie.append (cookieencode (to_string (a->car ()))).append (uEq).append (cookieencode (to_string (a->cdr ())));
} else {
http.cookie.append (cookieencode (to_string (a))).append (uEq);
nextNode (cookie);
/*DOC:
===$http-get==
- ($http-get [#post] [:id STRING] [:password STRING | :pw STRING] URL [:query '(NAME VALUE ...)] [:cookie '(NAME VALUE ...)] [SUBFUNCTION...])
+ ($http-get [#post] [:id STRING] [:password STRING | :pw STRING] URL [:query '((NAME . VALUE) ...)] [:cookie '((NAME . VALUE) ...)] [SUBFUNCTION...])
*/
//#MFUNC $http-get ml_http_get cMLHttpGetID
/*DOC:
====get-cookie-all====
- (get-cookie-all) -> LIST of (NAME VALUE)
+ (get-cookie-all) -> LIST of (NAME . VALUE)
*/
//#SFUNC get-cookie-all ml_http_get_get_cookie_all
for (i = 0; i < obj->http.cookie_reply.size (); i ++) {
a = new MNode;
a->set_car (newMNode_str (new ustring (obj->http.cookie_reply[i].key)));
- a->set_cdr (new MNode);
- a->cdr ()->set_car (newMNode_str (new ustring (obj->http.cookie_reply[i].value)));
+ a->set_cdr (newMNode_str (new ustring (obj->http.cookie_reply[i].value)));
ans.append (a);
}
===xml-read-file===
(xml-read-file FILENAME) -> LIST
+ Element ::= (list TagName ElementBody Attribute* )
+ Attribute ::= (cons AttributeName AttributeValue )
+ ElementBody ::= TextData
+ | (list Element* )
+ | nil
+ TagName ::= Symbol
+ AttributeName ::= String
+ AttributeValue ::= String
+ TextData ::= String
+
*/
//#AFUNC xml-read-file ml_xml_read_file
MNode* ml_xml_read_file (MNode* cell, MlEnv* mlenv) {
}
if (c) {
out->out_raw (CharConst (">"));
- if (c->isStr ()) {
- out->out_toHTML (*c->str);
- } else {
+ if (c->isCons ()) {
out->out_raw (uLF);
while (c && c->isCons ()) {
xmlWrite (out, c->car ());
c = c->cdr ();
}
+ } else if (c->isStr ()) {
+ out->out_toHTML (*c->str);
+ } else {
+ out->out_toHTML (to_string (c));
}
out->out_raw (CharConst ("</"))->out_toHTML_noCtrl (*name)->out_raw (CharConst (">\n"));
} else {