1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/x11-toolkits/iv/files/patch-bw
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

233 lines
7.2 KiB
Plaintext

--- src/bin/doc/Document.c.org Tue Mar 16 03:10:24 1993
+++ src/bin/doc/Document.c Sun Jan 23 19:52:26 2000
@@ -450,7 +450,8 @@
return nil;
} else {
long count = _families->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
FontFamilyInfo& info = _families->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -581,7 +582,8 @@
info._page = -3;
touch(true);
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& vinfo = _viewer->item_ref(i);
vinfo._viewer->float_inserted(item);
}
@@ -590,7 +592,8 @@
void Document::remove_float (Item* item) {
touch(true);
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& info = _viewer->item_ref(i);
info._viewer->float_removed(item);
}
@@ -603,7 +606,8 @@
FloatInfo& info = _float->item_ref(find_float(item));
touch(true);
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& viewer = _viewer->item_ref(i);
viewer._viewer->float_changed(item);
}
@@ -616,7 +620,8 @@
info._page = page;
touch(true);
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& info = _viewer->item_ref(i);
info._viewer->float_adjusted(item, x, y, page);
}
@@ -656,7 +661,8 @@
if (!dot && *p == '.') {
dot = true;
} else if (!isdigit(*p)) {
- int i = p - v.string();
+ int i;
+ i = p - v.string();
units.set_to_right(i);
v.set_to_left(i);
if (!v.convert(f)) {
@@ -1390,10 +1396,11 @@
}
long Document::parse_text (const char* buffer) {
+ long i;
if (buffer == nil) {
return 0;
}
- for (long i = 0; text_map[i]._format != nil; ++i) {
+ for (i = 0; text_map[i]._format != nil; ++i) {
if (strcmp(buffer, text_map[i]._format) == 0) {
return text_map[i]._code;
}
@@ -1523,7 +1530,8 @@
done = true;
} else {
int length = strlen(line);
- for (int i = 0; i < length; ++i) {
+ int i;
+ for (i = 0; i < length; ++i) {
index = text->insert(index, line[i], style, source, nil);
}
index = text->insert(index, '\n', style, source, nil);
@@ -1538,6 +1546,7 @@
) {
SourceInfo& info = _source->item_ref(source);
if (info._source._editable) {
+ long i;
if (info._style != style) {
char buffer[100];
unparse_style(buffer, style, info._style);
@@ -1545,7 +1554,7 @@
}
out << "%\n\\begin{verbatim}\n";
column = 0;
- for (long i = index; i < index + count; ++i) {
+ for (i = index; i < index + count; ++i) {
out.put(char(text->item_code(i)));
}
out << "\\end{verbatim}%\n";
@@ -1570,7 +1579,8 @@
file.getline(line, 1000);
if (file) {
int length = strlen(line);
- for (int i = 0; i < length; ++i) {
+ int i;
+ for (i = 0; i < length; ++i) {
index = text->insert(index, line[i], style, source, nil);
}
index = text->insert(index, '\n', style, source, nil);
@@ -1937,7 +1947,8 @@
void Document::step (const char* counter, const char* context) {
long count = _counter->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
CounterInfo& info = _counter->item_ref(i);
if (strcmp(info._name, counter) == 0) {
info._value += 1;
@@ -1976,7 +1987,8 @@
info._viewer = viewer;
_viewer->append(info);
long count = _float->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
FloatInfo& info = _float->item_ref(i);
viewer->float_inserted(info._item);
viewer->float_adjusted(info._item, info._x, info._y, info._page);
@@ -1986,7 +1998,8 @@
void Document::detach (DocumentViewer* viewer) {
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& info = _viewer->item_ref(i);
if (info._viewer == viewer) {
_viewer->remove(i);
@@ -1998,7 +2011,8 @@
void Document::notify () {
while (_body != nil && _relabel) {
long count = _counter->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
CounterInfo& info = _counter->item_ref(i);
info._value = info._initial;
}
@@ -2006,7 +2020,8 @@
_body->label("");
}
long count = _viewer->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentViewerInfo& info = _viewer->item_ref(i);
info._viewer->update();
}
@@ -2062,7 +2077,8 @@
char screenfont[100];
strcpy(screenfont, style._style._font);
long len = strlen(screenfont);
- for (long i = 0; i < len; ++i) {
+ long i;
+ for (i = 0; i < len; ++i) {
if (isupper(screenfont[i])) {
screenfont[i] += 'a' - 'A';
}
@@ -2277,7 +2293,8 @@
long Document::find_macro (const char* name) {
long count = _macro->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
MacroInfo& info = _macro->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -2314,7 +2331,8 @@
long Document::find_counter (const char* name) {
long count = _counter->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
CounterInfo& info = _counter->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -2365,7 +2383,8 @@
long Document::find_parameter (const char* name) {
long count = _parameter->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
DocumentParameterInfo& info = _parameter->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -2406,7 +2425,8 @@
long Document::find_label (const char* name) {
long count = _label->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
LabelInfo& info = _label->item_ref(i);
if (strcmp(info._name, name) == 0) {
break;
@@ -2447,7 +2467,8 @@
long Document::find_float (Item* item) {
long count = _float->count();
- for (long i = 0; i < count; ++i) {
+ long i;
+ for (i = 0; i < count; ++i) {
FloatInfo& info = _float->item_ref(i);
if (info._item == item) {
break;
@@ -2578,7 +2599,8 @@
return COMMAND;
}
} else if (isdigit(c)) {
- int i = c - '0';
+ int i;
+ i = c - '0';
if (isdigit(c = in.get())) {
i = i * 8 + (c - '0');
} else {