Home | History | Annotate | Line # | Download | only in gcc
      1  1.1.1.2  mrg /* Copyright (C) 2019-2022 Free Software Foundation, Inc.
      2      1.1  mrg    Contributed by David Malcolm <dmalcolm (at) redhat.com>.
      3      1.1  mrg 
      4      1.1  mrg This file is part of GCC.
      5      1.1  mrg 
      6      1.1  mrg GCC is free software; you can redistribute it and/or modify it under
      7      1.1  mrg the terms of the GNU General Public License as published by the Free
      8      1.1  mrg Software Foundation; either version 3, or (at your option) any later
      9      1.1  mrg version.
     10      1.1  mrg 
     11      1.1  mrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
     12      1.1  mrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
     13      1.1  mrg FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     14      1.1  mrg for more details.
     15      1.1  mrg 
     16      1.1  mrg You should have received a copy of the GNU General Public License
     17      1.1  mrg along with GCC; see the file COPYING3.  If not see
     18      1.1  mrg <http://www.gnu.org/licenses/>.  */
     19      1.1  mrg 
     20      1.1  mrg #ifndef GCC_DIAGNOSTIC_URL_H
     21      1.1  mrg #define GCC_DIAGNOSTIC_URL_H
     22      1.1  mrg 
     23      1.1  mrg /* Whether to add URLs to diagnostics:
     24      1.1  mrg    - DIAGNOSTICS_URL_NO: never
     25      1.1  mrg    - DIAGNOSTICS_URL_YES: always
     26      1.1  mrg    - DIAGNOSTICS_URL_AUTO: depending on the output stream.  */
     27      1.1  mrg typedef enum
     28      1.1  mrg {
     29      1.1  mrg   DIAGNOSTICS_URL_NO       = 0,
     30      1.1  mrg   DIAGNOSTICS_URL_YES      = 1,
     31      1.1  mrg   DIAGNOSTICS_URL_AUTO     = 2
     32      1.1  mrg } diagnostic_url_rule_t;
     33      1.1  mrg 
     34      1.1  mrg /* Tells whether URLs should be emitted, and, if so, how to
     35      1.1  mrg    terminate strings within the escape sequence.   */
     36      1.1  mrg enum diagnostic_url_format
     37      1.1  mrg {
     38      1.1  mrg   /* No URLs shall be emitted.  */
     39      1.1  mrg   URL_FORMAT_NONE,
     40      1.1  mrg 
     41      1.1  mrg   /* Use ST string termination.  */
     42      1.1  mrg   URL_FORMAT_ST,
     43      1.1  mrg 
     44      1.1  mrg   /* Use BEL string termination.  */
     45      1.1  mrg   URL_FORMAT_BEL
     46      1.1  mrg };
     47      1.1  mrg 
     48      1.1  mrg const diagnostic_url_format URL_FORMAT_DEFAULT = URL_FORMAT_BEL;
     49      1.1  mrg 
     50      1.1  mrg extern diagnostic_url_format determine_url_format (diagnostic_url_rule_t);
     51      1.1  mrg 
     52      1.1  mrg #endif /* ! GCC_DIAGNOSTIC_URL_H */
     53