| 1420 | ****************************************************************************/ |
| 1421 | |
| 1422 | static void print_default(struct default_s *defp, output_t outfunc) |
| 1423 | { |
| 1424 | struct default_item_s *item; |
| 1425 | int i; |
| 1426 | |
| 1427 | /* Check if there are any default value */ |
| 1428 | |
| 1429 | if (defp->d_nitems > 0) |
| 1430 | { |
| 1431 | /* Yes, output the defaults differently if there is only one */ |
| 1432 | |
| 1433 | if (defp->d_nitems == 1) |
| 1434 | { |
| 1435 | /* Output the Default */ |
| 1436 | |
| 1437 | item = &defp->d_item[0]; |
| 1438 | outfunc(" <li>\n"); |
| 1439 | outfunc(" <i>Default</i>: %s\n", item->d_default); |
| 1440 | |
| 1441 | /* Output the dependency */ |
| 1442 | |
| 1443 | if (item->d_dependency) |
| 1444 | { |
| 1445 | outfunc(" <p>\n"); |
| 1446 | outfunc(" <i>Dependency:</i>\n"); |
| 1447 | outfunc(" %s\n", htmlize_expression(item->d_dependency)); |
| 1448 | outfunc(" </p>\n"); |
| 1449 | } |
| 1450 | |
| 1451 | outfunc(" </li>\n"); |
| 1452 | } |
| 1453 | else |
| 1454 | { |
| 1455 | /* Output a sub-list of defaults. */ |
| 1456 | |
| 1457 | outfunc(" <li>\n"); |
| 1458 | outfunc(" <i>Default Values</i>:\n"); |
| 1459 | outfunc(" <ul>\n"); |
| 1460 | |
| 1461 | for (i = 0; i < defp->d_nitems; i++) |
| 1462 | { |
| 1463 | /* Output the Default */ |
| 1464 | |
| 1465 | item = &defp->d_item[i]; |
| 1466 | outfunc(" <li>\n"); |
| 1467 | outfunc(" <i>Default</i>: %s\n", item->d_default); |
| 1468 | |
| 1469 | /* Output the dependency */ |
| 1470 | |
| 1471 | if (item->d_dependency) |
| 1472 | { |
| 1473 | outfunc(" <p>\n"); |
| 1474 | outfunc(" <i>Dependency:</i>\n"); |
| 1475 | outfunc(" %s\n", |
| 1476 | htmlize_expression(item->d_dependency)); |
| 1477 | outfunc(" </p>\n"); |
| 1478 | } |
| 1479 | } |
no test coverage detected