Commit 1f05db63 by Tobias Schlüter Committed by Tobias Schlüter

error.c (gfc_error_init_1): Remove blank line in front of function body.

* error.c (gfc_error_init_1): Remove blank line in front of
function body. Add missing blank.
(gfc_buffer_error, error_char, error_string): Remove blank line in
front of function body.
(show_locus): Add comma in comment.
(gfc_clear_warning, gfc_warning_check, gfc_clear_error,
gfc_push_error, gfc_pop_error): Remove blank line in front of
function body.
(gfc_get_errors): Typo fix in comment in front of function. Remove
blank line in front of function body.

From-SVN: r86691
parent 1506eac1
2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* error.c (gfc_error_init_1): Remove blank line in front of
function body. Add missing blank.
(gfc_buffer_error, error_char, error_string): Remove blank line in
front of function body.
(show_locus): Add comma in comment.
(gfc_clear_warning, gfc_warning_check, gfc_clear_error,
gfc_push_error, gfc_pop_error): Remove blank line in front of
function body.
(gfc_get_errors): Typo fix in comment in front of function. Remove
blank line in front of function body.
2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.h (gfc_default_*_kind): Remove prototypes, add extern * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
......
...@@ -52,8 +52,7 @@ static gfc_error_buf error_buffer, warning_buffer; ...@@ -52,8 +52,7 @@ static gfc_error_buf error_buffer, warning_buffer;
void void
gfc_error_init_1 (void) gfc_error_init_1 (void)
{ {
terminal_width = gfc_terminal_width ();
terminal_width = gfc_terminal_width();
errors = 0; errors = 0;
warnings = 0; warnings = 0;
buffer_flag = 0; buffer_flag = 0;
...@@ -65,7 +64,6 @@ gfc_error_init_1 (void) ...@@ -65,7 +64,6 @@ gfc_error_init_1 (void)
void void
gfc_buffer_error (int flag) gfc_buffer_error (int flag)
{ {
buffer_flag = flag; buffer_flag = flag;
} }
...@@ -76,7 +74,6 @@ gfc_buffer_error (int flag) ...@@ -76,7 +74,6 @@ gfc_buffer_error (int flag)
static void static void
error_char (char c) error_char (char c)
{ {
if (buffer_flag) if (buffer_flag)
{ {
if (use_warning_buffer) if (use_warning_buffer)
...@@ -105,13 +102,12 @@ error_char (char c) ...@@ -105,13 +102,12 @@ error_char (char c)
static void static void
error_string (const char *p) error_string (const char *p)
{ {
while (*p) while (*p)
error_char (*p++); error_char (*p++);
} }
/* Show the file, where it was included and the source line give a /* Show the file, where it was included and the source line, give a
locus. Calls error_printf() recursively, but the recursion is at locus. Calls error_printf() recursively, but the recursion is at
most one level deep. */ most one level deep. */
...@@ -555,7 +551,6 @@ gfc_warning_now (const char *format, ...) ...@@ -555,7 +551,6 @@ gfc_warning_now (const char *format, ...)
void void
gfc_clear_warning (void) gfc_clear_warning (void)
{ {
warning_buffer.flag = 0; warning_buffer.flag = 0;
} }
...@@ -566,7 +561,6 @@ gfc_clear_warning (void) ...@@ -566,7 +561,6 @@ gfc_clear_warning (void)
void void
gfc_warning_check (void) gfc_warning_check (void)
{ {
if (warning_buffer.flag) if (warning_buffer.flag)
{ {
warnings++; warnings++;
...@@ -667,7 +661,6 @@ gfc_internal_error (const char *format, ...) ...@@ -667,7 +661,6 @@ gfc_internal_error (const char *format, ...)
void void
gfc_clear_error (void) gfc_clear_error (void)
{ {
error_buffer.flag = 0; error_buffer.flag = 0;
} }
...@@ -698,7 +691,6 @@ gfc_error_check (void) ...@@ -698,7 +691,6 @@ gfc_error_check (void)
void void
gfc_push_error (gfc_error_buf * err) gfc_push_error (gfc_error_buf * err)
{ {
err->flag = error_buffer.flag; err->flag = error_buffer.flag;
if (error_buffer.flag) if (error_buffer.flag)
strcpy (err->message, error_buffer.message); strcpy (err->message, error_buffer.message);
...@@ -712,7 +704,6 @@ gfc_push_error (gfc_error_buf * err) ...@@ -712,7 +704,6 @@ gfc_push_error (gfc_error_buf * err)
void void
gfc_pop_error (gfc_error_buf * err) gfc_pop_error (gfc_error_buf * err)
{ {
error_buffer.flag = err->flag; error_buffer.flag = err->flag;
if (error_buffer.flag) if (error_buffer.flag)
strcpy (error_buffer.message, err->message); strcpy (error_buffer.message, err->message);
...@@ -744,12 +735,11 @@ gfc_status_char (char c) ...@@ -744,12 +735,11 @@ gfc_status_char (char c)
} }
/* Report the number of warnings and errors that occored to the caller. */ /* Report the number of warnings and errors that occured to the caller. */
void void
gfc_get_errors (int *w, int *e) gfc_get_errors (int *w, int *e)
{ {
if (w != NULL) if (w != NULL)
*w = warnings; *w = warnings;
if (e != NULL) if (e != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment