freebsd-ports/x11-toolkits/iv/files/patch-bx
Seigo Tanimura bf57334ca0 - Update to 3.2a.
- The maintainer is now a committer.

Reviewed by:	Kim Culhan <kimc@w8hd.org>
2000-01-25 02:35:00 +00:00

143 lines
4.8 KiB
Plaintext

--- src/bin/doc/DocViewer.c.org Thu Nov 26 13:46:57 1992
+++ src/bin/doc/DocViewer.c Sun Jan 23 19:55:09 2000
@@ -434,7 +434,8 @@
ps->resize(a.left(), a.bottom(), a.right(), a.top());
long current_page = _current_page;
long count = _page_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ps->page(_page_info->item_ref(i)._label);
page_to(i);
_page_patch->print(ps, a);
@@ -601,7 +602,8 @@
void DocumentViewer::pin (const char* name) {
long count = _pinned_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerPinnedInfo& m = _pinned_info->item_ref(i);
if (strcmp(m._name, name) == 0) {
break;
@@ -634,7 +636,8 @@
void DocumentViewer::unpin (const char* name) {
long count = _pinned_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerPinnedInfo& m = _pinned_info->item_ref(i);
if (strcmp(m._name, name) == 0) {
break;
@@ -652,7 +655,8 @@
void DocumentViewer::menubar (const char* name) {
choose(nil, false);
long count = _menu_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerMenuInfo& m = _menu_info->item_ref(i);
if (strcmp(m._name, name) == 0) {
break;
@@ -675,7 +679,8 @@
void DocumentViewer::keymap (const char* name) {
long count = _keymap_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerKeymapInfo& info = _keymap_info->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -699,7 +704,8 @@
const char* name, const Color*& overlay, const Color*& underlay
) {
long count = _color_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerColorInfo& info = _color_info->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -767,7 +773,8 @@
void DocumentViewer::float_removed (Item* item) {
long count = _float_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
if (_float_info->item_ref(i)._item == item) {
break;
}
@@ -783,7 +790,8 @@
void DocumentViewer::float_changed (Item* item) {
long count = _float_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
if (_float_info->item_ref(i)._item == item) {
break;
}
@@ -798,7 +806,8 @@
void DocumentViewer::float_adjusted (Item* item, float x, float y, long p) {
Session::instance()->default_display()->flush();
long count = _float_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
if (_float_info->item_ref(i)._item == item) {
break;
}
@@ -909,6 +918,7 @@
Style* style = kit.style();
const Color* fg = kit.foreground();
char label[10];
+ long i;
while (_page_info->count() < page_count) {
ViewerPageInfo info;
_document->format_counter(
@@ -954,7 +964,7 @@
LRComposition* comp = new LRComposition(
layout.vbox_first_aligned(), new SimpleCompositor(), nil, width
);
- for (long i = 0; i < page_count; ++i) {
+ for (i = 0; i < page_count; ++i) {
ViewerPageInfo& info = _page_info->item_ref(i);
char command [20];
sprintf(command, "page %d", i);
@@ -980,10 +990,11 @@
page = Math::max(0L, page);
page = Math::min(page_count-1, page);
if (page != _current_page) {
+ long i;
_current_page = page;
_pages->flip_to(_current_page * 2);
_view->view_page(_current_page * 2);
- for (long i = 0; i < page_count; ++i) {
+ for (i = 0; i < page_count; ++i) {
ViewerPageInfo& info = _page_info->item_ref(i);
info._telltale->choose(i == _current_page);
}
@@ -1024,7 +1035,8 @@
) {
Coord top = t;
long count = _float_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerFloatInfo& info = _float_info->item_ref(i);
if (info._page == page/2 || info._page == -2 && page > 0) {
Allotment ax, ay;
@@ -1049,7 +1061,8 @@
) {
Coord bottom = b;
long count = _float_info->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
ViewerFloatInfo& info = _float_info->item_ref(i);
if (info._page == page/2 || info._page == -2 && page > 0) {
Allotment ax, ay;