fix indent
This commit is contained in:
36
form.c
36
form.c
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: form.c,v 1.16 2002/11/05 16:03:14 ukai Exp $ */
|
/* $Id: form.c,v 1.17 2002/11/05 16:43:09 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* HTML forms
|
* HTML forms
|
||||||
*/
|
*/
|
||||||
@@ -708,23 +708,24 @@ add_pre_form_item(struct pre_form *pf, struct pre_form_item *prev, int type,
|
|||||||
new->name = name;
|
new->name = name;
|
||||||
new->value = value;
|
new->value = value;
|
||||||
if (checked && *checked && (!strcmp(checked, "0") ||
|
if (checked && *checked && (!strcmp(checked, "0") ||
|
||||||
strcasecmp(checked, "off") || !strcasecmp(checked, "no")))
|
strcasecmp(checked, "off")
|
||||||
new->checked = 0;
|
|| !strcasecmp(checked, "no")))
|
||||||
|
new->checked = 0;
|
||||||
else
|
else
|
||||||
new->checked = 1;
|
new->checked = 1;
|
||||||
new->next = NULL;
|
new->next = NULL;
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
url <url> [<action>]
|
* url <url> [<action>]
|
||||||
text <name> <value>
|
* text <name> <value>
|
||||||
file <name> <value>
|
* file <name> <value>
|
||||||
passwd <name> <value>
|
* passwd <name> <value>
|
||||||
checkbox <name> <value> [<checked>]
|
* checkbox <name> <value> [<checked>]
|
||||||
radio <name> <value>
|
* radio <name> <value>
|
||||||
submit [<name>]
|
* submit [<name>]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
loadPreForm(void)
|
loadPreForm(void)
|
||||||
@@ -796,7 +797,7 @@ preFormUpdateBuffer(Buffer *buf)
|
|||||||
|
|
||||||
if (!buf || !buf->formitem || !PreForm)
|
if (!buf || !buf->formitem || !PreForm)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (pf = PreForm; pf; pf = pf->next) {
|
for (pf = PreForm; pf; pf = pf->next) {
|
||||||
if (Strcmp(parsedURL2Str(&buf->currentURL), parsedURL2Str(&pf->url)))
|
if (Strcmp(parsedURL2Str(&buf->currentURL), parsedURL2Str(&pf->url)))
|
||||||
continue;
|
continue;
|
||||||
@@ -804,15 +805,16 @@ preFormUpdateBuffer(Buffer *buf)
|
|||||||
a = &buf->formitem->anchors[i];
|
a = &buf->formitem->anchors[i];
|
||||||
fi = (FormItemList *)a->url;
|
fi = (FormItemList *)a->url;
|
||||||
fl = fi->parent;
|
fl = fi->parent;
|
||||||
if (pf->action && (!fl->action || Strcmp_charp(fl->action, pf->action)))
|
if (pf->action
|
||||||
continue;
|
&& (!fl->action || Strcmp_charp(fl->action, pf->action)))
|
||||||
|
continue;
|
||||||
for (pi = pf->item; pi; pi = pi->next) {
|
for (pi = pf->item; pi; pi = pi->next) {
|
||||||
if (pi->type != fi->type)
|
if (pi->type != fi->type)
|
||||||
continue;
|
continue;
|
||||||
if (pi->type == FORM_INPUT_SUBMIT) {
|
if (pi->type == FORM_INPUT_SUBMIT) {
|
||||||
if (!pi->name || !*pi->name ||
|
if (!pi->name || !*pi->name ||
|
||||||
(fi->name && !Strcmp_charp(fi->name, pi->name)))
|
(fi->name && !Strcmp_charp(fi->name, pi->name)))
|
||||||
buf->submit = a;
|
buf->submit = a;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!pi->name || !fi->name || Strcmp_charp(fi->name, pi->name))
|
if (!pi->name || !fi->name || Strcmp_charp(fi->name, pi->name))
|
||||||
@@ -833,7 +835,7 @@ preFormUpdateBuffer(Buffer *buf)
|
|||||||
break;
|
break;
|
||||||
case FORM_INPUT_RADIO:
|
case FORM_INPUT_RADIO:
|
||||||
if (pi->value && fi->value &&
|
if (pi->value && fi->value &&
|
||||||
!Strcmp_charp(fi->value, pi->value))
|
!Strcmp_charp(fi->value, pi->value))
|
||||||
formRecheckRadio(a, buf, fi);
|
formRecheckRadio(a, buf, fi);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
6
table.c
6
table.c
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: table.c,v 1.28 2002/11/05 15:45:53 ukai Exp $ */
|
/* $Id: table.c,v 1.29 2002/11/05 16:43:10 ukai Exp $ */
|
||||||
/*
|
/*
|
||||||
* HTML table
|
* HTML table
|
||||||
*/
|
*/
|
||||||
@@ -1542,7 +1542,7 @@ check_table_height(struct table *t)
|
|||||||
cell.rowspan[cell.maxcell] = rowspan;
|
cell.rowspan[cell.maxcell] = rowspan;
|
||||||
cell.height[cell.maxcell] = 0;
|
cell.height[cell.maxcell] = 0;
|
||||||
if (cell.maxcell > k) {
|
if (cell.maxcell > k) {
|
||||||
int ii;
|
int ii;
|
||||||
for (ii = k; ii < cell.maxcell; ii++)
|
for (ii = k; ii < cell.maxcell; ii++)
|
||||||
cell.indexarray[ii + 1] = cell.indexarray[ii];
|
cell.indexarray[ii + 1] = cell.indexarray[ii];
|
||||||
}
|
}
|
||||||
@@ -2659,7 +2659,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
|
|||||||
cell->minimum_width[cell->maxcell] = 0;
|
cell->minimum_width[cell->maxcell] = 0;
|
||||||
cell->fixed_width[cell->maxcell] = 0;
|
cell->fixed_width[cell->maxcell] = 0;
|
||||||
if (cell->maxcell > k) {
|
if (cell->maxcell > k) {
|
||||||
int ii;
|
int ii;
|
||||||
for (ii = k; ii < cell->maxcell; ii++)
|
for (ii = k; ii < cell->maxcell; ii++)
|
||||||
cell->index[ii + 1] = cell->index[ii];
|
cell->index[ii + 1] = cell->index[ii];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user