static int logevp(const char *file, char *const argv[]) { int result = 0; if (STS_INFO > KStsLevelGet()) { return 0; } result = printf("%s", file); while (true) { int res = printf(" %s", *argv); if (result >= 0) { if (res < 0) { result = res; } else { result += res; } } if (*(++argv) == NULL) { break; } } printf("\n"); return result; }
LIB_EXPORT void CC KStsLevelAdjust(int32_t adjust) { int32_t l = KStsLevelGet(); l += adjust; KStsLevelSet( l < 0 ? 0 : l); }