📄 ntfy_debug.c
字号:
#ifndef lint#ifdef sccsstatic char sccsid[] = "@(#)ntfy_debug.c 1.1 92/07/30 Copyr 1985 Sun Micro";#endif#endif /* * Copyright (c) 1985 by Sun Microsystems, Inc. *//* * Ntfy_debug.c - Debugging routines enabled by NTFY_DEBUG in ntfy.h */#include <stdio.h>#include <sunwindow/ntfy.h>pkg_private_data int ntfy_errno_no_print;pkg_private_data int ntfy_warning_print;pkg_private_data int ntfy_errno_abort;pkg_private_data int ntfy_errno_abort_init;pkg_private voidntfy_set_errno_debug(error) Notify_error error;{ notify_errno = error; if ((!ntfy_errno_no_print) && error != NOTIFY_OK) notify_perror("Notifier error"); if (!ntfy_errno_abort_init) { extern char *getenv(); char *str = getenv("NOTIFY_ERROR_ABORT"); if (str && (str[0] == 'y' || str[0] == 'Y')) ntfy_errno_abort = 1; else ntfy_errno_abort = 0; ntfy_errno_abort_init = 1; } if (ntfy_errno_abort == 1 && error != NOTIFY_OK) abort();}pkg_private voidntfy_set_warning_debug(error) Notify_error error;{ notify_errno = error; if (ntfy_warning_print && error != NOTIFY_OK) notify_perror("Notifier warning");}pkg_private voidntfy_assert_debug(msg) char *msg;{ (void) fprintf(stderr, "Notifier assertion botched: %s\n", msg);}pkg_private voidntfy_fatal_error(msg) char *msg;{ (void) fprintf(stderr, "Notifier fatal error: %s\n", msg);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -