Changeset 6021


Ignore:
Timestamp:
2003-11-28T16:40:56+13:00 (20 years ago)
Author:
sjboddie
Message:

Added an unloaddefaultmacros() function to displayclass to allow us to
unload all the macros before reloading them again from the macro files.

Location:
trunk/gsdl/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/display.cpp

    r3012 r6021  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
    24  * $Id$
    25  *
    2624 *********************************************************************/
    2725
    28 /*
    29    $Log$
    30    Revision 1.26  2002/02/26 23:01:31  jrm21
    31    istream.get(char&) caused funny problems with gcc3 so they've been replaced
    32    with char=istream.get() instead.
    33 
    34    Revision 1.25  2002/02/12 22:46:47  jrm21
    35    Allow nested _If_ macros. We now count '(' and ')' characters, so you can now
    36    do _If_(_foo_, _If_(_bar_,FOOBAR,FOONOBAR), _If_(_bar_,NOFOOBAR,NOFOONOBAR) )
    37    inside a macro file. If you want to display a bracket, you can escape it.
    38    Previously we had assumed that a ',' marked the end of a toplevel argument.
    39 
    40    Revision 1.24  2001/01/25 18:26:44  cs025
    41    Included CORBA branch for first time
    42 
    43    Revision 1.17.2.1  2000/04/04 15:02:28  cs025
    44    Corba first commit
    45 
    46    Revision 1.17  2000/02/29 21:00:38  sjboddie
    47    fixed some compiler warnings
    48 
    49    Revision 1.16  1999/11/25 21:53:08  sjboddie
    50    fixed bug in logout
    51 
    52    Revision 1.15  1999/09/24 02:25:35  rjmcnab
    53    removed limitation on the number of arguments that a macro can have
    54 
    55    Revision 1.14  1999/09/07 04:57:41  sjboddie
    56    added gpl notice
    57 
    58    Revision 1.13  1999/08/31 07:59:11  rjmcnab
    59    Generalised spaces to unicode spaces, added ability to automatically detect
    60    whether the input file is Unicode or UTF-8 and read the file in the
    61    appropriate way, and improved the error messages slightly.
    62 
    63    Revision 1.12  1999/07/21 20:46:12  rjmcnab
    64    fixed small bug
    65 
    66    Revision 1.11  1999/07/21 07:26:30  rjmcnab
    67    Added more operators to _If_, changed quoting of parameters so that
    68    ' can be used to quote but it is removed, and made slight optimisation
    69    so that macros that don't contain other macros aren't expanded.
    70 
    71    Revision 1.10  1999/03/01 20:39:54  sjboddie
    72 
    73    Added eq and ne functionality to _If_
    74 
    75    Revision 1.9  1999/03/01 01:18:09  sjboddie
    76 
    77    Fixed bug in _If_ when value being tested was only one character
    78    long (e.g. "0" or "1")
    79 
    80    Revision 1.8  1999/02/28 23:15:29  rjmcnab
    81 
    82    Made _If_ recognise 'false' and '0' as being false.
    83 
    84    Revision 1.7  1999/02/08 01:26:11  rjmcnab
    85 
    86    Improved the error reporting.
    87 
    88    Revision 1.6  1999/01/19 08:30:23  rjmcnab
    89 
    90    Added a method to determine whether a macro has been defined.
    91 
    92    Revision 1.5  1999/01/19 01:38:12  rjmcnab
    93 
    94    Made the source more portable.
    95 
    96    Revision 1.4  1999/01/12 01:50:57  rjmcnab
    97 
    98    Standard header.
    99 
    100    Revision 1.3  1999/01/08 02:33:13  rjmcnab
    101 
    102    Added standard header to source files.
    103 
    104  */
    10526#include "display.h"
    10627#include "gsdlunicode.h"
     
    661582  outc = NULL;
    662583
    663   logout = &cerr;
     584  logout = NULL;
    664585}
    665586
     
    985906}
    986907
     908void displayclass::unloaddefaultmacros () {
     909  defaultmacros->clear();
     910}
    987911
    988912// prepares to create a page.
  • trunk/gsdl/lib/display.h

    r3012 r6021  
    185185  //        -1 an error occurred while trying to load the file
    186186  int loaddefaultmacros (text_t thisfilename);
     187
     188  // unloads all default macros
     189  void unloaddefaultmacros ();
    187190 
    188191  // prepares to create a page: deletes all macros set with
     
    216219  // say where any error logging goes, this can be NULL
    217220  // if no error logging is desired - returns previous value
    218   ostream *setlogout (ostream *thelogout);
     221  ostream *displayclass::setlogout (ostream *thelogout);
    219222
    220223  // debug stuff
Note: See TracChangeset for help on using the changeset viewer.