X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=browser.c;h=12506b352b191c352b3de465f6951d73c90643af;hb=eed5352e46df93f8921d2e6dfdc95b027bad6e1e;hp=03e1db93e5791bfa7a0bf4d4b56b7e72ca830338;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd;p=apps%2Fmadmutt.git diff --git a/browser.c b/browser.c index 03e1db9..12506b3 100644 --- a/browser.c +++ b/browser.c @@ -530,7 +530,7 @@ static int examine_directory (MUTTMENU * menu, struct browser_state *state, init_state (state, menu); while ((de = readdir (dp)) != NULL) { - if (str_cmp (de->d_name, ".") == 0) + if (m_strcmp(de->d_name, ".") == 0) continue; /* we don't need . */ if (prefix && *prefix @@ -738,7 +738,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, buffy = buffy && folder; - memset (&state, 0, sizeof (struct browser_state)); + p_clear(&state, 1); if (!folder) strfcpy (LastDirBackup, LastDir, sizeof (LastDirBackup)); @@ -851,7 +851,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, init_menu (&state, menu, title, sizeof (title), buffy); - FOREVER { + for (;;) { switch (i = mutt_menuLoop (menu)) { case OP_GENERIC_SELECT_ENTRY: @@ -892,8 +892,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, /* save the old directory */ strfcpy (OldLastDir, LastDir, sizeof (OldLastDir)); - if (str_cmp (state.entry[menu->current].name, "..") == 0) { - if (str_cmp ("..", LastDir + m_strlen(LastDir) - 2) == 0) + if (m_strcmp(state.entry[menu->current].name, "..") == 0) { + if (m_strcmp("..", LastDir + m_strlen(LastDir) - 2) == 0) strcat (LastDir, "/.."); /* __STRCAT_CHECKED__ */ else { char *p = strrchr (LastDir + 1, '/');