result = GC_NEW(struct Concatenation);
if (result == 0) OUT_OF_MEMORY;
result->header = CONCAT_HDR;
- result->depth = depth;
+ result->depth = (char)depth;
if (lenx <= MAX_LEFT_LEN)
result->left_len = (unsigned char)lenx;
- result->len = result_len;
+ result->len = (word)result_len;
result->left = x;
result->right = y;
if (depth >= MAX_DEPTH) {
result = GC_NEW(struct Concatenation);
if (result == 0) OUT_OF_MEMORY;
result->header = CONCAT_HDR;
- result->depth = depth;
+ result->depth = (char)depth;
if (lenx <= MAX_LEFT_LEN)
result->left_len = (unsigned char)lenx;
- result->len = result_len;
+ result->len = (word)result_len;
result->left = x;
result->right = y;
if (depth >= MAX_DEPTH) {
if (result == 0) OUT_OF_MEMORY;
result->header = FN_HDR;
/* depth is already 0 */
- result->len = len;
+ result->len = (word)len;
result->fn = fn;
result->client_data = client_data;
return (CordRep *)result;
register struct Function * f = &(((CordRep *)x) -> function);
char buf[SUBSTR_LIMIT+1];
register char * p = buf;
- register int j;
- register int lim = i + n;
+ register size_t j;
+ register size_t lim = i + n;
for (j = i; j < lim; j++) {
char c = (*(f -> fn))(j, f -> client_data);
previous = last;
last = current;
}
- CORD_max_len = last - 1;
+ CORD_max_len = (int)last - 1;
min_len_init = 1;
}
if (avail > yavail) avail = yavail;
count += avail;
- if (count > len) avail -= (count - len);
+ if (count > len)
+ avail -= (long)(count - len);
result = strncmp(CORD_pos_cur_char_addr(xpos),
CORD_pos_cur_char_addr(ypos), (size_t)avail);
if (result != 0) return(result);
chr_data d;
d.pos = i;
- d.target = c;
+ d.target = (char)c;
if (CORD_iter5(x, i, CORD_chr_proc, CORD_batched_chr_proc, &d)) {
return(d.pos);
} else {
chr_data d;
d.pos = i;
- d.target = c;
+ d.target = (char)c;
if (CORD_riter4(x, i, CORD_rchr_proc, &d)) {
return(d.pos);
} else {
ecord[0].ec_cord = CORD_cat(ecord[0].ec_cord, CORD_nul(count));
}
if (c == EOF) break;
- CORD_ec_append(ecord, c);
+ CORD_ec_append(ecord, (char)c);
}
(void) fclose(f);
return(CORD_balance(CORD_ec_to_cord(ecord)));
cache_line * new_cache = client_data -> new_cache;
if (line_start != state -> lf_current
- && fseek(f, line_start, SEEK_SET) != 0) {
+ && fseek(f, (long)line_start, SEEK_SET) != 0) {
ABORT("fseek failed");
}
if (fread(new_cache -> data, sizeof(char), LINE_SZ, f)
if (next == CORD_NOT_FOUND) next = current_len - 1;
if (next < cur + *c) {
- *c = next - cur;
+ *c = (int)(next - cur);
}
cur += *c;
}
{
int my_col = col;
- if ((size_t)line > current_len) line = current_len;
+ if ((size_t)line > current_len)
+ line = (int)current_len;
file_pos = line_pos(line, &my_col);
if (file_pos == CORD_NOT_FOUND) {
for (line = current_map -> line, file_pos = current_map -> pos;
if (file_pos > new_pos) break;
line++;
}
- col = new_pos - line_pos(line, 0);
+ col = (int)(new_pos - line_pos(line, 0));
file_pos = new_pos;
fix_cursor();
} else {
locate_mode = 1;
break;
case TOP:
- line = col = file_pos = 0;
+ line = col = 0;
+ file_pos = 0;
break;
case UP:
if (line != 0) {
DispatchMessage (&msg);
}
}
- return msg.wParam;
+ return (int)msg.wParam;
}
/* Return the argument with all control characters replaced by blanks. */