return(transfer);
}
-void transfersetsize(struct transfer *transfer, int size)
+void transfersetsize(struct transfer *transfer, intmax_t size)
{
transfer->size = size;
cb_trsize(transfer, transfer->conduit->udata);
}
-void transfersetpos(struct transfer *transfer, int pos)
+void transfersetpos(struct transfer *transfer, intmax_t pos)
{
transfer->pos = pos;
cb_trpos(transfer, transfer->conduit->udata);
#define _CONDUIT_H
#include <sys/types.h>
+#include <stdint.h>
#define CNDS_IDLE 0
#define CNDS_SYN 1
struct transfer *next, *prev;
struct conduit *conduit;
char *tag; /* UTF8 */
- int pos, size;
+ intmax_t pos, size;
time_t cmptime, ckptime;
- size_t cmpsize, ckpsize;
+ intmax_t cmpsize, ckpsize;
int timeout;
};
};
struct transfer *findtransferbytag(struct conduit *conduit, char *tag);
-void transfersetsize(struct transfer *transfer, int size);
-void transfersetpos(struct transfer *transfer, int pos);
+void transfersetsize(struct transfer *transfer, intmax_t size);
+void transfersetpos(struct transfer *transfer, intmax_t pos);
struct transfer *newtransfer(struct conduit *conduit, char *tag, int size, int pos);
void freetransfer(struct transfer *transfer);
struct conduit *newconduit(struct conduitiface *iface, void *udata);
} else {
if((data->curdisplay->pos > 0) && (data->curdisplay->size > 0))
{
- sprintf(buf, "%'i/%'i", data->curdisplay->pos, data->curdisplay->size);
+ sprintf(buf, "%'ji/%'ji", (intmax_t)data->curdisplay->pos, (intmax_t)data->curdisplay->size);
gtk_progress_bar_set_fraction(data->pbar, (double)data->curdisplay->pos / (double)data->curdisplay->size);
gtk_progress_bar_set_text(data->pbar, buf);
} else {