nsresult nsMailtoUrl::ParseUrl() { // we can get the path from the simple url..... nsCString escapedPath; m_baseURL->GetPath(escapedPath); int32_t startOfSearchPart = escapedPath.FindChar('?'); if (startOfSearchPart >= 0) { // now parse out the search field... nsAutoCString searchPart(Substring(escapedPath, startOfSearchPart)); if (!searchPart.IsEmpty()) { // now we need to strip off the search part from the // to part.... escapedPath.SetLength(startOfSearchPart); MsgUnescapeString(escapedPath, 0, m_toPart); ParseMailtoUrl(searchPart.BeginWriting()); } } else if (!escapedPath.IsEmpty()) { MsgUnescapeString(escapedPath, 0, m_toPart); } return NS_OK; }
/************************************************************************* * Programme principal *************************************************************************/ int main(int argc, char *argv[]) { int end_Menu = 0; db_Used active_Db; memset(&active_Db, sizeof(active_Db), 0); while(!end_Menu) { switch(showMenu(active_Db)) { case SELECT_AGENDA: selectAgenda(&active_Db); break; case NEW_AGENDA: createAgenda(); break; case APPEND_ENTRY: newEntry(&active_Db); break; case IMPORT_ENTRIES: importEntries(&active_Db); break; case SEARCH_PART: searchPart(&active_Db); break; case SEARCH_NUM: searchNum(&active_Db); break; case READ_ALL: readAll(&active_Db); break; case QUIT: printf("Bye bye !\n\n"); end_Menu = 1; break; default: printf("Error !\nBad Entry, try again.\n\n"); break; } } return 0; }