home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gnat-2.06-src.tgz / tar.out / fsf / gnat / ada / output.ads < prev    next >
Text File  |  1996-09-28  |  5KB  |  106 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                               O U T P U T                                --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.19 $                             --
  10. --                                                                          --
  11. --        Copyright (c) 1992,1993,1994,1995 NYU, All Rights Reserved        --
  12. --                                                                          --
  13. -- The GNAT library is free software; you can redistribute it and/or modify --
  14. -- it under terms of the GNU Library General Public License as published by --
  15. -- the Free Software  Foundation; either version 2, or (at your option) any --
  16. -- later version.  The GNAT library is distributed in the hope that it will --
  17. -- be useful, but WITHOUT ANY WARRANTY;  without even  the implied warranty --
  18. -- of MERCHANTABILITY  or  FITNESS FOR  A PARTICULAR PURPOSE.  See the  GNU --
  19. -- Library  General  Public  License for  more  details.  You  should  have --
  20. -- received  a copy of the GNU  Library  General Public License  along with --
  21. -- the GNAT library;  see the file  COPYING.LIB.  If not, write to the Free --
  22. -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.        --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with GNAT.OS_Lib; use GNAT.OS_Lib;
  27. with Types;       use Types;
  28.  
  29. package Output is
  30.  
  31. --  This package contains low level output routines used by the compiler
  32.  
  33.    function Column return Int;
  34.    --  Returns column number about to be written (start of line = column 1)
  35.    --  If a tab is output, this column count reflects the result of outputting
  36.    --  an equivalent number of blanks (with standard positions 1,9,17..)
  37.  
  38.    procedure Restore_Output_FD;
  39.    --  Restore the original FD to what it was before Set_Output_FD is executed.
  40.  
  41.    procedure Set_Output_FD (FD : File_Descriptor);
  42.    --  Sets subsequent output to appear on the file indicated by
  43.    --  FD. This is used by the remote call subprogram stub
  44.    --  generation routines.
  45.  
  46.    procedure Set_Standard_Error;
  47.    --  Sets subsequent output to appear on the standard error file (whatever
  48.    --  that might mean for the host operating system, if anything).
  49.  
  50.    procedure Set_Standard_Output;
  51.    --  Sets subsequent output to appear on the standard output file (whatever
  52.    --  that might mean for the host operating system, if anything). This is
  53.    --  the default mode before any call to either of the Set procedures.
  54.  
  55.    procedure Write_Char (C : Character);
  56.    --  Write one character to the standard output file. Note that the
  57.    --  character should not be LF or CR (use Write_Eol for end of line)
  58.  
  59.    procedure Write_Eol;
  60.    --  Write an end of line (whatever is required by the system in use,
  61.    --  e.g. CR/LF for DOS, or LF for Unix) to the standard output file.
  62.  
  63.    procedure Write_Int (I : Int);
  64.    --  Write an unsigned integer value with no leading blanks or zeroes
  65.  
  66.    procedure Write_Str (S : String);
  67.    --  Write a string of characters to the standard output file. Note that
  68.    --  end of line is handled separately using WRITE_EOL, so the string
  69.    --  should not contain either of the characters LF or CR, but it may
  70.    --  contain horizontal tab characters.
  71.  
  72.    --------------------------
  73.    -- Debugging Procedures --
  74.    --------------------------
  75.  
  76.    --  The following procedures are intended only for debugging purposes,
  77.    --  for temporary insertion into the text in environments where a debugger
  78.    --  is not available. They all have non-standard very short lower case
  79.    --  names, precisely to make sure that they are only used for debugging!
  80.  
  81.    procedure w (C : Character);
  82.    --  Dump quote, character quote, followed by line return
  83.  
  84.    procedure w (S : String);
  85.    --  Dump string followed by line return
  86.  
  87.    procedure w (I : Int);
  88.    --  Dump integer followed by line return
  89.  
  90.    procedure w (B : Boolean);
  91.    --  Dump Boolean followed by line return
  92.  
  93.    procedure w (L : String; C : Character);
  94.    --  Dump contents of string followed by blank, quote, character, quote
  95.  
  96.    procedure w (L : String; S : String);
  97.    --  Dump two strings separated by blanks, followed by line return
  98.  
  99.    procedure w (L : String; I : Int);
  100.    --  Dump contents of string followed by blank, integer, line return
  101.  
  102.    procedure w (L : String; B : Boolean);
  103.    --  Dump contents of string followed by blank, Boolean, line return
  104.  
  105. end Output;
  106.