Changeset 1257
- Timestamp:
- 2000-06-30T12:40:39+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/formattools.cpp
r1079 r1257 28 28 /* 29 29 $Log$ 30 Revision 1.21 2000/06/30 00:40:39 sjboddie 31 Tidied up a bit. Fixed bug in formattools. Nested If/Or's should now 32 work within formatstrings. 33 30 34 Revision 1.20 2000/04/07 04:40:44 sjboddie 31 35 Reverted back to old DocumentHeader, DocumentTitles, DocumentImages etc. … … 98 102 #include "formattools.h" 99 103 #include "cgiutils.h" 104 #include <assert.h> 100 105 101 106 // a few function prototypes … … 153 158 while (here != end) { 154 159 if (*here != ' ') { 155 if ( *here == '<') {160 if ((*here == '<') && ((here+3) < end)) { 156 161 if ((*(here+1) == 't' || *(here+1) == 'T') && 157 162 (*(here+2) == 'd' || *(here+2) == 'D') && … … 239 244 240 245 static void get_parent_options (text_t &instring, metadata_t &metaoption) { 246 247 assert (instring.size() > 7); 248 if (instring.size() <= 7) return; 241 249 242 250 text_t meta, com, op; … … 323 331 while (here != end) { 324 332 325 if (*here == '\\') 326 text.push_back (*(++here)); 327 328 else if (*here == '{') { 333 if (*here == '\\') { 334 here ++; 335 if (here != end) text.push_back (*here); 336 337 } else if (*here == '{') { 329 338 if (!text.empty()) { 330 339 formatlistptr->command = comText; … … 433 442 434 443 } else { 435 // assume it's plain text 436 or_ptr->command = comText; 437 or_ptr->text = text; 444 parse_string (text, or_ptr, metadata, getParents); 438 445 } 439 446 text.clear();
Note:
See TracChangeset
for help on using the changeset viewer.