CUPS rastertoql filter  1.0.4
Filter for the Brother QL family of label printers
Macros | Functions
internal.h File Reference

Some useful helpers for the programmers and the compiler. More...

Macros

#define ARRAY_SIZE(x)   (sizeof(x)/sizeof(x[0]))
 
#define __packed
 
#define __unused
 
#define __nonstring
 
#define _(x)   x
 
#define caps_print_panic(fmt, ...)   cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_error(fmt, ...)   cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_warn(fmt, ...)   cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_info(fmt, ...)   cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_loud(fmt, ...)   cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_noisy(fmt, ...)   cups_message_print("DEBUG2", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
#define caps_print_debug(fmt, ...)   cups_message_print("DEBUG2", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
 

Functions

void cups_message_print (const char *level, const char *scope, const char *fn, int ln, const char *format,...)
 

Detailed Description

Some useful helpers for the programmers and the compiler.

Macro Definition Documentation

◆ _

#define _ (   x)    x

Disable NLS for CUPS

◆ __nonstring

#define __nonstring

◆ __packed

#define __packed

◆ __unused

#define __unused

◆ ARRAY_SIZE

#define ARRAY_SIZE (   x)    (sizeof(x)/sizeof(x[0]))

◆ caps_print_debug

#define caps_print_debug (   fmt,
  ... 
)    cups_message_print("DEBUG2", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output of debug messages. Used to track program states in much more detail

◆ caps_print_error

#define caps_print_error (   fmt,
  ... 
)    cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output an error message. After this message, the program may continue

◆ caps_print_info

#define caps_print_info (   fmt,
  ... 
)    cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output an informational message. Its just for user's information. Do not use this excessive!

◆ caps_print_loud

#define caps_print_loud (   fmt,
  ... 
)    cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output a major trace message. Used to track major program states

◆ caps_print_noisy

#define caps_print_noisy (   fmt,
  ... 
)    cups_message_print("DEBUG2", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output a minor trace message. Used to track program states in more detail

◆ caps_print_panic

#define caps_print_panic (   fmt,
  ... 
)    cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output a panic message. After this message, the program should terminate

◆ caps_print_warn

#define caps_print_warn (   fmt,
  ... 
)    cups_message_print("DEBUG", PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)

Output a warning message. After this message, the program continues at best it can

Function Documentation

◆ cups_message_print()

void cups_message_print ( const char *  level,
const char *  scope,
const char *  fn,
int  ln,
const char *  format,
  ... 
)

State/error/warning/info reporting function

Parameters
[in]levelVerbosity level of this message
[in]scopeThe message's scope, like it's package name
[in]fnName of the function, this output is from
[in]lnLine number this call is from
[in]formatThe format string. Refer the printf() manual for further details
Note
Do not use this function directly. You should always use the convenience macros caps_print_* instead.