static int write_range (void *dummy, Buffer *buffer, Line *line) { if (line != NULL) { /* Make sure the file is open */ if (out_file == NULL) { out_file = os_crenewfile (out_name); if (out_file == NULL) return (1); } /* Write line to the file */ if (fputs (string_getval (line_string (line)), out_file) < 0) { outerr (strlen (out_name) + strlen (strerror (errno)), "error writing file %s: %s\n", out_name, strerror (errno)); return (1); } /* Increment line counter */ linecount ++; } return (0); }
// static void LLChatBar::startChat(const char* line) { gChatBar->getParent()->setVisible(TRUE); gChatBar->setKeyboardFocus(TRUE); gSavedSettings.setBOOL("ChatVisible", TRUE); if (line && gChatBar->mInputEditor) { std::string line_string(line); gChatBar->mInputEditor->setText(line_string); } // always move cursor to end so users don't obliterate chat when accidentally hitting WASD gChatBar->mInputEditor->setCursorToEnd(); }
// static void LLNearbyChatBar::startChat(const char* line) { LLNearbyChatBar* cb = LLNearbyChatBar::getInstance(); if (!cb ) return; cb->setVisible(TRUE); cb->setFocus(TRUE); cb->mChatBox->setFocus(TRUE); if (line) { std::string line_string(line); cb->mChatBox->setText(line_string); } cb->mChatBox->setCursorToEnd(); }