ajmess.c


Macro ajFatal

Fatal error message to standard error. Includes filename and line number in the source code that invokes it. Newline is added automatically at the end of the format string. In release 6.5.0

Macro ajMessCrash

Crash error message to standard error. Includes filename and line number in the source code that invokes it. Newline is added automatically at the end of the format string. In release 6.5.0

Function ajMessInvokeDebugger

Used to trace in a debugger as a breakpoint

Prototype

void ajMessInvokeDebugger (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Function ajMessRegBeep

Sets a function to process beeps

Prototype

AjMessVoidRoutine ajMessRegBeep (
      AjMessVoidRoutine func
);

TypeNameRead/WriteDescription
AjMessVoidRoutinefuncFunctionFunction to be registered
AjMessVoidRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegOut

Sets a function to write messages

Prototype

AjMessOutRoutine ajMessRegOut (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegDump

Sets a function to dump data

Prototype

AjMessOutRoutine ajMessRegDump (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegErr

Sets a function to report errors

Prototype

AjMessOutRoutine ajMessRegErr (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegExit

Sets a function to exit

Prototype

AjMessOutRoutine ajMessRegExit (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegCrash

Sets a function to crash

Prototype

AjMessOutRoutine ajMessRegCrash (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessRegWarn

Sets a function to print warnings

Prototype

AjMessOutRoutine ajMessRegWarn (
      AjMessOutRoutine func
);

TypeNameRead/WriteDescription
AjMessOutRoutinefuncFunctionFunction to be registered
AjMessOutRoutine RETURNPreviously defined function

From EMBOSS 2.9.0


Function ajMessBeep

Calls the defined beep function, if any. Otherwise prints ASCII 7 to standard error.

Prototype

void ajMessBeep (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Function ajUser

Formats a message. Calls the defined output function (if any). Otherwise prints the message to standard error with an extra newline.

Prototype

void ajUser (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat string
...varargVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajUserDumpC

Prints a string unchanged. Calls the defined output function (if any). Otherwise prints the message to standard error with an extra newline.

Prototype

void ajUserDumpC (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputString to print unchanged
void RETURN

From EMBOSS 6.0.0


Function ajUserDumpS

Prints a string unchanged. Calls the defined output function (if any). Otherwise prints the message to standard error with an extra newline.

Prototype

void ajUserDumpS (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to print unchanged
void RETURN

From EMBOSS 6.0.0


Function ajMessOut

Formats a message. Calls the defined output function (if any). Otherwise prints the message to standard error with no newline.

Prototype

void ajMessOut (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat string
...varargVarargVariable length argument list
void RETURN

From EMBOSS 1.0.0


Function ajVUser

Formats a message. Calls the defined output function (if any). Otherwise prints the message to standard error.

Prototype

void ajVUser (
      const char* format,
      va_list args
);

TypeNameRead/WriteDescription
const char*formatInputFormat string
va_listargsVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajMessDump

Formats a message. Calls the dump function (if any). Otherwise no further action.

Prototype

void ajMessDump (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputformat string.
...varargVarargVariable length argument list.
void RETURN

From EMBOSS 1.0.0


Function ajMessGetCountError

Returns the number of times the error routines have been called.

Prototype

ajint ajMessGetCountError (
      void
);

TypeNameRead/WriteDescription
ajint RETURNError function call count.

From EMBOSS 6.2.0


Function ajErr

Formats an error message. Calls the error function (if any). Otherwise prints the message to standard error with a trailing newline.

Prototype

void ajErr (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat
...varargVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajVErr

Formats an error message. Calls the error function (if any). Otherwise prints the message to standard error with a trailing newline.

Prototype

void ajVErr (
      const char* format,
      va_list args
);

TypeNameRead/WriteDescription
const char*formatInputFormat
va_listargsVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajDie

Formats an error message. Calls the error function (if any). Otherwise prints the message to standard error with a trailing newline. Then kills the application.

Prototype

void ajDie (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat
...varargVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajVDie

Formats an error message. Calls the error function (if any). Otherwise prints the message to standard error with a trailing newline. Then kills the application.

Prototype

void ajVDie (
      const char* format,
      va_list args
);

TypeNameRead/WriteDescription
const char*formatInputFormat
va_listargsVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajWarn

Formats a warning message. Calls the warning function (if any). Otherwise prints the message to standard error with a trailing newline.

Prototype

void ajWarn (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat
...varargVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajVWarn

Formats a warning message. Calls the warning function (if any). Otherwise prints the message to standard error with a trailing newline.

Prototype

void ajVWarn (
      const char* format,
      va_list args
);

TypeNameRead/WriteDescription
const char*formatInputFormat
va_listargsVarargVariable length argument list
void RETURN

From EMBOSS 2.9.0


Function ajMessExitmsg

Formats an exit message and calls the exit function (if any). Otherwise prints the message to standard error with a trailing newline and exist with code EXIT_FAILURE.

Prototype

void ajMessExitmsg (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat
...varargVarargVariable length argument list
void RETURN

From EMBOSS 2.7.0


Function ajMessCrashFL

This is the routine called by the ajFatal macro and others.

Prototype

void ajMessCrashFL (
      const char* format,
      ...
);

TypeNameRead/WriteDescription
const char*formatInputFormat
...varargVarargVariable length argument list
void RETURN

From EMBOSS 1.0.0


Function ajMessVCrashFL

This is the routine called by the ajVFatal macro and others.

Prototype

void ajMessVCrashFL (
      const char* format,
      va_list args
);

TypeNameRead/WriteDescription
const char*formatInputFormat
va_listargsVarargVariable length argument list
void RETURN

From EMBOSS 1.0.0


Function ajMessGetMessageC

Returns the current message text.

Prototype

const char* ajMessGetMessageC (
      void
);

TypeNameRead/WriteDescription
const char* RETURNMessage text

From EMBOSS 6.2.0


Function ajMessGetSysmessageC

Returns the system message text from 'strerror' from the standard C library.

Prototype

const char* ajMessGetSysmessageC (
      void
);

TypeNameRead/WriteDescription
const char* RETURNSystem error message.

From EMBOSS 6.2.0


Function ajMessErrorInit

Initialises the stored program name.

Prototype

void ajMessErrorInit (
      const char* progname
);

TypeNameRead/WriteDescription
const char*prognameInputProgram name.
void RETURN

From EMBOSS 1.0.0


Function ajMessSetErr

Stores the source file name (converted to a base name) and the source line number to be reported by the crash routines.

Prototype

void ajMessSetErr (
      const char* filename,
      ajint line_num
);

TypeNameRead/WriteDescription
const char*filenameInputsource filename, __FILE__
ajintline_numInputsource line number, __LINE__
void RETURN

From EMBOSS 1.0.0


Function ajMessErrorSetFile

Opens a file and sets this to be the error file.

Prototype

AjBool ajMessErrorSetFile (
      const char* errfile
);

TypeNameRead/WriteDescription
const char*errfileInputError file name
AjBool RETURNajTrue on success

From EMBOSS 1.0.0


Function ajMessOutCode

Writes an output message for a given message code.

Prototype

void ajMessOutCode (
      const char* code
);

TypeNameRead/WriteDescription
const char*codeInputMessage code
void RETURN

From EMBOSS 1.0.0


Function ajMessErrorCode

Writes an error message for a given message code.

Prototype

void ajMessErrorCode (
      const char* code
);

TypeNameRead/WriteDescription
const char*codeInputError code
void RETURN

From EMBOSS 1.0.0


Function ajMessCrashCodeFL

Writes an error message for a given message code and crashes.

Prototype

void ajMessCrashCodeFL (
      const char* code
);

TypeNameRead/WriteDescription
const char*codeInputError code
void RETURN

From EMBOSS 1.0.0


Function ajMessCodesDelete

Deletes the message codes table.

Prototype

void ajMessCodesDelete (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Function ajDebug

Writes a debug message to the debug file if debugging is on. Typically, debugging is turned on by adding '-debug' to the command line or by defining a variable prefix_DEBUG

Prototype

void ajDebug (
      const char* fmt,
      ...
);

TypeNameRead/WriteDescription
const char*fmtInputFormat.
...varargVarargVariable argument list.
void RETURN

From EMBOSS 1.0.0


Function ajDebugOn

Test whether debugging is on.

Prototype

AjBool ajDebugOn (
      void
);

TypeNameRead/WriteDescription
AjBool RETURNTrue if user has enabled debugging

From EMBOSS 6.4.0


Function ajDebugTest

Tests a token string and returns true if the user has requested debug output

Prototype

AjBool ajDebugTest (
      const char* token
);

TypeNameRead/WriteDescription
const char*tokenInputToken name
AjBool RETURNTrue if token has debugging requested

From EMBOSS 6.2.0


Function ajMessGetDebugfile

Returns the file used for debug output, or NULL if no debug file is open.

Prototype

FILE* ajMessGetDebugfile (
      void
);

TypeNameRead/WriteDescription
FILE* RETURNC runtime library file handle for debug output.

From EMBOSS 6.2.0


Function ajUserGet

Writes a prompt to the terminal and reads one line from the user.

Prototype

ajint ajUserGet (
      AjPStr* pthis,
      const char* fmt,
      ...
);

TypeNameRead/WriteDescription
AjPStr*pthisOutputBuffer for the user response.
const char*fmtInputFormat string
...varargVarargVariable argument list.
ajint RETURNLength of response string.

From EMBOSS 1.0.0


Function ajMessExit

Delete any static initialised values

Prototype

void ajMessExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Function ajMessExitDebug

Delete any static initialised values for ajDebug calls

Prototype

void ajMessExitDebug (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.2.0