(root)/
gcc-13.2.0/
gcc/
m2/
pge-boot/
GOutput.h
       1  /* do not edit automatically generated by mc from Output.  */
       2  /* Output.def redirect output.
       3  
       4  Copyright (C) 2021-2023 Free Software Foundation, Inc.
       5  Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
       6  
       7  This file is part of GNU Modula-2.
       8  
       9  GNU Modula-2 is free software; you can redistribute it and/or modify
      10  it under the terms of the GNU General Public License as published by
      11  the Free Software Foundation; either version 3, or (at your option)
      12  any later version.
      13  
      14  GNU Modula-2 is distributed in the hope that it will be useful, but
      15  WITHOUT ANY WARRANTY; without even the implied warranty of
      16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17  General Public License for more details.
      18  
      19  You should have received a copy of the GNU General Public License
      20  along with GNU Modula-2; see the file COPYING3.  If not see
      21  <http://www.gnu.org/licenses/>.  */
      22  
      23  
      24  #if !defined (_Output_H)
      25  #   define _Output_H
      26  
      27  #include "config.h"
      28  #include "system.h"
      29  #   ifdef __cplusplus
      30  extern "C" {
      31  #   endif
      32  #   if !defined (PROC_D)
      33  #      define PROC_D
      34         typedef void (*PROC_t) (void);
      35         typedef struct { PROC_t proc; } PROC;
      36  #   endif
      37  
      38  #   include "GNameKey.h"
      39  #   include "GDynamicStrings.h"
      40  
      41  #   if defined (_Output_C)
      42  #      define EXTERN
      43  #   else
      44  #      define EXTERN extern
      45  #   endif
      46  
      47  
      48  /*
      49     Open - attempt to open filename as the output file.
      50            TRUE is returned if success, FALSE otherwise.
      51  */
      52  
      53  EXTERN unsigned int Output_Open (const char *filename_, unsigned int _filename_high);
      54  
      55  /*
      56     Close - close the output file.
      57  */
      58  
      59  EXTERN void Output_Close (void);
      60  
      61  /*
      62     Write - write a single character to the output file.
      63  */
      64  
      65  EXTERN void Output_Write (char ch);
      66  
      67  /*
      68     WriteString - write an unformatted string to the output.
      69  */
      70  
      71  EXTERN void Output_WriteString (const char *s_, unsigned int _s_high);
      72  
      73  /*
      74     KillWriteS - write a string to the output and free the string afterwards.
      75  */
      76  
      77  EXTERN void Output_KillWriteS (DynamicStrings_String s);
      78  
      79  /*
      80     WriteS - write a string to the output.  The string is not freed.
      81  */
      82  
      83  EXTERN void Output_WriteS (DynamicStrings_String s);
      84  
      85  /*
      86     WriteKey - write a key to the output.
      87  */
      88  
      89  EXTERN void Output_WriteKey (NameKey_Name key);
      90  
      91  /*
      92     WriteLn - write a newline to the output.
      93  */
      94  
      95  EXTERN void Output_WriteLn (void);
      96  
      97  /*
      98     WriteCard - write a cardinal using fieldlength characters.
      99  */
     100  
     101  EXTERN void Output_WriteCard (unsigned int card, unsigned int fieldlength);
     102  
     103  /*
     104     StartBuffer - create a buffer into which any output is redirected.
     105  */
     106  
     107  EXTERN void Output_StartBuffer (void);
     108  
     109  /*
     110     EndBuffer - end the redirection and return the contents of the buffer.
     111  */
     112  
     113  EXTERN DynamicStrings_String Output_EndBuffer (void);
     114  #   ifdef __cplusplus
     115  }
     116  #   endif
     117  
     118  #   undef EXTERN
     119  #endif