}
}
-static void do_hex_dump(const char* buf, int len)
+static void do_hex_dump(const char* buf, size_t len)
{
if (hex_dump)
{
- int i,x;
+ size_t i;
+ int x;
for (i = 0; i < len ; i = i+16 )
{
printf(" %4.4d ",i);
}
else if ((*arg)[0] == '<')
{
- long fsize;
+ size_t fsize;
FILE *inf;
const char *fname;
const char *arg_start = ++(*arg);
if (rec->recordData_buf && rec->recordData_len)
{
if (fwrite(rec->recordData_buf, 1, rec->recordData_len, stdout) !=
- rec->recordData_len)
+ (size_t) (rec->recordData_len))
{
printf("write to stdout failed\n");
}
char* homedir = getenv("HOME");
char fname[1024];
int ret = 0;
- int sz = wrbuf_len(fh->wr);
+ size_t sz = wrbuf_len(fh->wr);
if (!sz)
return 0;
int file_history_trav(file_history_t fh, void *client_data,
void (*callback)(void *client_data, const char *line))
{
- int off = 0;
+ size_t off = 0;
while (off < wrbuf_len(fh->wr))
{
- int i;
+ size_t i;
for (i = off; i < wrbuf_len(fh->wr); i++)
{
if (wrbuf_buf(fh->wr)[i] == '\n')
no = sscanf(cp, "%d=%20[^,]%n", &pos, val, &no_read);
if (no < 2 || no_read < 3)
return -1;
- if (pos < 0 || pos >= size)
+ if (pos < 0 || (size_t) pos >= size)
return -1;
if (*val == '\'')
int options (const char *desc, char **argv, int argc, char **arg)
{
const char *opt_buf = 0;
- int i = 0;
+ size_t i = 0;
int ch = 0;
if (arg_no >= argc)
int type = 0;
while (desc[i] == '{')
{
- int i0 = ++i;
+ size_t i0 = ++i;
while (desc[i] && desc[i] != '}')
i++;
if (opt_buf && (i - i0) == strlen(opt_buf) &&
if (term)
{
- int i;
+ size_t i;
int must_quote = 0;
for (i = 0 ; i < lterm; i++)
if (sterm[i] == ' ')
return 1;
}
-static char *read_file(const char *fname, ODR o, int *sz)
+static char *read_file(const char *fname, ODR o, size_t *sz)
{
char *buf;
FILE *inf = fopen(fname, "rb");
schema ? schema : "unknown");
if (render)
{
- if (fwrite(render, 1, len, stdout) != len)
+ if (fwrite(render, 1, len, stdout) != (size_t) len)
{
printf("write to stdout failed\n");
}
printf("\n");
if (opac_render)
{
- if (fwrite(opac_render, 1, opac_len, stdout) != opac_len)
+ if (fwrite(opac_render, 1, opac_len, stdout) != (size_t)
+ opac_len)
printf("write to stdout failed\n");
}
}
(db ? db : "unknown"));
if (rec)
{
- if (fwrite (str, 1, len, stdout) != len)
+ if (fwrite (str, 1, len, stdout) != (size_t) len)
printf("write to stdout failed\n");
}
printf ("\n");
printf ("%d %s\n", pos+1, (db ? db : "unknown"));
if (render)
{
- if (fwrite (render, 1, len, stdout) != len)
+ if (fwrite (render, 1, len, stdout) != (size_t) len)
printf("write to stdout failed\n");
}
printf ("\n");
while (ZOOM_event (1, &z))
;
printf (" scan size = %ld\n", (long) ZOOM_scanset_size(scan));
- for (j = 0; j<ZOOM_scanset_size (scan); j++)
+ for (j = 0; j < (int) ZOOM_scanset_size (scan); j++)
{
int occur, len;
const char *term;
{
int j;
printf ("%s\n", ZOOM_connection_option_get(z[i], "host"));
- for (j = 0; j<ZOOM_scanset_size (s[i]); j++)
+ for (j = 0; j < (int) ZOOM_scanset_size (s[i]); j++)
{
int occur, len;
const char *term;