/usr/lib/emboss/include/ajmess.h is in emboss-lib 6.6.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | /* @include ajmess ************************************************************
**
** AJAX message functions
**
** @author Richard Durbin and Ed Griffiths from ACEdb (messubs.c)
** @version $Revision: 1.29 $
** @modified Ian Longden for EMBOSS
** @modified $Date: 2011/10/18 14:23:40 $ by $Author: rice $
** @@
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
** MA 02110-1301, USA.
**
******************************************************************************/
#ifndef AJMESS_H
#define AJMESS_H
/* ========================================================================= */
/* ============================= include files ============================= */
/* ========================================================================= */
#include "ajdefine.h"
#include "ajstr.h"
#include <stdarg.h>
#include <setjmp.h>
AJ_BEGIN_DECLS
/* ========================================================================= */
/* =============================== constants =============================== */
/* ========================================================================= */
#ifndef WIN32
extern AjBool acdDebugSet;
extern AjBool acdDebugBuffer;
extern AjBool acdDebug;
extern AjPStr acdProgram;
extern AjPStr acdAppldoc;
extern AjPStr acdArgSave;
extern AjPStr acdInputSave;
#else /* WIN32 */
#ifdef AJAXDLL_EXPORTS
__declspec(dllexport) AjBool acdDebugSet;
__declspec(dllexport) AjBool acdDebugBuffer;
__declspec(dllexport) AjBool acdDebug;
__declspec(dllexport) AjPStr acdProgram;
__declspec(dllexport) AjPStr acdAppldoc;
__declspec(dllexport) AjPStr acdArgSave;
__declspec(dllexport) AjPStr acdInputSave;
#else /* !AJAXDLL_EXPORTS */
__declspec(dllimport) AjBool acdDebugSet;
__declspec(dllimport) AjBool acdDebugBuffer;
__declspec(dllimport) AjBool acdDebug;
__declspec(dllimport) AjPStr acdProgram;
__declspec(dllimport) AjPStr acdAppldoc;
__declspec(dllimport) AjPStr acdArgSave;
__declspec(dllimport) AjPStr acdInputSave;
#endif /* AJAXDLL_EXPORTS */
#endif /* !WIN32 */
/* ========================================================================= */
/* ============================== public data ============================== */
/* ========================================================================= */
/* @data AjPError *************************************************************
**
** Ajax error message levels object
**
** @alias AjSError
** @alias AjOError
**
** @attr warning [AjBool] Display ajWarn messages
** @attr error [AjBool] Display ajErr messages
** @attr fatal [AjBool] Display ajFatal messages
** @attr die [AjBool] Display ajDie messages
** @@
******************************************************************************/
typedef struct AjSError
{
AjBool warning;
AjBool error;
AjBool fatal;
AjBool die;
} AjOError;
#define AjPError AjOError*
#ifndef WIN32
extern AjOError AjErrorLevel;
#else /* WIN32 */
#ifdef AJAXDLL_EXPORTS
__declspec(dllexport) AjOError AjErrorLevel;
#else /* !AJAXDLL_EXPORTS */
__declspec(dllimport) AjOError AjErrorLevel;
#endif /* AJAXDLL_EXPORTS */
#endif /* !WIN32 */
#define SUBDIR_DELIMITER_STR "\\"
typedef void (*AjMessVoidRoutine)(void);
typedef void (*AjMessOutRoutine)(const char*);
/* ========================================================================= */
/* =========================== public functions ============================ */
/* ========================================================================= */
/*
** Prototype definitions
*/
AjMessVoidRoutine ajMessRegBeep(AjMessVoidRoutine func);
AjMessOutRoutine ajMessRegCrash(AjMessOutRoutine func);
AjMessOutRoutine ajMessRegDump(AjMessOutRoutine func);
AjMessOutRoutine ajMessRegErr(AjMessOutRoutine func);
AjMessOutRoutine ajMessRegExit(AjMessOutRoutine func);
AjMessOutRoutine ajMessRegOut(AjMessOutRoutine func);
AjMessOutRoutine ajMessRegWarn(AjMessOutRoutine func);
void ajMessSetErr(const char *filename, ajint line_num);
void ajMessCrashFL(const char *format, ...);
void ajMessVCrashFL(const char *format, va_list args);
void ajMessCrashCodeFL(const char *code);
/* External Interface. */
/* Note: ajMesscrash is a macro and makes use of the ',' operator */
/* in C. This means that the ajMesscrash macro will only produce a single C */
/* statement and hence can be used within brackets etc. and will not break */
/* existing code, e.g. */
/* funcblah(ajMesscrash("hello")); */
/* will become: */
/* funcblah(uMessSetErrorOrigin(__FILE__, __LINE__), uMessCrash("hello")); */
/* */
void ajMessErrorInit(const char *progname); /* Record
the application's
name for use in
error messages. */
void ajMessBeep(void); /* make a beep */
AjBool ajMessErrorSetFile(const char *errfile); /* set file to
read codes +
messages from */
void ajMessCodesDelete(void); /* Delete the code/message pairs */
void ajMessOut(const char *format, ...); /* simple message,
no newline */
void ajMessOutCode(const char *name); /* as above but uses
codes to get
message */
void ajMessDump(const char *format, ...); /* write to
log file */
void ajMessErrorCode(const char *name); /* as above but
uses code to
get message */
void ajMessExit(void);
void ajMessExitDebug(void);
void ajMessExitmsg(const char *format, ...); /* error message,
write to log
file & exit */
void ajDebug(const char *fmt, ...);
AjBool ajDebugOn(void);
AjBool ajDebugTest(const char *token);
FILE* ajMessGetDebugfile(void);
void ajDie(const char *format, ...);
void ajErr(const char *format, ...); /* error message and
write to
log file */
ajint ajUserGet(AjPStr *pthis, const char *fmt, ...);
void ajUser(const char *format, ...); /* simple msg with
newline */
void ajUserDumpC(const char* txt); /* simple msg with string
and newline */
void ajUserDumpS(const AjPStr str); /* simple msg with string
and newline */
void ajVDie(const char *format, va_list args); /* error message
and
write to log
file */
void ajVErr(const char *format, va_list args); /* error message
and
write to log
file */
void ajVUser(const char *format, va_list args);
void ajVWarn(const char *format, va_list args); /* warning
message */
void ajWarn(const char *format, ...); /* warning message */
/* abort - but see below */
/* ask for data satisfying format get results via freecard() */
const char* ajMessGetSysmessageC(void);
/* wrapped system error message for use in ajMesserror/crash() */
ajint ajMessGetCountError(void);
/* return numbers of error so far */
/**** routines to catch crashes if necessary, e.g. when dumping ****/
const char* ajMessGetMessageC(void);
void ajMessInvokeDebugger(void);
#define ajMessCrash ajMessSetErr(__FILE__, __LINE__), ajMessCrashFL
#define ajMessCrashCode ajMessSetErr(__FILE__, __LINE__), ajMessCrashCodeFL
#define ajFatal ajMessSetErr(__FILE__, __LINE__), ajMessCrashFL
#define ajVFatal ajMessSetErr(__FILE__, __LINE__), ajMessVCrashFL
/*
** End of prototype definitions
*/
/* if a setjmp() stack context is set using ajMessCatch*() then rather than
** exiting or giving an error message, ajMessCrash() and messError() will
** longjmp() back to the context.
** ajMessCatch*() return the previous value. Use argument = 0 to reset.
** ajMessCaughtMessage() can be called from the jumped-to routine to get
** the error message that would have been printed.
*/
#ifdef AJ_COMPILE_DEPRECATED_BOOK
#endif /* AJ_COMPILE_DEPRECATED_BOOK */
#ifdef AJ_COMPILE_DEPRECATED
__deprecated ajint ajMessErrorCount(void);
__deprecated char* ajMessCaughtMessage(void);
__deprecated char* ajMessSysErrorText(void);
__deprecated FILE* ajDebugFile(void);
#endif /* AJ_COMPILE_DEPRECATED */
AJ_END_DECLS
#endif /* AJMESS_H */
|