Skip to content

Commit

Permalink
base: add ui_debug2/ui_debug3
Browse files Browse the repository at this point in the history
  • Loading branch information
mascguy committed May 30, 2021
1 parent f9f1a33 commit 3e11953
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
18 changes: 18 additions & 0 deletions src/pextlib1.0/Pextlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,24 @@ void ui_debug(Tcl_Interp *interp, const char *format, ...) {
va_end(va);
}

__attribute__((format(printf, 2, 3)))
void ui_debug2(Tcl_Interp *interp, const char *format, ...) {
va_list va;

va_start(va, format);
ui_message(interp, "debug2", format, va);
va_end(va);
}

__attribute__((format(printf, 2, 3)))
void ui_debug3(Tcl_Interp *interp, const char *format, ...) {
va_list va;

va_start(va, format);
ui_message(interp, "debug3", format, va);
va_end(va);
}

int StrsedCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
{
char *pattern, *string, *res;
Expand Down
2 changes: 2 additions & 0 deletions src/pextlib1.0/Pextlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ void ui_msg(Tcl_Interp *interp, const char *format, ...) __attribute__((format(p
void ui_notice(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
void ui_info(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
void ui_debug(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
void ui_debug2(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
void ui_debug3(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));

/* Mount point file system case-sensitivity caching infrastructure. */
typedef struct _mount_cs_cache mount_cs_cache_t;
Expand Down
6 changes: 6 additions & 0 deletions src/pextlib1.0/tests/system.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ set failures 0
proc ui_debug {args} {
# ignored
}
proc ui_debug2 {args} {
# ignored
}
proc ui_debug3 {args} {
# ignored
}
proc ui_info {args} {
global output
append output "$args\n"
Expand Down
4 changes: 2 additions & 2 deletions src/port1.0/port.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ namespace eval port {
proc run_callbacks {} {
variable _callback_list
foreach callback ${_callback_list} {
ui_debug "Running callback ${callback}"
ui_debug2 "Running callback ${callback}"
${callback}
ui_debug "Finished running callback ${callback}"
ui_debug2 "Finished running callback ${callback}"
}
set _callback_list [list]
}
Expand Down

0 comments on commit 3e11953

Please sign in to comment.