diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-03 20:36:25 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-03 20:36:25 +0300 |
commit | 9c2afb86acd2e28bef1767b7333acfb9666ec86b (patch) | |
tree | cfdedb1bd7436675654fb8374bca4e22a5f38e1d /tecparse.c | |
parent | 9deaff57e11036f96b93e0ed79b39cac7fcffa04 (diff) | |
download | videoteco-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 'tecparse.c')
-rw-r--r-- | tecparse.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -487,7 +487,7 @@ register struct cmd_token *last_token; int c = 0; int status; char token_used; -int i; +unsigned long i; char old_modified_state; struct buff_header *old_curbuf; struct undo_token *ut; @@ -1207,10 +1207,10 @@ parser_replace_command_line( struct buff_header *qbp ) { register struct cmd_token *ct; register struct cmd_token *first_different_ct; -register int c; +register unsigned long c; char temp; register char *command_buffer; -register int cb_zee; +register unsigned long cb_zee; PREAMBLE(); @@ -1491,9 +1491,9 @@ char tmp_message[LINE_BUFFER_SIZE]; illegal_position = 0; if(pos1 < 0) illegal_position = 1; - if(pos2 < 0) illegal_position = 1; - if(pos1 > curbuf->zee) illegal_position = 1; - if(pos2 > curbuf->zee) illegal_position = 1; + else if(pos2 < 0) illegal_position = 1; + else if((unsigned long)pos1 > curbuf->zee) illegal_position = 1; + else if((unsigned long)pos2 > curbuf->zee) illegal_position = 1; if(illegal_position == 0) return(0); |