Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: soutil.c
  3. *
  4. * Copyright (c) 1985-96, Microsoft Corporation
  5. *
  6. * 04/09/96 GerardoB Created
  7. \***************************************************************************/
  8. #include "structo.h"
  9. /*********************************************************************
  10. * soLosgMsg
  11. \***************************************************************************/
  12. void __cdecl soLogMsg(DWORD dwFlags, char *pszfmt, ...)
  13. {
  14. static BOOL gfAppending = FALSE;
  15. va_list va;
  16. if (!(dwFlags & SOLM_NOLABEL)) {
  17. if (gfAppending) {
  18. fprintf(stdout, "\r\n");
  19. }
  20. fprintf(stdout, "STRUCTO: ");
  21. }
  22. if (dwFlags & SOLM_ERROR) {
  23. fprintf(stdout, "Error: ");
  24. } else if (dwFlags & SOLM_WARNING) {
  25. fprintf(stdout, "Warning: ");
  26. }
  27. va_start(va, pszfmt);
  28. vfprintf(stdout, pszfmt, va);
  29. va_end(va);
  30. if (dwFlags & SOLM_API) {
  31. soLogMsg (SOLM_NOLABEL | SOLM_NOEOL, " Failed. GetLastError: %d", GetLastError());
  32. }
  33. gfAppending = (dwFlags & SOLM_NOEOL);
  34. if (!gfAppending) {
  35. fprintf(stdout, "\r\n");
  36. }
  37. }