Break out error codes, cleanup header files and HISTORY

This commit is contained in:
Greg Smith
2011-02-15 00:43:36 -05:00
parent f6618a01c7
commit 45022debc6
6 changed files with 81 additions and 33 deletions

View File

@@ -3,6 +3,19 @@
*
* Copyright (C) 2ndQuadrant, 2011
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <stdarg.h>
@@ -24,7 +37,7 @@ xvsnprintf(char *str, size_t size, const char *format, va_list ap)
if (retval >= size)
{
fprintf(stderr, "Buffer not large enough to format entire string\n");
exit(255);
exit(ERR_STR_OVERFLOW);
}
return retval;