diagnose.c (647f063d) diagnose.c (509a48ff)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 99 unchanged lines hidden (view full) ---

108 sal_Char szMessage[512];
109
110 /* get app name or NULL if unknown (don't call assert) */
111 sal_Char* lpszAppName = "OSL";
112
113 /* format message into buffer */
114 sprintf(szMessage, "Assertion Failed: %s: File %s, Line %d:\n",
115 lpszAppName, pszFileName, nLine);
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 99 unchanged lines hidden (view full) ---

108 sal_Char szMessage[512];
109
110 /* get app name or NULL if unknown (don't call assert) */
111 sal_Char* lpszAppName = "OSL";
112
113 /* format message into buffer */
114 sprintf(szMessage, "Assertion Failed: %s: File %s, Line %d:\n",
115 lpszAppName, pszFileName, nLine);
116 if(pszMessage != 0)
116 if(pszMessage != NULL)
117 strcat( szMessage, pszMessage );
118
119 szMessage[sizeof(szMessage)-1] = '\0';
120
121 fputs(szMessage, stderr);
122
123 char const * env = getenv( "SAL_DIAGNOSE_ABORT" );
124 return ( ( env != NULL ) && ( *env != '\0' ) );

--- 35 unchanged lines hidden ---
117 strcat( szMessage, pszMessage );
118
119 szMessage[sizeof(szMessage)-1] = '\0';
120
121 fputs(szMessage, stderr);
122
123 char const * env = getenv( "SAL_DIAGNOSE_ABORT" );
124 return ( ( env != NULL ) && ( *env != '\0' ) );

--- 35 unchanged lines hidden ---