Changeset 1313
- Timestamp:
- Mar 16, 2004, 4:55:24 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/sys/logstrict.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1312 r1313 824 824 const char *pszFormat, ...) 825 825 { 826 static int fEnabled = -1; 826 827 unsigned uTS = getTimestamp(); 827 828 char *pszMsg; … … 833 834 834 835 /* 836 * Check if strict is enabled or not. 837 * Disabled when LIBC_STRICT_DISABLED is present. 838 */ 839 if (fEnabled == -1) 840 { 841 PSZ pszValue; 842 fEnabled = DosScanEnv((PCSZ)"LIBC_STRICT_DISABLED", &pszValue) != NO_ERROR; 843 } 844 845 /* 835 846 * Check instance, get default. 836 847 */ … … 871 882 va_start(args, pszFormat); /* make compiler happy we do it here. */ 872 883 cch = __libc_logBuildMsg(pszMsg, "", args, "%08x %02x %04x Asrt: Assertion Failed!!!\n", uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags)); 873 DosWrite(2, pszMsg, cch, &cb); 884 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 885 if (fEnabled) 886 DosWrite(2, pszMsg, cch, &cb); 887 874 888 cch = __libc_logBuildMsg(pszMsg, "", args, "%08x %02x %04x Asrt: Function: %s\n", uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFunction); 875 DosWrite(2, pszMsg, cch, &cb); 889 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 890 if (fEnabled) 891 DosWrite(2, pszMsg, cch, &cb); 892 876 893 cch = __libc_logBuildMsg(pszMsg, "", args, "%08x %02x %04x Asrt: File: %s\n", uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFile); 877 DosWrite(2, pszMsg, cch, &cb); 894 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 895 if (fEnabled) 896 DosWrite(2, pszMsg, cch, &cb); 897 878 898 cch = __libc_logBuildMsg(pszMsg, "", args, "%08x %02x %04x Asrt: Line: %d\n", uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags), uLine); 879 DosWrite(2, pszMsg, cch, &cb); 899 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 900 if (fEnabled) 901 DosWrite(2, pszMsg, cch, &cb); 902 880 903 cch = __libc_logBuildMsg(pszMsg, "", args, "%08x %02x %04x Asrt: Expr: %s\n", uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags), pszExpression); 881 DosWrite(2, pszMsg, cch, &cb); 904 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 905 if (fEnabled) 906 DosWrite(2, pszMsg, cch, &cb); 907 882 908 cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %04x Asrt: ", 883 909 uTS, getTid(), __LIBC_LOG_GETGROUP(fGroupAndFlags)); 910 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 911 if (fEnabled) 912 DosWrite(2, pszMsg, cch, &cb); 884 913 va_end(args); 885 914 886 915 /* 887 * Write the message. 888 */ 889 __libc_logWrite(pInst, fGroupAndFlags, pszMsg, cch); 890 891 __asm__ __volatile__("int $3"); 916 * Breakpoint. (IBM debugger: T or Ctrl-T to get to caller) 917 */ 918 if (fEnabled) 919 __asm__ __volatile__("int $3"); 892 920 } 893 921 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.