Top   Types   Functions   Classes   Index   Sources 

include/error/style-colon.h


  1  /* -*- Mode: C -*- */
  2  
  3  #ifndef ERR_STYLE_COLON_34234_H
  4  #define ERR_STYLE_COLON_34234_H
  5  
  6  #ifdef __cplusplus
  7  extern "C" {
  8  #endif
  9  
 10  /* This also uses the following variables from plain style:
 11   *    err_style_plain_show_pid
 12   *    err_style_plain_line_break
 13   *    err_style_plain_color
 14   */
 15  
 16  extern err_style_t const err_style_colon_s;
 17  #define err_style_colon (&err_style_colon_s)
 18     /* This is the default style that is used for printing.
 19      *
 20      * The format() function uses the following template to print
 21      * an error message:
 22      *
 23      *    "file:line: progname[pid].subsystem: tag_string number: text"
 24      *
 25      * If tag      == C_TAG_NONE, only "text"            is printed.
 26      * If file     == NULL,       "file:line: "          is not printed.
 27      * If line     <= 0,          "line:"                is not printed.
 28      * If progname == NULL,       "progname[pid]: "      is not printed.
 29      * If subsystem is unknown,   ".subsystem"           is not printed.
 30      * If pid < 0,                "[pid]"                is not printed.
 31      * If number   <= 0,          " number"              is not printed.
 32      * If tag      == C_TAG_MORE, "tag_string number: "  is not printed.
 33      *
 34      * This function also replaces all \n in the text by \t\n.
 35      *
 36      * The colon style post_format () function always returns NULL.
 37      */
 38  
 39  /* The following functions may be used to compose your own error
 40   * styles: */
 41  
 42  extern void err_style_colon_format_marked_up (
 43      err_markup_t * /*markup*/,
 44      err_formatted_stream_t *,
 45      err_v_char_t * /*target*/,
 46      int /*tag*/, int /*orig_tag*/, int /*orig_number*/,
 47      err_msg_info_t,
 48      err_location_t const * /*location*/,
 49      char const * /*progname*/, char const * /*hostname*/, int /*pid*/,
 50      char const * /*text*/);
 51      /* This is the format function for plain style. */
 52  
 53  extern void err_style_colon_format (
 54      err_formatted_stream_t *,
 55      err_v_char_t * /*target*/,
 56      int /*tag*/, int /*orig_tag*/, int /*orig_number*/,
 57      err_msg_info_t,
 58      err_location_t const * /*location*/,
 59      char const * /*progname*/, char const * /*hostname*/, int /*pid*/,
 60      char const * /*text*/);
 61      /* This is the format function for colon style. */
 62  
 63  extern int err_style_colon_format_flp (
 64      err_markup_t *,
 65      err_formatted_stream_t *,
 66      err_v_char_t *,
 67      int  /*tag*/, int /*orig_tag*/,
 68      ERR_ERWIN_BOOL /* hide_file */,
 69      ERR_ERWIN_BOOL /* hide_line */,
 70      char const * /*file*/, int /*line*/, int /*pos*/);
 71  
 72  extern int err_style_colon_format_position (
 73      err_markup_t *,
 74      err_formatted_stream_t *,
 75      err_v_char_t *,
 76      int /*tag*/, int /*orig_tag*/,
 77      ERR_ERWIN_BOOL /*hide_file*/,
 78      ERR_ERWIN_BOOL /*hide_line*/,
 79      err_position_t const * /*loc*/);
 80  
 81  /* The following are functions that are used by err_style_colon_format() any
 82   * which might be useful for the user in order to compose their own styles. */
 83  extern int err_style_colon_format_area (
 84      err_markup_t * /*markup*/,
 85      err_formatted_stream_t *stream,
 86      err_v_char_t *,
 87      int /*tag*/, int /*orig_tag*/,
 88      err_area_t const *);
 89     /* This prints the first part of the error message in colon format, i.e.,
 90      *
 91      *    "file:line:pos: "
 92      * or
 93      *    "file:line:pos--line:pos: "
 94      * or the like.
 95      *
 96      */
 97  
 98  /*
 99   * The following functions are currently identical to the err_style_plain versions */
100  extern int err_style_colon_format_address_range (
101      err_markup_t * /*markup*/,
102      err_formatted_stream_t *stream,
103      err_v_char_t *,
104      int /*tag*/, int /*orig_tag*/,
105      err_location_t const *);
106      /* simply invokes err_style_plain_post_format (but this may change in the future) */
107  
108  extern int err_style_colon_format_progname (
109      err_markup_t * /*markup*/,
110      err_formatted_stream_t *stream,
111      err_v_char_t *,
112      int /*tag*/, int /*orig_tag*/,
113      char const * /*progname*/, char const * /*hostname*/, int /*pid*/);
114      /* simply invokes err_style_plain_post_format (but this may change in the future) */
115  
116  extern int err_style_colon_format_tag (
117      err_markup_t * /*markup*/,
118      err_formatted_stream_t *,
119      err_v_char_t *, int /*tag*/, int /*orig_tag*/, int /*number*/);
120      /* simply invokes err_style_plain_post_format (but this may change in the future) */
121  
122  extern err_v_char_t *err_style_colon_post_format (
123      err_formatted_stream_t *,
124      int /*tag*/, int /*orig_tag*/, err_v_char_t const *);
125      /* simply invokes err_style_plain_post_format (but this may change in the future) */
126  
127  
128  #ifdef __cplusplus
129  }
130  #endif
131  
132  #endif /* ERR_STYLE_COLON_34234_H */

Index

Stoppt die Vorratsdatenspeicherung
November 26th, 2007
Comments? Suggestions? Corrections? You can drop me a line.
zpentrabvagiktu@theiling.de
Schwerpunktpraxis