Changeset 83994 in vbox
- Timestamp:
- Apr 27, 2020 11:01:30 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137561
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/string.h
r83886 r83994 1540 1540 * - \%Rrf - Takes an integer iprt status code as argument. Will insert the 1541 1541 * full description of the specified status code. 1542 * Note! Works like \%Rrs when IN_RT_STATIC is defined (so please avoid). 1542 1543 * - \%Rra - Takes an integer iprt status code as argument. Will insert the 1543 1544 * status code define + full description. 1545 * Note! Reduced output when IN_RT_STATIC is defined (so please avoid). 1544 1546 * - \%Rwc - Takes a long Windows error code as argument. Will insert the status 1545 1547 * code define corresponding to the Windows error code. 1546 1548 * - \%Rwf - Takes a long Windows error code as argument. Will insert the 1547 1549 * full description of the specified status code. 1550 * Note! Works like \%Rwc when IN_RT_STATIC is defined. 1548 1551 * - \%Rwa - Takes a long Windows error code as argument. Will insert the 1549 1552 * error code define + full description. 1553 * Note! Reduced output when IN_RT_STATIC is defined (so please avoid). 1550 1554 * 1551 1555 * - \%Rhrc - Takes a COM/XPCOM status code as argument. Will insert the status … … 1553 1557 * - \%Rhrf - Takes a COM/XPCOM status code as argument. Will insert the 1554 1558 * full description of the specified status code. 1559 * Note! Works like \%Rhrc when IN_RT_STATIC is 1560 * defined on Windows (so please avoid). 1555 1561 * - \%Rhra - Takes a COM/XPCOM error code as argument. Will insert the 1556 1562 * error code define + full description. 1563 * Note! Reduced output when IN_RT_STATIC is defined on Windows (so please avoid). 1557 1564 * 1558 1565 * - \%Rfn - Pretty printing of a function or method. It drops the -
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r83166 r83994 1031 1031 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1032 1032 case 'f': 1033 return pfnOutput(pvArgOutput, pMsg->pszMsgFull,strlen(pMsg->pszMsgFull)); 1033 # if !defined(RT_OS_WINDOWS) || (!defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY)) 1034 return pfnOutput(pvArgOutput, pMsg->pszMsgFull, strlen(pMsg->pszMsgFull)); 1035 # else 1036 AssertFailed(); 1037 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1038 # endif 1034 1039 case 'a': 1040 # if !defined(RT_OS_WINDOWS) || (!defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY)) 1035 1041 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, hrc, pMsg->pszMsgFull); 1042 # else 1043 AssertFailed(); 1044 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X)", pMsg->pszDefine, hrc); 1045 # endif 1036 1046 default: 1037 1047 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg)); … … 1184 1194 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1185 1195 case 's': 1196 # if !defined(IPRT_ERRMSG_DEFINES_ONLY) 1186 1197 return pfnOutput(pvArgOutput, pMsg->pszMsgShort, strlen(pMsg->pszMsgShort)); 1198 # else 1199 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1200 # endif 1187 1201 case 'f': 1202 # if !defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY) 1188 1203 return pfnOutput(pvArgOutput, pMsg->pszMsgFull, strlen(pMsg->pszMsgFull)); 1204 # else 1205 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1206 # endif 1189 1207 case 'a': 1208 # if !defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY) 1190 1209 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (%d) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull); 1210 # elif !defined(IPRT_ERRMSG_DEFINES_ONLY) 1211 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (%d) - %s", pMsg->pszDefine, rc, pMsg->pszMsgShort); 1212 # else 1213 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (%d)", pMsg->pszDefine, rc); 1214 # endif 1215 1191 1216 default: 1192 1217 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg)); … … 1225 1250 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1226 1251 case 'f': 1227 return pfnOutput(pvArgOutput, pMsg->pszMsgFull,strlen(pMsg->pszMsgFull)); 1252 # if !defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY) 1253 return pfnOutput(pvArgOutput, pMsg->pszMsgFull, strlen(pMsg->pszMsgFull)); 1254 # else 1255 AssertFailed(); 1256 return pfnOutput(pvArgOutput, pMsg->pszDefine, strlen(pMsg->pszDefine)); 1257 # endif 1228 1258 case 'a': 1259 # if !defined(RT_IN_STATIC) && !defined(IPRT_ERRMSG_DEFINES_ONLY) 1229 1260 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X) - %s", pMsg->pszDefine, rc, pMsg->pszMsgFull); 1230 # else 1261 # else 1262 AssertFailed(); 1263 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s (0x%08X)", pMsg->pszDefine, rc); 1264 # endif 1265 # else /* !RT_OS_WINDOWS */ 1231 1266 case 'c': 1232 1267 case 'f': 1233 1268 case 'a': 1234 1269 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "0x%08X", rc); 1235 # endif 1270 # endif /* !RT_OS_WINDOWS */ 1236 1271 default: 1237 1272 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg));
Note:
See TracChangeset
for help on using the changeset viewer.