/[ascend]/trunk/base/generic/compiler/statio.h
ViewVC logotype

Diff of /trunk/base/generic/compiler/statio.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 977 by johnpye, Wed Jun 21 07:00:45 2006 UTC revision 978 by johnpye, Wed Dec 20 10:26:04 2006 UTC
# Line 20  Line 20 
20       @file       @file
21      Permanent Statement Output routines.      Permanent Statement Output routines.
22    
     #include <stdio.h>  
     #include "utilities/ascConfig.h"  
23      #include "fractions.h"      #include "fractions.h"
24      #include "compiler.h"      #include "compiler.h"
25      #include "dimen.h"      #include "dimen.h"
# Line 39  Line 37 
37  #ifndef ASC_STATIO_H  #ifndef ASC_STATIO_H
38  #define ASC_STATIO_H  #define ASC_STATIO_H
39    
40    #include <stdio.h>
41    #include <stdarg.h>
42    #include <utilities/ascConfig.h>
43    #include <utilities/error.h>
44    #include "stattypes.h"
45    
46  ASC_DLLSPEC(struct gl_list_t *) GetTypeNamesFromStatList(CONST struct StatementList*sl);  ASC_DLLSPEC(struct gl_list_t *) GetTypeNamesFromStatList(CONST struct StatementList*sl);
47  /**<  /**<
48   *  Return a gl_list of types referenced by the statement list   *  Return a gl_list of types referenced by the statement list
# Line 84  extern void WriteStatementList(FILE *f, Line 88  extern void WriteStatementList(FILE *f,
88   *  printed on file f.   *  printed on file f.
89   */   */
90    
91  /** Write a ASC_PROG_NOTE message using WriteStatementErrorMessage(). */  /** Write a ASC_PROG_NOTE message using WriteStatementErrorMessage().
92        @see WriteStatementError
93    */
94  #define WSNM(FILEP,STMT,MSG) WriteStatementErrorMessage(FILEP,STMT,MSG,1,-1)  #define WSNM(FILEP,STMT,MSG) WriteStatementErrorMessage(FILEP,STMT,MSG,1,-1)
95    
96  #define STATEMENT_NOTE(STMT,MSG) WriteStatementErrorMessage(ASCERR,STMT,MSG,1,-1)  #define STATEMENT_NOTE(STMT,MSG) WriteStatementErrorMessage(ASCERR,STMT,MSG,1,-1)
97    
98  /** Write a verbose error message using WriteStatementErrorMessage(). */  /** Write a verbose error message using WriteStatementErrorMessage().
99        @see WriteStatementError
100    */
101  #define WSEM(FILEP,STMT,MSG) WriteStatementErrorMessage(FILEP,STMT,MSG,1,0)  #define WSEM(FILEP,STMT,MSG) WriteStatementErrorMessage(FILEP,STMT,MSG,1,0)
102    
103  #define STATEMENT_ERROR(STMT,MSG) WriteStatementErrorMessage(ASCERR,STMT,MSG,1,0)  #define STATEMENT_ERROR(STMT,MSG) WriteStatementErrorMessage(ASCERR,STMT,MSG,1,0)
104    
105  /** Write a brief error message using WriteStatementErrorMessage(). */  /** Write a brief error message using WriteStatementErrorMessage().
106        @see WriteStatementError
107    */
108  #define WSSM(FILEP,STMT,MSG,l) WriteStatementErrorMessage(FILEP,STMT,MSG,0,l)  #define WSSM(FILEP,STMT,MSG,l) WriteStatementErrorMessage(FILEP,STMT,MSG,0,l)
109  extern void WriteStatementErrorMessage(FILE *f,  extern void WriteStatementErrorMessage(FILE *f,
110                                         CONST struct Statement *stat,                                         CONST struct Statement *stat,
# Line 115  extern void WriteStatementErrorMessage(F Line 125  extern void WriteStatementErrorMessage(F
125   *  - 2 => Asc-Warning: Line %lu <filename>: \n\tmessage\n<statement>   *  - 2 => Asc-Warning: Line %lu <filename>: \n\tmessage\n<statement>
126   *  - 3 => Asc-Error:   Line %lu <filename>: \n\tmessage\n<statement>   *  - 3 => Asc-Error:   Line %lu <filename>: \n\tmessage\n<statement>
127   *  - 4 => Asc-Fatal:   Line %lu <filename>: \n\tmessage\n<statement>   *  - 4 => Asc-Fatal:   Line %lu <filename>: \n\tmessage\n<statement>
128    
129        @see WriteStatementError
130   */   */
131    
132  extern CONST char *StatioLabel(int level);  extern CONST char *StatioLabel(int level);
# Line 123  extern CONST char *StatioLabel(int level Line 135  extern CONST char *StatioLabel(int level
135   *  You don't own the string returned.   *  You don't own the string returned.
136   *  If you give us invalid level, label 0 is returned.   *  If you give us invalid level, label 0 is returned.
137   *  StatioLabels are defined in WriteStatementErrorMessage above.   *  StatioLabels are defined in WriteStatementErrorMessage above.
138    
139        @see WriteStatementError
140   */   */
141    
142  extern int *GetStatioSuppressions(void);  extern int *GetStatioSuppressions(void);
# Line 150  extern void WriteStatementErrorSparse(FI Line 164  extern void WriteStatementErrorSparse(FI
164   *  Typically this procedure will print the "message" followed by the filename   *  Typically this procedure will print the "message" followed by the filename
165   *  and line number where the error occurs.   *  and line number where the error occurs.
166   *  FOR information will also be displayed when appropriate.   *  FOR information will also be displayed when appropriate.
167    
168        @see WriteStatementError
169   */   */
170    
171    extern void WriteStatementError(const error_severity_t sev
172            , const struct Statement *stat
173            , const int outputstatment
174            , const char *msg
175            , ...
176    );
177    /**<
178        A simpler and more flexible statement error routine using var args.
179        @param outputstatment whether to output the content of the statment (TRUE)
180        or just its location (FALSE).
181    */
182    
183  extern symchar *StatementTypeString(CONST struct Statement *stat);  extern symchar *StatementTypeString(CONST struct Statement *stat);
184  /**<  /**<
185   * Returns a string from the symbol table corresponding to the   * Returns a string from the symbol table corresponding to the

Legend:
Removed from v.977  
changed lines
  Added in v.978

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22