void prompt(void) { char buf[IDLEN+1]; #if defined(TINY_BUILD) msgp(M_prompt); #else // Run the script named "prompt" if there is one else print "> " strncpy_P(buf, getmsg(M_promptid), IDLEN); // get the name "prompt" in our cmd buf if (findscript(buf)) doCommand(buf); else if (find_user_function(buf)) dofunctioncall(symval); else msgp(M_prompt); // else print default prompt #endif }
void prompt(void) { char buf[IDLEN+1]; // Run the script named "prompt" if there is one else print "> " strncpy_P(buf, getmsg(M_promptid), IDLEN); // get the name "prompt" in our cmd buf if (findscript(buf)) doCommand(buf); else msgp(M_prompt); // else print default prompt }
void prompt(void) { char buf[IDLEN+1]; // Run the script named "prompt" if there is one else print "> " strncpy_P(buf, getmsg(M_promptid), IDLEN); // get the name "prompt" in our cmd buf int entry = findKey(buf); if (entry >= 0) doCommand(kludge(findend(entry))); else msgp(M_prompt); // else print default prompt }
void send_headers() { std::ostringstream os; os << "status\t" << m_status << "\n" << "mime-type\t" << m_mimetype << "\n" << "content-length\t" << m_contentlength << "\n"; std::cout << "Sending headers:\n" << os.str(); libf2f::message_ptr msgp(new libf2f::GeneralMessage(SIDHEADERS, os.str(), m_sid)); m_conn->async_write( msgp ); }
void cmd_help(void) { displayBanner(); showdict(helptext); showdict(reservedwords); msgp(M_functions); #ifdef LONG_ALIASES showdict(aliasdict); speol(); #endif showdict(functiondict); speol(); show_user_functions(); speol(); void cmd_ls(void); cmd_ls(); }
// list the strings in the avpdb void cmd_ls(void) { int start = STARTDB; for (;;) { // find the next entry start = findoccupied(start); if (start == FAIL) return; eeputs(start); msgp(M_defmacro); start = findend(start); eeputs(start); spb('"'); speol(); start = findend(start); } }
void cmd_help(void) { displayBanner(); showdict(helptext); // TODO: extern this puppy extern prog_char reservedwords[]; showdict(reservedwords); msgp(M_functions); #ifdef LONG_ALIASES showdict(aliasdict); speol(); #endif showdict(functiondict); speol(); speol(); void cmd_ls(void); cmd_ls(); }
// list the strings in the avpdb void cmd_ls(void) { int start = STARTDB; for (;;) { // find the next entry start = findoccupied(start); if (start == FAIL) return; msgp(M_function); spb(' '); eeputs(start); spb(' '); spb('{'); start = findend(start); eeputs(start); spb('}'); spb(';'); speol(); start = findend(start); } }
void msgpl(byte msgid) { msgp(msgid); speol(); }