X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=browser.c;h=69351d08aa613e789f93960f4ecfb5c20701901a;hp=5544e5a617715a008bb63ef07b8fac1b195a092f;hb=29bfa77fef6bf9c0bba878257fc837b2e75f8256;hpb=4a0b020a3048f079979bea43c04f9fe388f9354d diff --git a/browser.c b/browser.c index 5544e5a..69351d0 100644 --- a/browser.c +++ b/browser.c @@ -77,7 +77,7 @@ static char LastDirBackup[_POSIX_PATH_MAX] = ""; /* Frees up the memory allocated for the local-global variables. */ static void destroy_state (struct browser_state *state) { - unsigned int c; + int c; for (c = 0; c < state->entrylen; c++) { p_delete(&((state->entry)[c].name)); @@ -160,7 +160,7 @@ static int link_is_dir (const char *folder, const char *path) return 0; } -static const char *folder_format_str (char *dest, size_t destlen, char op, +static const char *folder_format_str (char *dest, ssize_t destlen, char op, const char *src, const char *fmt, const char *ifstring, const char *elsestring, @@ -324,7 +324,7 @@ static const char *folder_format_str (char *dest, size_t destlen, char op, } #ifdef USE_NNTP -static const char *newsgroup_format_str (char *dest, size_t destlen, char op, +static const char *newsgroup_format_str (char *dest, ssize_t destlen, char op, const char *src, const char *fmt, const char *ifstring, const char *elsestring, @@ -466,7 +466,7 @@ static int examine_directory (MUTTMENU * menu, struct browser_state *state, { #ifdef USE_NNTP if (option (OPTNEWS)) { - LIST *tmp; + string_list_t *tmp; NNTP_DATA *data; NNTP_SERVER *news = CurrentNewsSrv; @@ -567,7 +567,7 @@ static int examine_mailboxes (MUTTMENU * menu, struct browser_state *state) #ifdef USE_NNTP if (option (OPTNEWS)) { - LIST *tmp; + string_list_t *tmp; NNTP_DATA *data; NNTP_SERVER *news = CurrentNewsSrv; @@ -653,7 +653,7 @@ static int select_file_search (MUTTMENU * menu, regex_t * re, int n) (re, ((struct folder_file *) menu->data)[n].name, 0, NULL, 0)); } -static void folder_entry (char *s, size_t slen, MUTTMENU * menu, int num) +static void folder_entry (char *s, ssize_t slen, MUTTMENU * menu, int num) { FOLDER folder; @@ -671,7 +671,7 @@ static void folder_entry (char *s, size_t slen, MUTTMENU * menu, int num) } static void init_menu (struct browser_state *state, MUTTMENU * menu, - char *title, size_t titlelen, int buffy) + char *title, ssize_t titlelen, int buffy) { char path[_POSIX_PATH_MAX]; @@ -729,7 +729,7 @@ static int file_tag (MUTTMENU * menu, int n, int m) return ff->tagged - ot; } -void _mutt_select_file (char *f, size_t flen, int flags, char ***files, +void _mutt_select_file (char *f, ssize_t flen, int flags, char ***files, int *numfiles) { char buf[_POSIX_PATH_MAX]; @@ -756,7 +756,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, if (*f) m_strcpy(prefix, sizeof(prefix), f); else { - LIST *list; + string_list_t *list; /* default state for news reader mode is browse subscribed newsgroups */ buffy = 0; @@ -918,7 +918,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, url_parse_ciss (&url, state.entry[menu->current].name); if (url.path && (state.entry[menu->current].delim != '\0') && - (n < sizeof (LastDir))) { + (n < ssizeof (LastDir))) { LastDir[n] = '\0'; LastDir[n - 1] = state.entry[menu->current].delim; } @@ -981,7 +981,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, if (multiple) { char **tfiles; int j; - unsigned int h; + int h; if (menu->tagged) { *numfiles = menu->tagged; @@ -1112,9 +1112,9 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, if (!state.imap_browse) { /* add '/' at the end of the directory name if not already there */ - size_t len = m_strlen(LastDir); + ssize_t len = m_strlen(LastDir); - if (len && LastDir[len - 1] != '/' && sizeof (buf) > len) + if (len && LastDir[len - 1] != '/' && ssizeof(buf) > len) buf[len] = '/'; } @@ -1384,7 +1384,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, break; { - LIST *tmp; + string_list_t *tmp; NNTP_DATA *data; for (tmp = CurrentNewsSrv->list; tmp; tmp = tmp->next) { @@ -1478,7 +1478,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, } } if (i == OP_SUBSCRIBE_PATTERN) { - LIST *grouplist = NULL; + string_list_t *grouplist = NULL; if (news) grouplist = news->list;