diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-04-17 17:28:17 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-04-17 17:28:17 +0000 |
commit | 471ee1c85a9d20520815f2294ff60f4a68b1961f (patch) | |
tree | a6a1749470f0ef0127fdd632338023490a5fee50 /contrib/dialog/textbox.c | |
parent | 0082d50ef6e83de5022497c14421f2dcefb71537 (diff) | |
parent | 9904759c67ae2ed3f18aef4891fb52900bcfb03f (diff) | |
download | FreeBSD-src-471ee1c85a9d20520815f2294ff60f4a68b1961f.zip FreeBSD-src-471ee1c85a9d20520815f2294ff60f4a68b1961f.tar.gz |
Update dialog to version 1.1-20110302.
Diffstat (limited to 'contrib/dialog/textbox.c')
-rw-r--r-- | contrib/dialog/textbox.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/dialog/textbox.c b/contrib/dialog/textbox.c index 5b8c5aa..f9a19eb 100644 --- a/contrib/dialog/textbox.c +++ b/contrib/dialog/textbox.c @@ -1,9 +1,9 @@ /* - * $Id: textbox.c,v 1.97 2010/04/28 21:03:44 tom Exp $ + * $Id: textbox.c,v 1.99 2011/01/16 22:20:34 tom Exp $ * - * textbox.c -- implements the text box + * textbox.c -- implements the text box * - * Copyright 2000-2009,2010 Thomas E. Dickey + * Copyright 2000-2010,2011 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -72,7 +72,7 @@ lseek_obj(MY_OBJ * obj, long offset, int mode) static long ftell_obj(MY_OBJ * obj) { - return lseek_obj(obj, 0, SEEK_CUR); + return lseek_obj(obj, 0L, SEEK_CUR); } static char * @@ -309,7 +309,7 @@ back_lines(MY_OBJ * obj, long n) /* Really possible to move backward BUF_SIZE/2 bytes? */ if (fpos < BUF_SIZE / 2 + obj->fd_bytes_read) { /* No, move less than */ - lseek_obj(obj, 0, SEEK_SET); + lseek_obj(obj, 0L, SEEK_SET); val_to_tabize = fpos - obj->fd_bytes_read; } else { /* Move backward BUF_SIZE/2 bytes */ lseek_obj(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read), SEEK_CUR); @@ -340,7 +340,7 @@ back_lines(MY_OBJ * obj, long n) /* Really possible to move backward BUF_SIZE/2 bytes? */ if (fpos < BUF_SIZE / 2 + obj->fd_bytes_read) { /* No, move less than */ - lseek_obj(obj, 0, SEEK_SET); + lseek_obj(obj, 0L, SEEK_SET); val_to_tabize = fpos - obj->fd_bytes_read; } else { /* Move backward BUF_SIZE/2 bytes */ lseek_obj(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read), SEEK_CUR); @@ -465,7 +465,7 @@ get_search_term(WINDOW *dialog, char *input, int height, int width) int fkey = 0; bool first = TRUE; int result = DLG_EXIT_UNKNOWN; - char *caption = _("Search"); + const char *caption = _("Search"); int len_caption = dlg_count_columns(caption); const int *indx; int limit; @@ -590,7 +590,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term) while ((found = match_string(obj, search_term)) == FALSE) { if (obj->begin_reached) break; - back_lines(obj, 2); + back_lines(obj, 2L); } } if (found == FALSE) { /* not found */ @@ -609,7 +609,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term) */ back_lines(obj, obj->page_length); } else { /* Search term found */ - back_lines(obj, 1); + back_lines(obj, 1L); } /* Reprint page */ wattrset(obj->text, dialog_attr); @@ -691,10 +691,10 @@ dialog_textbox(const char *title, const char *file, int height, int width) /* Get file size. Actually, 'file_size' is the real file size - 1, since it's only the last byte offset from the beginning */ - obj.file_size = lseek_obj(&obj, 0, SEEK_END); + obj.file_size = lseek_obj(&obj, 0L, SEEK_END); /* Restore file pointer to beginning of file after getting file size */ - lseek_obj(&obj, 0, SEEK_SET); + lseek_obj(&obj, 0L, SEEK_SET); read_high(&obj, BUF_SIZE); @@ -829,7 +829,7 @@ dialog_textbox(const char *title, const char *file, int height, int width) if (fpos > obj.fd_bytes_read) { /* Yes, we have to read it in */ - lseek_obj(&obj, 0, SEEK_SET); + lseek_obj(&obj, 0L, SEEK_SET); read_high(&obj, BUF_SIZE); } @@ -849,7 +849,7 @@ dialog_textbox(const char *title, const char *file, int height, int width) read_high(&obj, BUF_SIZE); } obj.in_buf = obj.bytes_read; - back_lines(&obj, PAGE_LENGTH); + back_lines(&obj, (long) PAGE_LENGTH); moved = TRUE; break; case DLGK_GRID_UP: /* Previous line */ |