snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
m_strcpy(obuf, sizeof(obuf), buf);
if (b->parameter) {
- size_t l;
+ ssize_t l;
for (p = b->parameter; p; p = p->next) {
l = m_strlen(buf);
ci->size = get_size (ctx->realpath);
}
-static const char *compresshook_format_str (char *dest, size_t destlen,
+static const char *compresshook_format_str (char *dest, ssize_t destlen,
char op, const char *src,
const char *fmt,
const char *ifstring,
unsigned long uid_validity;
} validate;
-static void *lazy_malloc (size_t siz)
+static void *lazy_malloc (ssize_t siz)
{
if (0 < siz && siz < 4096) {
siz = 4096;
}
static
-unsigned int crc32 (unsigned int crc, unsigned char const *p, size_t len)
+unsigned int crc32 (unsigned int crc, unsigned char const *p, ssize_t len)
{
int i;
void *
mutt_hcache_fetch(void *db, const char *filename,
- size_t(*keylen) (const char *fn))
+ ssize_t(*keylen) (const char *fn))
{
struct header_cache *h = db;
char path[_POSIX_PATH_MAX];
int
mutt_hcache_store(void *db, const char *filename, HEADER * header,
unsigned long uid_validity,
- size_t(*keylen) (const char *fn))
+ ssize_t(*keylen) (const char *fn))
{
struct header_cache *h = db;
char path[_POSIX_PATH_MAX];
int
mutt_hcache_delete(void *db, const char *filename,
- size_t(*keylen) (const char *fn))
+ ssize_t(*keylen) (const char *fn))
{
struct header_cache *h = db;
char path[_POSIX_PATH_MAX];
}
void *mutt_hcache_fetch (void *db, const char *filename,
- size_t (*keylen) (const char *fn))
+ ssize_t (*keylen) (const char *fn))
{
struct header_cache *h = db;
datum key;
int
mutt_hcache_store (void *db, const char *filename, HEADER * header,
- unsigned long uid_validity, size_t (*keylen) (const char *fn))
+ unsigned long uid_validity, ssize_t (*keylen) (const char *fn))
{
struct header_cache *h = db;
datum key;
int
mutt_hcache_delete (void *db, const char *filename,
- size_t (*keylen) (const char *fn))
+ ssize_t (*keylen) (const char *fn))
{
datum key;
struct header_cache *h = db;
}
#elif defined(HAVE_DB4)
-static void mutt_hcache_dbt_init (DBT * dbt, void *data, size_t len)
+static void mutt_hcache_dbt_init (DBT * dbt, void *data, ssize_t len)
{
dbt->data = data;
dbt->size = dbt->ulen = len;
}
void *mutt_hcache_fetch (void *db, const char *filename,
- size_t (*keylen) (const char *fn))
+ ssize_t (*keylen) (const char *fn))
{
DBT key;
DBT data;
int
mutt_hcache_store (void *db, const char *filename, HEADER * header,
- unsigned long uid_validity, size_t (*keylen) (const char *fn))
+ unsigned long uid_validity, ssize_t (*keylen) (const char *fn))
{
DBT key;
DBT data;
int
mutt_hcache_delete (void *db, const char *filename,
- size_t (*keylen) (const char *fn))
+ ssize_t (*keylen) (const char *fn))
{
DBT key;
struct header_cache *h = db;
void mutt_hcache_close(void *db);
HEADER *mutt_hcache_restore(const unsigned char *d, HEADER **oh);
void *mutt_hcache_fetch(void *db, const char *filename,
- size_t (*keylen)(const char *fn));
+ ssize_t (*keylen)(const char *fn));
int mutt_hcache_store(void *db, const char *filename, HEADER *h,
unsigned long uid_validity,
- size_t (*keylen)(const char *fn));
+ ssize_t (*keylen)(const char *fn));
int mutt_hcache_delete(void *db, const char *filename,
- size_t (*keylen)(const char *fn));
+ ssize_t (*keylen)(const char *fn));
#endif /* USE_HCACHE */
#endif /* !_MUTT_HCACHE_H */
/* forward declarations */
static int tunnel_socket_open (CONNECTION *);
static int tunnel_socket_close (CONNECTION *);
-static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len);
+static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len);
static int tunnel_socket_write (CONNECTION * conn, const char *buf,
- size_t len);
+ ssize_t len);
/* -- public functions -- */
int mutt_tunnel_socket_setup (CONNECTION * conn)
return 0;
}
-static int tunnel_socket_read (CONNECTION * conn, char *buf, size_t len)
+static int tunnel_socket_read (CONNECTION * conn, char *buf, ssize_t len)
{
TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata;
int rc;
}
static int tunnel_socket_write (CONNECTION * conn, const char *buf,
- size_t len)
+ ssize_t len)
{
TUNNEL_DATA *tunnel = (TUNNEL_DATA *) conn->sockdata;
int rc;
void menu_current_middle (MUTTMENU *);
void menu_current_bottom (MUTTMENU *);
void menu_check_recenter (MUTTMENU *);
-void menu_status_line (char *, size_t, MUTTMENU *, const char *);
+void menu_status_line (char *, ssize_t, MUTTMENU *, const char *);
MUTTMENU *mutt_new_menu (void);
void mutt_menuDestroy (MUTTMENU **);
int line = 1;
char *buff = NULL;
char *t;
- size_t sz = 0;
+ ssize_t sz = 0;
short f;
int first, last;
char *tmpfname;
char *buff = NULL;
char *p;
- size_t s;
+ ssize_t s;
int l = 0;
int i;
char *buff = NULL;
int line;
- size_t sz;
+ ssize_t sz;
if (mh_mkstemp (ctx, &nfp, &tmpfname) == -1)
return;
}
#ifdef USE_HCACHE
-static size_t maildir_hcache_keylen (const char *fn)
+static ssize_t maildir_hcache_keylen (const char *fn)
{
return m_strchrnul(fn, ':') - fn;
}
return (int) (*((const char *) a) - *((const char *) b));
}
-static void maildir_flags (char *dest, size_t destlen, HEADER * hdr)
+static void maildir_flags (char *dest, ssize_t destlen, HEADER * hdr)
{
*dest = '\0';
return -1;
}
-static char *maildir_canon_filename (char *dest, const char *src, size_t l)
+static char *maildir_canon_filename (char *dest, const char *src, ssize_t l)
{
char *t, *u;
short r, c;
};
-static REMAILER **mix_type2_list (size_t * l);
+static REMAILER **mix_type2_list (ssize_t * l);
static REMAILER *mix_new_remailer (void);
static const char *mix_format_caps (REMAILER * r);
static int mix_chain_add (MIXCHAIN * chain, const char *s,
REMAILER ** type2_list);
static int mix_get_caps (const char *capstr);
-static void mix_add_entry (REMAILER ***, REMAILER *, size_t *, size_t *);
-static void mix_entry (char *b, size_t blen, MUTTMENU * menu, int num);
+static void mix_add_entry (REMAILER ***, REMAILER *, ssize_t *, ssize_t *);
+static void mix_entry (char *b, ssize_t blen, MUTTMENU * menu, int num);
static void mix_free_remailer (REMAILER ** r);
static void mix_free_type2_list (REMAILER *** ttlp);
static void mix_redraw_ce (REMAILER ** type2_list, struct coord *coords,
}
static void mix_add_entry (REMAILER *** type2_list, REMAILER * entry,
- size_t * slots, size_t * used)
+ ssize_t * slots, ssize_t * used)
{
if (*used == *slots) {
*slots += 5;
/* parse the type2.list as given by mixmaster -T */
-static REMAILER **mix_type2_list (size_t * l)
+static REMAILER **mix_type2_list (ssize_t * l)
{
FILE *fp;
pid_t mm_pid;
char *t;
REMAILER **type2_list = NULL, *p;
- size_t slots = 0, used = 0;
+ ssize_t slots = 0, used = 0;
if (!l)
return NULL;
*/
static const char *mix_entry_fmt (char *dest,
- size_t destlen,
+ ssize_t destlen,
char op,
const char *src,
const char *prefix,
-static void mix_entry (char *b, size_t blen, MUTTMENU * menu, int num)
+static void mix_entry (char *b, ssize_t blen, MUTTMENU * menu, int num)
{
REMAILER **type2_list = (REMAILER **) menu->data;
- int w=(COLS-SW)>blen?blen:(COLS-SW);
+ int w = (COLS-SW) > blen ? blen : (COLS-SW);
mutt_FormatString (b, w, NONULL (MixEntryFormat), mix_entry_fmt,
(unsigned long) type2_list[num], M_FORMAT_ARROWCURSOR);
short c_redraw = 1;
REMAILER **type2_list = NULL;
- size_t ttll = 0;
+ ssize_t ttll = 0;
struct coord *coords = NULL;
struct mixchain {
- size_t cl;
+ ssize_t cl;
int ch[MAXMIXES];
};
static int edit_address (address_t ** a, const char *field)
{
char buf[HUGE_STRING];
- char *err = NULL;
+ const char *err = NULL;
int idna_ok = 0;
do {
char *pgpkeylist = NULL;
/* save current value of "pgp_sign_as" */
- char *signas = NULL, *err = NULL;
- const char *tag = NULL;
+ char *signas = NULL;
+ const char *tag = NULL, *err = NULL;
char *ctype;
int rv = -1;
return m_strdup(box);
}
-static const char* sidebar_number_format (char* dest, size_t destlen, char op,
+static const char* sidebar_number_format (char* dest, ssize_t destlen, char op,
const char* src, const char* fmt,
const char* ifstr, const char* elstr,
unsigned long data, format_flag flags) {
* 0 item was not printed ('cause of $sidebar_newmail_only)
* 1 item was printed
*/
-int make_sidebar_entry (char* box, int idx, size_t len)
+int make_sidebar_entry (char* box, int idx, ssize_t len)
{
int shortened = 0, lencnt = 0;
char no[SHORT_STRING], entry[SHORT_STRING];
}
void sidebar_draw_frames (void) {
- size_t i,delim_len;
+ ssize_t i,delim_len;
if (!option(OPTMBOXPANE) || SidebarWidth==0)
return;
last_line = LINES - 2 + (option (OPTSTATUSONTOP) && !option (OPTHELP) ? 1 : 0),
i = 0,line;
BUFFY *tmp;
- size_t delim_len = m_strlen(SidebarDelim);
+ ssize_t delim_len = m_strlen(SidebarDelim);
char blank[SHORT_STRING];
known_lines=last_line-first_line;
#include "state.h"
#include "rfc3676.h"
-static void state_prefix_put (const char *d, size_t dlen, STATE * s)
+static void state_prefix_put (const char *d, ssize_t dlen, STATE * s)
{
if (s->prefix)
while (dlen--)
fwrite (d, dlen, 1, s->fpout);
}
-void mutt_convert_to_state (iconv_t cd, char *bufi, size_t * l, STATE * s)
+void mutt_convert_to_state (iconv_t cd, char *bufi, ssize_t * l, STATE * s)
{
char bufo[BUFO_SIZE];
const char *ib;
char *ob;
- size_t ibl, obl;
+ ssize_t ibl, obl;
if (!bufi) {
if (cd != (iconv_t) (-1)) {
void state_prefix_putc (char, STATE *);
int state_printf (STATE *, const char *, ...);
-void mutt_convert_to_state (iconv_t, char*, size_t*, STATE*);
+void mutt_convert_to_state (iconv_t, char*, ssize_t*, STATE*);
#endif /* !_MUTT_STATE_H */
#define SW (option(OPTMBOXPANE)?SidebarWidth:0)
-static char *get_sort_str (char *buf, size_t buflen, int method)
+static char *get_sort_str (char *buf, ssize_t buflen, int method)
{
snprintf (buf, buflen, "%s%s%s",
(method & SORT_REVERSE) ? "reverse-" : "",
* %t = # of tagged messages [option]
* %v = Madmutt version
* %V = currently active limit pattern [option] */
-static const char *status_format_str (char *buf, size_t buflen, char op,
+static const char *status_format_str (char *buf, ssize_t buflen, char op,
const char *src, const char *prefix,
const char *ifstring,
const char *elsestring,
return (src);
}
-void menu_status_line (char* buf, size_t len, MUTTMENU* menu, const char* p) {
+void menu_status_line (char* buf, ssize_t len, MUTTMENU* menu, const char* p) {
/*
* if we have enough space for buffer, format lines to $COLS-$SidebarWidth
* only to not wrap past end of screen