aboutsummaryrefslogtreecommitdiff
path: root/tecexec.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-03 20:36:25 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-03 20:36:25 +0300
commit9c2afb86acd2e28bef1767b7333acfb9666ec86b (patch)
treecfdedb1bd7436675654fb8374bca4e22a5f38e1d /tecexec.c
parent9deaff57e11036f96b93e0ed79b39cac7fcffa04 (diff)
downloadvideoteco-fork-9c2afb86acd2e28bef1767b7333acfb9666ec86b.tar.gz
various data type improvements
* fixes at least <FS>, which has been broken since b5325e00c402ec18034da4b4a4aaaefa87bb1fef. * but probably many other commands as well in the DOS version when working with "very large" documents * now compiles cleanly with -Wsign-compare
Diffstat (limited to 'tecexec.c')
-rw-r--r--tecexec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tecexec.c b/tecexec.c
index e1099a3..cec0190 100644
--- a/tecexec.c
+++ b/tecexec.c
@@ -1250,13 +1250,13 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
* insure that the two positions specified are valid buffer positions.
*/
if(ct->ctx.iarg1_flag && ct->ctx.iarg2_flag){
- if(arg1 < 0 || arg1 > curbuf->zee){
+ if(arg1 < 0 || (unsigned long)arg1 > curbuf->zee){
sprintf(tmp_message,
"?Illegal buffer position %ld in search command",arg1);
error_message(tmp_message);
return(FAIL);
}/* End IF */
- if(arg2 < 0 || arg2 > curbuf->zee){
+ if(arg2 < 0 || (unsigned long)arg2 > curbuf->zee){
sprintf(tmp_message,
"?Illegal buffer position %ld in search command",arg2);
error_message(tmp_message);
@@ -1410,7 +1410,7 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
* previous one. Only if we get a miscompare do we delete the contents of
* the replacement q-register, and insert the new string.
*/
- if(qbp->zee > ct->ctx.tmpval){
+ if((long)qbp->zee > ct->ctx.tmpval){
if(ct->input_byte == buff_contents(qbp,ct->ctx.tmpval)){
ct->ctx.tmpval += 1;
return(SUCCESS);
@@ -1433,7 +1433,7 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
return(FAIL);
}/* End IF */
- if(qbp->zee > ct->ctx.tmpval){
+ if((long)qbp->zee > ct->ctx.tmpval){
buff_delete_with_undo(uct,qbp,ct->ctx.tmpval,
qbp->zee-ct->ctx.tmpval);
}