[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev one more (patch9)
From: |
Leonid Pauzner |
Subject: |
lynx-dev one more (patch9) |
Date: |
Sun, 27 Oct 2002 06:41:50 +0300 (MSK) |
remove obsolete next_anchor() function.
[GridText.c]
--- gridtext.c~ Sun Oct 27 05:58:04 2002
+++ gridtext.c Sun Oct 27 06:07:06 2002
@@ -1782,19 +1782,6 @@ PRIVATE void display_scrollbar ARGS1(
#define display_scrollbar(text) /*nothing*/
#endif /* USE_SCROLLBAR */
-/*
- * Utility to let us use for-loops on the anchor-pointers.
- */
-PRIVATE TextAnchor * next_anchor ARGS2(
- HText *, text,
- TextAnchor *, anchor_ptr)
-{
- if (anchor_ptr == text->last_anchor)
- anchor_ptr = NULL;
- else
- anchor_ptr = anchor_ptr->next;
- return anchor_ptr;
-}
/* Output a page
** -------------
@@ -1859,9 +1846,8 @@ PRIVATE void display_page ARGS3(
* an xterm is temporarily made very small. - kw */
return;
}
- last_screen = text->Lines - (display_lines - 2);
- line = text->last_line->prev;
+ last_screen = text->Lines - (display_lines - 2);
/*
* Constrain the line number to be within the document.
*/
@@ -2136,7 +2122,7 @@ PRIVATE void display_page ARGS3(
nlinks = 0;
for (Anchor_ptr = text->first_anchor;
Anchor_ptr != NULL && Anchor_ptr->line_num <= stop_before_for_anchors;
- Anchor_ptr = next_anchor(text, Anchor_ptr)) {
+ Anchor_ptr = Anchor_ptr->next) {
if (Anchor_ptr->line_num >= line_number
&& Anchor_ptr->line_num < stop_before_for_anchors) {
@@ -3282,11 +3268,10 @@ PRIVATE void split_line ARGS2(
if (!a2)
a2 = text->first_anchor;
else
- a2 = next_anchor(text, a2); /* 1st anchor on line we justify */
+ a2 = a2->next; /* 1st anchor on line we justify */
- if (a2)
- for (; a2 && a2->line_num <= text->Lines-1;
- last_anchor_of_previous_line = a2, a2 = a2->next);
+ for (; a2 && a2->line_num <= text->Lines-1;
+ last_anchor_of_previous_line = a2, a2 = a2->next);
}
} else {
if (REALLY_CAN_JUSTIFY(text) ) {
@@ -5638,7 +5623,7 @@ PRIVATE void HText_trimHightext ARGS3(
*/
for (anchor_ptr = text->first_anchor;
anchor_ptr != NULL;
- prev_a = anchor_ptr, anchor_ptr = next_anchor(text, anchor_ptr)) {
+ prev_a = anchor_ptr, anchor_ptr = anchor_ptr->next) {
int have_soft_newline_in_1st_line = 0;
re_parse:
/*
@@ -6265,7 +6250,7 @@ PUBLIC BOOL HText_TAHasMoreLines ARGS2(
}
return NO;
} else {
- for (a = HTMainText->first_anchor; a; a = next_anchor(HTMainText, a)) {
+ for (a = HTMainText->first_anchor; a; a = a->next) {
if (a->link_type == INPUT_ANCHOR &&
links[curlink].l_form == a->input_field) {
return same_anchors(a, a->next, TRUE);
@@ -6876,7 +6861,7 @@ PUBLIC int HText_LinksInLines ARGS3(
for (Anchor_ptr = text->first_anchor;
Anchor_ptr != NULL && Anchor_ptr->line_num <= end;
- Anchor_ptr = next_anchor(text, Anchor_ptr)) {
+ Anchor_ptr = Anchor_ptr->next) {
if (Anchor_ptr->line_num >= start &&
Anchor_ptr->line_num < end &&
Anchor_ptr->show_anchor &&
@@ -8836,7 +8821,7 @@ PUBLIC void HText_endForm ARGS1(
/*
* Go through list of anchors and get our input field. -FM
*/
- for (a = text->first_anchor; a != NULL; a = next_anchor(text, a)) {
+ for (a = text->first_anchor; a != NULL; a = a->next) {
if (a->link_type == INPUT_ANCHOR &&
a->input_field->number == HTFormNumber &&
a->input_field->type == F_TEXT_TYPE) {
@@ -9328,7 +9313,7 @@ PUBLIC int HText_beginInput ARGS3(
} else {
TextAnchor * b;
int i2 = 0;
- for (b = text->first_anchor; b != NULL; b = next_anchor(text, b)) {
+ for (b = text->first_anchor; b != NULL; b = b->next) {
if (b->link_type == INPUT_ANCHOR &&
b->input_field->type == F_RADIO_TYPE &&
b->input_field->number == HTFormNumber) {
@@ -10152,7 +10137,7 @@ PUBLIC int HText_SubmitForm ARGS4(
*/
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type != INPUT_ANCHOR)
continue;
@@ -10304,7 +10289,7 @@ PUBLIC int HText_SubmitForm ARGS4(
*/
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type != INPUT_ANCHOR)
continue;
@@ -10883,7 +10868,7 @@ PUBLIC void HText_DisableCurrentForm NOA
*/
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type == INPUT_ANCHOR &&
anchor_ptr->input_field->number == HTFormNumber) {
@@ -10908,7 +10893,7 @@ PUBLIC void HText_ResetForm ARGS1(
*/
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type == INPUT_ANCHOR) {
if (anchor_ptr->input_field->number == form->number) {
@@ -10957,7 +10942,7 @@ PUBLIC BOOLEAN HText_HaveUserChangedForm
*/
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type == INPUT_ANCHOR) {
if (anchor_ptr->input_field->type == F_RADIO_TYPE ||
@@ -10998,7 +10983,7 @@ PUBLIC void HText_activateRadioButton AR
return;
for (anchor_ptr = HTMainText->first_anchor;
anchor_ptr != NULL;
- anchor_ptr = next_anchor(HTMainText, anchor_ptr)) {
+ anchor_ptr = anchor_ptr->next) {
if (anchor_ptr->link_type == INPUT_ANCHOR &&
anchor_ptr->input_field->type == F_RADIO_TYPE) {
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev one more (patch9),
Leonid Pauzner <=