Last change
on this file was
5158,
checked in by abarral, 5 months ago
|
Add missing klon on strataer_emiss_mod.F90
Correct various missing explicit declarations
Replace tabs by spaces (tabs are not part of the fortran charset)
Continue cleaning modules
Removed unused arguments and variables
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3908] | 1 | /** |
---|
| 2 | * (C) Copyright 2014- ECMWF. |
---|
| 3 | * |
---|
| 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 |
---|
| 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
---|
| 6 | * |
---|
| 7 | * In applying this licence, ECMWF does not waive the privileges and immunities |
---|
| 8 | * granted to it by virtue of its status as an intergovernmental organisation |
---|
| 9 | * nor does it submit to any jurisdiction. |
---|
| 10 | */ |
---|
| 11 | |
---|
| 12 | #ifndef _RAISE_H_ |
---|
| 13 | #define _RAISE_H_ |
---|
| 14 | |
---|
| 15 | /* raise.h */ |
---|
| 16 | |
---|
| 17 | #include <stdio.h> |
---|
| 18 | #include <string.h> |
---|
| 19 | #include <signal.h> |
---|
| 20 | #include <unistd.h> |
---|
| 21 | |
---|
| 22 | extern void abor1fl_(const char *filename, const int *linenum, |
---|
[5158] | 23 | const char *s, |
---|
| 24 | int filenamelen, int slen); |
---|
[3908] | 25 | extern void abor1_(const char *s, int slen); |
---|
| 26 | |
---|
| 27 | #define ABOR1(txt) { const char *t = (txt); t ? abor1_(t, strlen(t)) : abor1_("",0); } |
---|
| 28 | |
---|
| 29 | #define ABOR1FL(txt) { \ |
---|
| 30 | const char *t = (txt); \ |
---|
| 31 | int linenum=__LINE__; \ |
---|
| 32 | t ? abor1fl_(__FILE__, &linenum, t, sizeof(__FILE__)-1, strlen(t)) \ |
---|
| 33 | : abor1fl_(__FILE__, &linenum, "", sizeof(__FILE__)-1, 0); \ |
---|
| 34 | _exit(1); /* Should never end up here */ } |
---|
| 35 | |
---|
| 36 | #define RAISE(x) { \ |
---|
| 37 | if ((x) == SIGABRT) { \ |
---|
| 38 | ABOR1FL("*** Fatal error; aborting (SIGABRT) ..."); \ |
---|
| 39 | _exit(1); /* Should never end up here */ \ |
---|
| 40 | } \ |
---|
| 41 | else raise(x); \ |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | #endif /* _RAISE_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.