- Timestamp:
- 11/19/12 18:28:38 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineDimControl.cc
r14561 r14662 97 97 98 98 const map<string,string> data = Tools::Split(opt, true); 99 100 99 if (imp.GetSize()==0 || opt.size()==0 || opt[0]==0) 101 100 { … … 119 118 } 120 119 121 Readline::SetExternalInput(cmd+imp.GetString()); 120 string emit = cmd+imp.GetString(); 121 if (cmd==".js ") 122 emit += fArgumentsJS; 123 124 Readline::SetExternalInput(emit); 122 125 return 1; 123 126 } … … 490 493 fScriptUser = fUser; 491 494 495 const map<string, string> &js = conf.GetOptions<string>("JavaScript."); 496 for (auto it=js.begin(); it!=js.end(); it++) 497 { 498 string key = it->first; 499 string val = it->second; 500 501 // Escape key 502 boost::replace_all(key, "\\", "\\\\"); 503 boost::replace_all(key, "'", "\\'"); 504 boost::replace_all(key, "\"", "\\\""); 505 506 // Escape value 507 boost::replace_all(val, "\\", "\\\\"); 508 boost::replace_all(val, "'", "\\'"); 509 boost::replace_all(val, "\"", "\\\""); 510 511 fArgumentsJS += " '"+key +"'='"+val+"'"; 512 } 513 492 514 // fVerbosity = 40; 493 515 -
trunk/FACT++/src/StateMachineDimControl.h
r14551 r14662 32 32 std::string fUser; 33 33 std::string fScriptUser; 34 35 /// Default arguments provided to very java script 36 std::string fArgumentsJS; 34 37 35 38 std::string Line(const std::string &txt, char fill); -
trunk/FACT++/src/dimctrl.cc
r14621 r14662 21 21 ("server", po_bool(false), "Start dimctrl as a dim server (console mode switched off)") 22 22 ("force-console",po_switch(), "Forces console mode in server-mode.") 23 // ("verbosity,v", var<uint32_t>()->implicit_value(0), "Set a new verbosity level (see MessageImp)")24 // ("quiet,q", po_bool(false), "Suppress all output except comments (log-level>=90)")25 23 ("debug", po_bool(false), "Print the labels for debugging purpose") 26 24 ("start", var<string>(), "Start a java script with the given name on the dimctrl-server") … … 29 27 ("msg", var<string>(), "Send a message to the chat server.") 30 28 ("user,u", var<string>(""), "A user name - just for logging purposes (default is ${USER})") 29 ("JavaScript.*", var<string>(""), "Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command") 31 30 ; 32 31
Note:
See TracChangeset
for help on using the changeset viewer.