Changeset 1258


Ignore:
Timestamp:
2000-06-30T12:46:17+12:00 (24 years ago)
Author:
nzdl
Message:

caught New_Config_Format-branch up with changes to trunk

Location:
branches/New_Config_Format-branch/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/New_Config_Format-branch/gsdl/src/recpt/documentaction.cpp

    r1084 r1258  
    2828/*
    2929   $Log$
     30   Revision 1.37.2.2  2000/06/30 00:46:16  nzdl
     31   caught New_Config_Format-branch up with changes to trunk
     32
    3033   Revision 1.37.2.1  2000/04/09 23:16:46  sjboddie
    3134   Added DocumentColumns stuff to New_Config_Format-branch branch
     
    181184#include "querytools.h"
    182185#include "unitool.h"
    183 #include "htmlutils.h"
     186#include "gsdltools.h"
    184187
    185188documentaction::documentaction () {
  • branches/New_Config_Format-branch/gsdl/src/recpt/formattools.cpp

    r1084 r1258  
    2828/*
    2929   $Log$
     30   Revision 1.20.2.2  2000/06/30 00:46:17  nzdl
     31   caught New_Config_Format-branch up with changes to trunk
     32
     33
     34   Revision 1.21  2000/06/30 00:40:39  sjboddie
     35   Tidied up a bit. Fixed bug in formattools. Nested If/Or's should now
     36   work within formatstrings.
     37
    3038   Revision 1.20.2.1  2000/04/09 23:16:48  sjboddie
    3139   Added DocumentColumns stuff to New_Config_Format-branch branch
     40
     41   Revision 1.20  2000/04/07 04:40:44  sjboddie
     42   Reverted back to old DocumentHeader, DocumentTitles, DocumentImages etc.
     43   from DocumentColumns stuff. I'll move the DocumentColumns stuff to a
     44   separate development branch (New_Config_Format-branch) for now. The plan
     45   is to redesign the configuration file format a bit and limit the number of
     46   distributions floating around that take different configuration formats).
    3247
    3348   Revision 1.19  2000/04/03 07:28:24  sjboddie
     
    102117#include "formattools.h"
    103118#include "cgiutils.h"
     119#include <assert.h>
    104120
    105121// a few function prototypes
     
    158174  while (here != end) {
    159175    if (*here != ' ') {
    160       if (*here == '<') {
     176      if ((*here == '<') && ((here+3) < end)) {
    161177    if ((*(here+1) == 't' || *(here+1) == 'T') &&
    162178        (*(here+2) == 'd' || *(here+2) == 'D') &&
     
    244260
    245261static void get_parent_options (text_t &instring, metadata_t &metaoption) {
     262
     263  assert (instring.size() > 7);
     264  if (instring.size() <= 7) return;
    246265
    247266  text_t meta, com, op;
     
    328347  while (here != end) {
    329348
    330     if (*here == '\\')
    331       text.push_back (*(++here));
    332 
    333     else if (*here == '{') {
     349    if (*here == '\\') {
     350      here ++;
     351      if (here != end) text.push_back (*here);
     352
     353    } else if (*here == '{') {
    334354      if (!text.empty()) {
    335355    formatlistptr->command = comText;
     
    438458
    439459    } else {
    440       // assume it's plain text
    441       or_ptr->command = comText;
    442       or_ptr->text = text;
     460      parse_string (text, or_ptr, metadata, getParents);
    443461    }
    444462    text.clear();
Note: See TracChangeset for help on using the changeset viewer.