//--------------------------------------------------------------- // Key pressed void Console::keyPressed(char c) { // Handle key pressed switch (c) { // Backspace case 8: { if (!mCommandLine.empty()) { // Delete last char from command line mCommandLine.erase(mCommandLine.length()-1, 1); } break; } // Enter case 13: { // Parse command line _parseCommandLine(); break; } // Default default: { mCommandLine += c; break; } } }
int main(int argc, char *argv[]) { _athenaLogo(); printf("\n"); Athena *athena = athena_Create(AthenaDefaultContentStoreSize); // Passing in a reference that will be released by athena_Process. athena_Process is used // in athena_InterestControl.c:_Control_Command as the entry point for spawned instances. // Spawned instances may not have have time to acquire a reference before our reference is // released so the reference is acquired for them. if (athena) { _parseCommandLine(athena, argc, argv); (void) athena_ForwarderEngine(athena_Acquire(athena)); } athena_Release(&athena); pthread_exit(NULL); // wait for any residual threads to exit return 0; }