Changeset 5462:7e6d98886cce for doc
- Timestamp:
- 2008-07-21 02:42:27 (4 months ago)
- Branch:
- HEAD
- Files:
-
- 1 modified
-
doc/makedoc.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/makedoc.c
r5306 r5462 77 77 #define D_DD (1 << 8) 78 78 #define D_PA (1 << 9) 79 #define D_IL (1 << 10) 79 80 80 81 enum … … 94 95 SP_END_DD, 95 96 SP_END_DL, 97 SP_START_IL, 98 SP_END_IL, 96 99 SP_END_SECT, 97 100 SP_REFER … … 734 737 ** - .dd starts a definition in a definition list. 735 738 ** - .de on a line finishes a definition list. 739 ** - .il on a line starts an itemzied list 740 ** - .dd starts an item in an itemized list 741 ** - .ie on a line finishes an itemized list 736 742 ** - .ts on a line starts a "tscreen" environment (name taken from SGML). 737 743 ** - .te on a line finishes this environment. … … 851 857 case SP_DD: 852 858 { 859 if (docstat & D_IL) 860 fputs ("- ", out); 853 861 Continuation = 0; 854 862 break; … … 858 866 Continuation = 0; 859 867 docstat &= ~D_DL; 868 break; 869 } 870 case SP_START_IL: 871 { 872 docstat |= D_IL; 873 break; 874 } 875 case SP_END_IL: 876 { 877 Continuation = 0; 878 docstat &= ~D_IL; 860 879 break; 861 880 } … … 960 979 case SP_DD: 961 980 { 962 fputs ("\n", out); 981 if (docstat & D_IL) 982 fputs (".TP\n\\(hy ", out); 983 else 984 fputs ("\n", out); 963 985 break; 964 986 } 965 987 case SP_END_DL: 988 { 989 fputs (".RE\n.PD 1", out); 990 docstat &= ~D_DL; 991 break; 992 } 993 case SP_START_IL: 994 { 995 fputs (".RS\n.PD 0\n", out); 996 docstat |= D_IL; 997 break; 998 } 999 case SP_END_IL: 966 1000 { 967 1001 fputs (".RE\n.PD 1", out); … … 1088 1122 { 1089 1123 docstat |= D_DD; 1090 fputs ("</term>\n<listitem><para>", out); 1124 if (docstat & D_DL) 1125 fputs("</term>\n", out); 1126 fputs ("<listitem><para>", out); 1091 1127 break; 1092 1128 } … … 1094 1130 { 1095 1131 docstat &= ~D_DD; 1096 fputs ("</para></listitem></varlistentry>\n", out); 1132 fputs ("</para></listitem>", out); 1133 if (docstat & D_DL) 1134 fputs("</varlistentry>\n", out); 1097 1135 break; 1098 1136 } … … 1100 1138 { 1101 1139 fputs ("</para></listitem></varlistentry></variablelist>\n", out); 1140 docstat &= ~(D_DD|D_DL); 1141 break; 1142 } 1143 case SP_START_IL: 1144 { 1145 fputs ("\n<itemizedlist>\n", out); 1146 docstat |= D_IL; 1147 break; 1148 } 1149 case SP_END_IL: 1150 { 1151 fputs ("</para></listitem></itemizedlist>\n", out); 1102 1152 docstat &= ~(D_DD|D_DL); 1103 1153 break; … … 1184 1234 else if (!strncmp (l, ".de", 3)) 1185 1235 return print_it (SP_END_DL, NULL, out, docstat); 1236 else if (!strncmp (l, ".il", 3)) 1237 return print_it (SP_START_IL, NULL, out, docstat); 1238 else if (!strncmp (l, ".ie", 3)) 1239 return print_it (SP_END_IL, NULL, out, docstat); 1186 1240 else if (!strncmp (l, ". ", 2)) 1187 1241 *l = ' '; … … 1230 1284 else if (!strncmp (s, ".dd", 3)) 1231 1285 { 1286 if ((docstat & D_IL) && (docstat & D_DD)) 1287 { 1288 docstat = commit_buff (buff, &d, out, docstat); 1289 docstat = print_it (SP_END_DD, NULL, out, docstat); 1290 } 1232 1291 docstat = commit_buff (buff, &d, out, docstat); 1233 1292 docstat = print_it (SP_DD, NULL, out, docstat);
